diff --git a/C/absmi.c b/C/absmi.c index e7bb09b04..53d3d773d 100755 --- a/C/absmi.c +++ b/C/absmi.c @@ -532,19 +532,6 @@ Term Yap_XREGS[MaxTemps]; /* 29 */ #include "arith2.h" -// #include "print_preg.h" -//#include "sprint_op.hpp" -//#include "print_op.hpp" - -#if YAP_JIT -#include "IsGround.h" -#include "yaam_macros.hpp" -#include "fprintblock.h" -#endif /* YAP_JIT */ -#if YAP_DBG_PREDS -#include "debug_printers.h" -#endif - #ifdef COROUTINING /* Imagine we are interrupting the execution, say, because we have a spy @@ -764,7 +751,6 @@ interrupt_handler( PredEntry *pe USES_REGS ) return true; } - // interrupt handling code that sets up the case when we do not have // a guaranteed environment. static int @@ -1252,7 +1238,7 @@ interrupt_dexecute( USES_REGS1 ) if (PP) UNLOCKPE(1,PP); PP = P->y_u.pp.p0; pe = P->y_u.pp.p; - if ((pe->PredFlags & (NoTracePredFlag|HiddenPredFlag)) && Yap_only_has_signal(YAP_CREEP_SIGNAL)) { + if ((PP->PredFlags & (NoTracePredFlag|HiddenPredFlag)) && Yap_only_has_signal(YAP_CREEP_SIGNAL)) { return 2; } /* set S for next instructions */ @@ -1382,7 +1368,7 @@ spy_goal( USES_REGS1 ) if (!PP) { PELOCK(14,pe); PP = pe; - } + } #endif BEGD(d0); if (!(pe->PredFlags & IndexedPredFlag) && @@ -1566,43 +1552,6 @@ Yap_absmi(int inp) * reason */ #define I_R (XREGS[0]) -#if YAP_JIT -#if YAP_STAT_PREDS - struct timeval timstart, timend; - struct rusage rustart, ruend; -#endif - static void *control_labels[] = { &&fail, &&NoStackCut, &&NoStackCommitY, &&NoStackCutT, &&NoStackEither, &&NoStackExecute, &&NoStackCall, &&NoStackDExecute, &&NoStackDeallocate, &¬railleft, &&NoStackFail, &&NoStackCommitX, &&dospy }; - curtrace = NULL; - curpreg = NULL; - globalcurblock = NULL; - ineedredefinedest = 0; - NativeArea = (NativeContext*)malloc(sizeof(NativeContext)); - NativeArea->area.p = NULL; - NativeArea->area.ok = NULL; - NativeArea->area.pc = NULL; -#if YAP_STAT_PREDS - NativeArea->area.nrecomp = NULL; - NativeArea->area.compilation_time = NULL; - NativeArea->area.native_size_bytes = NULL; - NativeArea->area.trace_size_bytes = NULL; - NativeArea->success = NULL; - NativeArea->runs = NULL; - NativeArea->t_runs = NULL; -#endif - NativeArea->n = 0; - IntermediatecodeArea = (IntermediatecodeContext*)malloc(sizeof(IntermediatecodeContext)); - IntermediatecodeArea->area.t = NULL; - IntermediatecodeArea->area.ok = NULL; - IntermediatecodeArea->area.isactive = NULL; - IntermediatecodeArea->area.lastblock = NULL; -#if YAP_STAT_PREDS - IntermediatecodeArea->area.profiling_time = NULL; -#endif - IntermediatecodeArea->n = 0; - nnexec = 0; - l = 0; -#endif /* YAP_JIT */ - #if USE_THREADED_CODE /************************************************************************/ /* Abstract Machine Instruction Address Table */ @@ -1616,18 +1565,8 @@ Yap_absmi(int inp) #undef OPCODE }; -#if YAP_JIT - ExpEnv.config_struc.TOTAL_OF_OPCODES = sizeof(OpAddress)/(2*sizeof(void*)); -#endif - #endif /* USE_THREADED_CODE */ - /*static void* (*nat_glist_valx)(yamop**,yamop**,CELL**,void**,int*); - - if (nat_glist_valx == NULL) { - nat_glist_valx = (void*(*)(yamop**,yamop**,CELL**,void**,int*))call_JIT_Compiler(J, _glist_valx); - }*/ - #ifdef SHADOW_REGS /* work with a local pointer to the registers */ @@ -1794,14 +1733,12245 @@ Yap_absmi(int inp) #endif /* OS_HANDLES_TR_OVERFLOW */ -// move instructions to separate file -// so that they are easier to analyse. -#include "absmi_insts.h" + BOp(Ystop, l); + SET_ASP(YREG, E_CB*sizeof(CELL)); + /* make sure ASP is initialised */ + saveregs(); -#if YAP_JIT -#include "traced_absmi_insts.i" +#if PUSH_REGS + restore_absmi_regs(old_regs); #endif - +#if BP_FREE + P1REG = PCBACKUP; +#endif + return 1; + ENDBOp(); + + BOp(Nstop, e); + SET_ASP(YREG, E_CB*sizeof(CELL)); + saveregs(); +#if PUSH_REGS + restore_absmi_regs(old_regs); +#endif +#if BP_FREE + P1REG = PCBACKUP; +#endif + return 0; + ENDBOp(); + +/***************************************************************** +* Plain try - retry - trust instructions * +*****************************************************************/ + /* try_me Label,NArgs */ + Op(try_me, Otapl); + /* check if enough space between trail and codespace */ + check_trail(TR); + /* I use YREG to go through the choicepoint. Usually YREG is in a + * register, but sometimes (X86) not. In this case, have a + * new register to point at YREG =*/ + CACHE_Y(YREG); + /* store arguments for procedure */ + store_at_least_one_arg(PREG->y_u.Otapl.s); + /* store abstract machine registers */ + store_yaam_regs(PREG->y_u.Otapl.d, 0); + /* On a try_me, set cut to point at previous choicepoint, + * that is, to the B before the cut. + */ + set_cut(S_YREG, B); + /* now, install the new YREG =*/ + B = B_YREG; +#ifdef YAPOR + SCH_set_load(B_YREG); +#endif /* YAPOR */ + PREG = NEXTOP(PREG, Otapl); + SET_BB(B_YREG); + ENDCACHE_Y(); + GONext(); + ENDOp(); + + /* retry_me Label,NArgs */ + Op(retry_me, Otapl); + CACHE_Y(B); + /* After retry, cut should be pointing at the parent + * choicepoint for the current B */ + restore_yaam_regs(PREG->y_u.Otapl.d); + restore_at_least_one_arg(PREG->y_u.Otapl.s); +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); + set_cut(S_YREG, B->cp_b); +#else + set_cut(S_YREG, B_YREG->cp_b); +#endif /* FROZEN_STACKS */ + SET_BB(B_YREG); + ENDCACHE_Y(); + PREG = NEXTOP(PREG, Otapl); + GONext(); + ENDOp(); + + /* trust_me UnusedLabel,NArgs */ + Op(trust_me, Otapl); + CACHE_Y(B); +#ifdef YAPOR + if (SCH_top_shared_cp(B)) { + SCH_last_alternative(PREG, B_YREG); + restore_at_least_one_arg(PREG->y_u.Otapl.s); +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B->cp_b); + } + else +#endif /* YAPOR */ + { + pop_yaam_regs(); + pop_at_least_one_arg(PREG->y_u.Otapl.s); + /* After trust, cut should be pointing at the new top + * choicepoint */ +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B); + } + PREG = NEXTOP(PREG, Otapl); + SET_BB(B_YREG); + ENDCACHE_Y(); + GONext(); + ENDOp(); + +/***************************************************************** +* EXO try - retry instructions * +*****************************************************************/ + /* enter_exo Pred,Label */ + BOp(enter_exo, e); + { + yamop *pt; + saveregs(); + pt = Yap_ExoLookup(PredFromDefCode(PREG) PASS_REGS); + setregs(); +#ifdef SHADOW_S + SREG = S; +#endif + PREG = pt; + } + JMPNext(); + ENDBOp(); + + /* check if enough space between trail and codespace */ + /* try_exo Pred,Label */ + Op(try_exo, lp); + /* check if enough space between trail and codespace */ + check_trail(TR); + /* I use YREG to go through the choicepoint. Usually YREG is in a + * register, but sometimes (X86) not. In this case, have a + * new register to point at YREG =*/ + CACHE_Y(YREG); + { + struct index_t *i = (struct index_t *)(PREG->y_u.lp.l); + S_YREG[-1] = (CELL)LINK_TO_ADDRESS(i,i->links[EXO_ADDRESS_TO_OFFSET(i, SREG)]); + } + S_YREG--; + /* store arguments for procedure */ + store_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); + /* store abstract machine registers */ + store_yaam_regs(NEXTOP(PREG,lp), 0); + /* On a try_me, set cut to point at previous choicepoint, + * that is, to the B before the cut. + */ + set_cut(S_YREG, B); + /* now, install the new YREG =*/ + B = B_YREG; +#ifdef YAPOR + SCH_set_load(B_YREG); +#endif /* YAPOR */ + PREG = NEXTOP(NEXTOP(PREG, lp),lp); + SET_BB(B_YREG); + ENDCACHE_Y(); + GONext(); + ENDOp(); + + /* check if enough space between trail and codespace */ + /* try_exo_udi Pred,Label */ + Op(try_exo_udi, lp); + /* check if enough space between trail and codespace */ + check_trail(TR); + /* I use YREG =to go through the choicepoint. Usually YREG =is in a + * register, but sometimes (X86) not. In this case, have a + * new register to point at YREG =*/ + CACHE_Y(YREG); + S_YREG--; + /* store arguments for procedure */ + store_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); + /* store abstract machine registers */ + store_yaam_regs(NEXTOP(PREG,lp), 0); + /* On a try_me, set cut to point at previous choicepoint, + * that is, to the B before the cut. + */ + set_cut(S_YREG, B); + /* now, install the new YREG =*/ + B = B_YREG; +#ifdef YAPOR + SCH_set_load(B_YREG); +#endif /* YAPOR */ + PREG = NEXTOP(NEXTOP(PREG, lp),lp); + SET_BB(B_YREG); + ENDCACHE_Y(); + GONext(); + ENDOp(); + + /* try_udi Pred,Label */ + Op(try_udi, p); + /* check if enough space between trail and codespace */ + check_trail(TR); + /* I use YREG =to go through the choicepoint. Usually YREG =is in a + * register, but sometimes (X86) not. In this case, have a + * new register to point at YREG =*/ + CACHE_Y(YREG); + { + S_YREG[-1] = (CELL)SREG; /* the udi code did S = (CELL*)judyp; */ + } + S_YREG--; + /* store arguments for procedure */ + store_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); + /* store abstract machine registers */ + store_yaam_regs(NEXTOP(PREG,lp), 0); + /* On a try_me, set cut to point at previous choicepoint, + * that is, to the B before the cut. + */ + set_cut(S_YREG, B); + /* now, install the new YREG =*/ + B = B_YREG; +#ifdef YAPOR + SCH_set_load(B_YREG); +#endif /* YAPOR */ + PREG = NEXTOP(NEXTOP(PREG, lp),lp); + SET_BB(B_YREG); + ENDCACHE_Y(); + GONext(); + ENDOp(); + + /* check if enough space between trail and codespace */ + /* try_exo Pred,Label */ + Op(try_all_exo, lp); + /* check if enough space between trail and codespace */ + check_trail(TR); + /* I use YREG =to go through the choicepoint. Usually YREG =is in a + * register, but sometimes (X86) not. In this case, have a + * new register to point at YREG =*/ + CACHE_Y(YREG); + { + struct index_t *i = (struct index_t *)(PREG->y_u.lp.l); + SREG = i->cls; + S_YREG[-2] = (CELL)(SREG+i->arity); + S_YREG[-1] = (CELL)(SREG+i->arity*i->nels); + } + S_YREG-=2; + /* store arguments for procedure */ + store_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); + /* store abstract machine registers */ + store_yaam_regs(NEXTOP(PREG,lp), 0); + /* On a try_me, set cut to point at previous choicepoint, + * that is, to the B before the cut. + */ + set_cut(S_YREG, B); + /* now, install the new YREG =*/ + B = B_YREG; +#ifdef YAPOR + SCH_set_load(B_YREG); +#endif /* YAPOR */ + PREG = NEXTOP(NEXTOP(PREG, lp),lp); + SET_BB(B_YREG); + ENDCACHE_Y(); + GONext(); + ENDOp(); + + /* retry_exo Pred */ + Op(retry_exo, lp); + BEGD(d0); + CACHE_Y(B); + { + struct index_t *it = (struct index_t *)(PREG->y_u.lp.l); + BITS32 offset = ADDRESS_TO_LINK(it,(BITS32 *)((CELL *)(B+1))[it->arity]); + d0 = it->links[offset]; + ((CELL *)(B+1))[it->arity] = (CELL)LINK_TO_ADDRESS(it, d0); + SREG = EXO_OFFSET_TO_ADDRESS(it, offset); + } + if (d0) { + /* After retry, cut should be pointing at the parent + * choicepoint for the current B */ + restore_yaam_regs(PREG); + restore_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); + set_cut(S_YREG, B->cp_b); +#else + set_cut(S_YREG, B_YREG->cp_b); +#endif /* FROZEN_STACKS */ + SET_BB(B_YREG); + } else { +#ifdef YAPOR + if (SCH_top_shared_cp(B)) { + SCH_last_alternative(PREG, B_YREG); + restore_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B->cp_b); + } else +#endif /* YAPOR */ + { + pop_yaam_regs(); + pop_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); + /* After trust, cut should be pointing at the new top + * choicepoint */ +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B); + } + } + PREG = NEXTOP(PREG, lp); + ENDCACHE_Y(); + ENDD(D0); + GONext(); + ENDOp(); + + /* retry_exo_udi Pred */ + Op(retry_exo_udi, lp); + BEGD(d0); + CACHE_Y(B); + { + struct index_t *it = (struct index_t *)(PREG->y_u.lp.l); + saveregs(); + d0 = ((CRetryExoIndex)it->udi_next)(it PASS_REGS); + setregs(); +#ifdef SHADOW_S + SREG = S; +#endif + } + if (d0) { + /* After retry, cut should be pointing at the parent + * choicepoint for the current B */ + restore_yaam_regs(PREG); + restore_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); + set_cut(S_YREG, B->cp_b); +#else + set_cut(S_YREG, B_YREG->cp_b); +#endif /* FROZEN_STACKS */ + SET_BB(B_YREG); + } else { +#ifdef YAPOR + if (SCH_top_shared_cp(B)) { + SCH_last_alternative(PREG, B_YREG); + restore_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B->cp_b); + } else +#endif /* YAPOR */ + { + pop_yaam_regs(); + pop_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); + /* After trust, cut should be pointing at the new top + * choicepoint */ +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B); + } + } + PREG = NEXTOP(PREG, lp); + ENDCACHE_Y(); + ENDD(D0); + GONext(); + ENDOp(); + + /* retry_exo Pred */ + Op(retry_udi, p); + BEGD(d0); + CACHE_Y(B); + { + // struct udi_index_t *jp = (struct udi_index_t *)((CELL *)(B+1))[it->arity]; + /* operation has a side-effect: S = (CELL*)NextClause */ + saveregs(); + d0 = 0L; // Yap_UDI_NextAlt(jp); + setregs(); +#ifdef SHADOW_S + SREG = S; +#endif + /* d0 says if we're last */ + } + if (d0) { + /* After retry, cut should be pointing at the parent + * choicepoint for the current B */ + restore_yaam_regs(PREG); + restore_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); + set_cut(S_YREG, B->cp_b); +#else + set_cut(S_YREG, B_YREG->cp_b); +#endif /* FROZEN_STACKS */ + SET_BB(B_YREG); + } else { +#ifdef YAPOR + if (SCH_top_shared_cp(B)) { + SCH_last_alternative(PREG, B_YREG); + restore_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B->cp_b); + } else +#endif /* YAPOR */ + { + pop_yaam_regs(); + pop_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); + /* After trust, cut should be pointing at the new top + * choicepoint */ +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B); + } + } + PREG = (yamop *)SREG; + ENDCACHE_Y(); + ENDD(D0); + GONext(); + ENDOp(); + + /* retry_exo Pred */ + Op(retry_all_exo, lp); + BEGD(d0); + CACHE_Y(B); + { + UInt arity = ((struct index_t *)PREG->y_u.lp.l)->arity; + CELL *extras = (CELL *)(B+1); + SREG = (CELL *)extras[arity]; + d0 = (SREG+arity != (CELL *)extras[arity+1]); + if (d0) { + extras[arity] = (CELL)(SREG+arity); + /* After retry, cut should be pointing at the parent + * choicepoint for the current B */ + restore_yaam_regs(PREG); + restore_at_least_one_arg(arity); +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); + set_cut(S_YREG, B->cp_b); +#else + set_cut(S_YREG, B_YREG->cp_b); +#endif /* FROZEN_STACKS */ + SET_BB(B_YREG); + } else { +#ifdef YAPOR + if (SCH_top_shared_cp(B)) { + SCH_last_alternative(PREG, B_YREG); + restore_at_least_one_arg(arity); +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B->cp_b); + } else +#endif /* YAPOR */ + { + pop_yaam_regs(); + pop_at_least_one_arg(arity); + /* After trust, cut should be pointing at the new top + * choicepoint */ +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B); + } + } + } + PREG = NEXTOP(PREG, lp); + ENDCACHE_Y(); + ENDD(D0); + GONext(); + ENDOp(); + +/***************************************************************** +* Profiled try - retry - trust instructions * +*****************************************************************/ + + /* profiled_enter_me Pred */ + Op(enter_profiling, p); + LOCK(PREG->y_u.p.p->StatisticsForPred.lock); + PREG->y_u.p.p->StatisticsForPred.NOfEntries++; + UNLOCK(PREG->y_u.p.p->StatisticsForPred.lock); + PREG = NEXTOP(PREG, p); + GONext(); + ENDOp(); + + /* profiled_retry Label,NArgs */ + Op(retry_profiled, p); + LOCK(PREG->y_u.p.p->StatisticsForPred.lock); + PREG->y_u.p.p->StatisticsForPred.NOfRetries++; + UNLOCK(PREG->y_u.p.p->StatisticsForPred.lock); + PREG = NEXTOP(PREG, p); + GONext(); + ENDOp(); + + /* profiled_retry_me Label,NArgs */ + Op(profiled_retry_me, Otapl); + CACHE_Y(B); + /* After retry, cut should be pointing at the parent + * choicepoint for the current B */ + LOCK(PREG->y_u.Otapl.p->StatisticsForPred.lock); + PREG->y_u.Otapl.p->StatisticsForPred.NOfRetries++; + UNLOCK(PREG->y_u.Otapl.p->StatisticsForPred.lock); + restore_yaam_regs(PREG->y_u.Otapl.d); + restore_args(PREG->y_u.Otapl.s); +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); + set_cut(S_YREG, B->cp_b); +#else + set_cut(S_YREG, B_YREG->cp_b); +#endif /* FROZEN_STACKS */ + SET_BB(B_YREG); + ENDCACHE_Y(); + PREG = NEXTOP(PREG, Otapl); + GONext(); + ENDOp(); + + /* profiled_trust_me UnusedLabel,NArgs */ + Op(profiled_trust_me, Otapl); + CACHE_Y(B); +#ifdef YAPOR + if (SCH_top_shared_cp(B)) { + SCH_last_alternative(PREG, B_YREG); + restore_args(PREG->y_u.Otapl.s); +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B->cp_b); + } + else +#endif /* YAPOR */ + { + pop_yaam_regs(); + pop_args(PREG->y_u.Otapl.s); + /* After trust, cut should be pointing at the new top + * choicepoint */ +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B); + } + SET_BB(B_YREG); + ENDCACHE_Y(); + LOCK(PREG->y_u.Otapl.p->StatisticsForPred.lock); + PREG->y_u.Otapl.p->StatisticsForPred.NOfRetries++; + UNLOCK(PREG->y_u.Otapl.p->StatisticsForPred.lock); + PREG = NEXTOP(PREG, Otapl); + GONext(); + ENDOp(); + + BOp(profiled_retry_logical, OtaLl); + check_trail(TR); + { + UInt timestamp; + CACHE_Y(B); + +#if defined(YAPOR) || defined(THREADS) + if (PP != PREG->y_u.OtaLl.d->ClPred) { + if (PP) UNLOCKPE(15,PP); + PP = PREG->y_u.OtaLl.d->ClPred; + PELOCK(15,PP); + } +#endif + timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[PREG->y_u.OtaLl.s]); + if (!VALID_TIMESTAMP(timestamp, PREG->y_u.OtaLl.d)) { + /* jump to next instruction */ + PREG=PREG->y_u.OtaLl.n; + JMPNext(); + } + restore_yaam_regs(PREG->y_u.OtaLl.n); + restore_args(PREG->y_u.OtaLl.s); + LOCK(PREG->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); + PREG->y_u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; + UNLOCK(PREG->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); +#ifdef THREADS + PP = PREG->y_u.OtaLl.d->ClPred; +#endif + PREG = PREG->y_u.OtaLl.d->ClCode; +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); + set_cut(S_YREG, B->cp_b); +#else + set_cut(S_YREG, B_YREG->cp_b); +#endif /* FROZEN_STACKS */ + SET_BB(B_YREG); + ENDCACHE_Y(); + } + JMPNext(); + ENDBOp(); + + BOp(profiled_trust_logical, OtILl); + CACHE_Y(B); + { + LogUpdIndex *cl = PREG->y_u.OtILl.block; + PredEntry *ap = cl->ClPred; + LogUpdClause *lcl = PREG->y_u.OtILl.d; + UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); + +#if defined(YAPOR) || defined(THREADS) + if (PP != ap) { + if (PP) UNLOCKPE(16,PP); + PP = ap; + PELOCK(16,PP); + } +#endif + if (!VALID_TIMESTAMP(timestamp, lcl)) { + /* jump to next alternative */ + PREG = FAILCODE; + } else { + LOCK(ap->StatisticsForPred.lock); + ap->StatisticsForPred.NOfRetries++; + UNLOCK(ap->StatisticsForPred.lock); + PREG = lcl->ClCode; + } + /* HEY, leave indexing block alone!! */ + /* check if we are the ones using this code */ +#if MULTIPLE_STACKS + DEC_CLREF_COUNT(cl); + /* clear the entry from the trail */ + B->cp_tr--; + TR = B->cp_tr; + /* actually get rid of the code */ + if (cl->ClRefCount == 0 && (cl->ClFlags & (ErasedMask|DirtyMask))) { + if (PREG != FAILCODE) { + /* I am the last one using this clause, hence I don't need a lock + to dispose of it + */ + if (lcl->ClRefCount == 1) { + /* make sure the clause isn't destroyed */ + /* always add an extra reference */ + INC_CLREF_COUNT(lcl); + TRAIL_CLREF(lcl); + } + } + if (cl->ClFlags & ErasedMask) { + saveregs(); + Yap_ErLogUpdIndex(cl); + setregs(); + } else { + saveregs(); + Yap_CleanUpIndex(cl); + setregs(); + } + save_pc(); + } +#else + if (TrailTerm(B->cp_tr-1) == CLREF_TO_TRENTRY(cl) && + B->cp_tr != B->cp_b->cp_tr) { + cl->ClFlags &= ~InUseMask; + --B->cp_tr; +#if FROZEN_STACKS + if (B->cp_tr > TR_FZ) +#endif + { + TR = B->cp_tr; + } + /* next, recover space for the indexing code if it was erased */ + if (cl->ClFlags & (ErasedMask|DirtyMask)) { + if (PREG != FAILCODE) { + /* make sure we don't erase the clause we are jumping to, + notice that we can erase a number of refs in one go. */ + if (!(lcl->ClFlags & InUseMask)) { + lcl->ClFlags |= InUseMask; + TRAIL_CLREF(lcl); + } + } + if (cl->ClFlags & ErasedMask) { + saveregs(); + Yap_ErLogUpdIndex(cl); + setregs(); + } else { + saveregs(); + Yap_CleanUpIndex(cl); + setregs(); + } + save_pc(); + } + } +#endif +#ifdef YAPOR + if (SCH_top_shared_cp(B)) { + SCH_last_alternative(PREG, B_YREG); + restore_args(ap->ArityOfPE); +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#else + S_YREG++; +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B->cp_b); + } else +#endif /* YAPOR */ + { + pop_yaam_regs(); + pop_args(ap->ArityOfPE); + S_YREG--; +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B); + } + SET_BB(B_YREG); + ENDCACHE_Y(); + JMPNext(); + } + ENDBOp(); + +/***************************************************************** +* Call count instructions * +*****************************************************************/ + + /* count_enter_me Label,NArgs */ + Op(count_call, p); + LOCK(PREG->y_u.p.p->StatisticsForPred.lock); + PREG->y_u.p.p->StatisticsForPred.NOfEntries++; + UNLOCK(PREG->y_u.p.p->StatisticsForPred.lock); + LOCAL_ReductionsCounter--; + if (LOCAL_ReductionsCounter == 0 && LOCAL_ReductionsCounterOn) { + saveregs(); + Yap_NilError(CALL_COUNTER_UNDERFLOW,""); + setregs(); + JMPNext(); + } + LOCAL_PredEntriesCounter--; + if (LOCAL_PredEntriesCounter == 0 && LOCAL_PredEntriesCounterOn) { + saveregs(); + Yap_NilError(PRED_ENTRY_COUNTER_UNDERFLOW,""); + setregs(); + JMPNext(); + } + PREG = NEXTOP(PREG, p); + GONext(); + ENDOp(); + + /* count_retry Label,NArgs */ + Op(count_retry, p); + LOCK(PREG->y_u.p.p->StatisticsForPred.lock); + PREG->y_u.p.p->StatisticsForPred.NOfRetries++; + UNLOCK(PREG->y_u.p.p->StatisticsForPred.lock); + LOCAL_RetriesCounter--; + if (LOCAL_RetriesCounter == 0 && LOCAL_RetriesCounterOn) { + /* act as if we had backtracked */ + ENV = B->cp_env; + saveregs(); + Yap_NilError(RETRY_COUNTER_UNDERFLOW,""); + setregs(); + JMPNext(); + } + LOCAL_PredEntriesCounter--; + if (LOCAL_PredEntriesCounter == 0 && LOCAL_PredEntriesCounterOn) { + ENV = B->cp_env; + saveregs(); + Yap_NilError(PRED_ENTRY_COUNTER_UNDERFLOW,""); + setregs(); + JMPNext(); + } + PREG = NEXTOP(PREG, p); + GONext(); + ENDOp(); + + /* count_retry_me Label,NArgs */ + Op(count_retry_me, Otapl); + CACHE_Y(B); + restore_yaam_regs(PREG->y_u.Otapl.d); + restore_args(PREG->y_u.Otapl.s); + /* After retry, cut should be pointing at the parent + * choicepoint for the current B */ +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); + set_cut(S_YREG, B->cp_b); +#else + set_cut(S_YREG, B_YREG->cp_b); +#endif /* FROZEN_STACKS */ + SET_BB(B_YREG); + ENDCACHE_Y(); + LOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); + ((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.NOfRetries++; + UNLOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); + LOCAL_RetriesCounter--; + if (LOCAL_RetriesCounter == 0 && LOCAL_RetriesCounterOn) { + saveregs(); + Yap_NilError(RETRY_COUNTER_UNDERFLOW,""); + setregs(); + JMPNext(); + } + LOCAL_PredEntriesCounter--; + if (LOCAL_PredEntriesCounter == 0 && LOCAL_PredEntriesCounterOn) { + saveregs(); + Yap_NilError(PRED_ENTRY_COUNTER_UNDERFLOW,""); + setregs(); + JMPNext(); + } + PREG = NEXTOP(PREG, Otapl); + GONext(); + ENDOp(); + + /* count_trust_me UnusedLabel,NArgs */ + Op(count_trust_me, Otapl); + CACHE_Y(B); +#ifdef YAPOR + if (SCH_top_shared_cp(B)) { + SCH_last_alternative(PREG, B_YREG); + restore_args(PREG->y_u.Otapl.s); +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B->cp_b); + } + else +#endif /* YAPOR */ + { + pop_yaam_regs(); + pop_args(PREG->y_u.Otapl.s); + /* After trust, cut should be pointing at the new top + * choicepoint */ +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B); + } + SET_BB(B_YREG); + ENDCACHE_Y(); + LOCAL_RetriesCounter--; + if (LOCAL_RetriesCounter == 0) { + saveregs(); + Yap_NilError(RETRY_COUNTER_UNDERFLOW,""); + setregs(); + JMPNext(); + } + LOCAL_PredEntriesCounter--; + if (LOCAL_PredEntriesCounter == 0) { + saveregs(); + Yap_NilError(PRED_ENTRY_COUNTER_UNDERFLOW,""); + setregs(); + JMPNext(); + } + LOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); + ((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.NOfRetries++; + UNLOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); + PREG = NEXTOP(PREG, Otapl); + GONext(); + ENDOp(); + + BOp(count_retry_logical, OtaLl); + check_trail(TR); + { + UInt timestamp; + CACHE_Y(B); + +#if defined(YAPOR) || defined(THREADS) + if (PP != PREG->y_u.OtaLl.d->ClPred) { + if (PP) UNLOCKPE(15,PP); + PP = PREG->y_u.OtaLl.d->ClPred; + PELOCK(15,PP); + } +#endif + timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[PREG->y_u.OtaLl.s]); + if (!VALID_TIMESTAMP(timestamp, PREG->y_u.OtaLl.d)) { + /* jump to next instruction */ + PREG=PREG->y_u.OtaLl.n; + JMPNext(); + } + restore_yaam_regs(PREG->y_u.OtaLl.n); + restore_args(PREG->y_u.OtaLl.s); + LOCAL_RetriesCounter--; + if (LOCAL_RetriesCounter == 0) { + saveregs(); + Yap_NilError(RETRY_COUNTER_UNDERFLOW,""); + setregs(); + JMPNext(); + } + LOCAL_PredEntriesCounter--; + if (LOCAL_PredEntriesCounter == 0) { + saveregs(); + Yap_NilError(PRED_ENTRY_COUNTER_UNDERFLOW,""); + setregs(); + JMPNext(); + } + LOCK(PREG->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); + PREG->y_u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; + UNLOCK(PREG->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); +#ifdef THREADS + PP = PREG->y_u.OtaLl.d->ClPred; +#endif + PREG = PREG->y_u.OtaLl.d->ClCode; +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); + set_cut(S_YREG, B->cp_b); +#else + set_cut(S_YREG, B_YREG->cp_b); +#endif /* FROZEN_STACKS */ + SET_BB(B_YREG); + ENDCACHE_Y(); + } + JMPNext(); + ENDBOp(); + + BOp(count_trust_logical, OtILl); + CACHE_Y(B); + { + LogUpdIndex *cl = PREG->y_u.OtILl.block; + PredEntry *ap = cl->ClPred; + LogUpdClause *lcl = PREG->y_u.OtILl.d; + UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); + +#if defined(YAPOR) || defined(THREADS) + if (PP != ap) { + if (PP) UNLOCKPE(16,PP); + PP = ap; + PELOCK(16,PP); + } +#endif + if (!VALID_TIMESTAMP(timestamp, lcl)) { + /* jump to next alternative */ + PREG = FAILCODE; + } else { + LOCAL_RetriesCounter--; + if (LOCAL_RetriesCounter == 0) { + saveregs(); + Yap_NilError(RETRY_COUNTER_UNDERFLOW,""); + setregs(); + JMPNext(); + } + LOCAL_PredEntriesCounter--; + if (LOCAL_PredEntriesCounter == 0) { + saveregs(); + Yap_NilError(PRED_ENTRY_COUNTER_UNDERFLOW,""); + setregs(); + JMPNext(); + } + LOCK(ap->StatisticsForPred.lock); + ap->StatisticsForPred.NOfRetries++; + UNLOCK(ap->StatisticsForPred.lock); + PREG = lcl->ClCode; + } + /* HEY, leave indexing block alone!! */ + /* check if we are the ones using this code */ +#if MULTIPLE_STACKS + PELOCK(2, ap); + PP = ap; + DEC_CLREF_COUNT(cl); + /* clear the entry from the trail */ + --B->cp_tr; + TR = B->cp_tr; + /* actually get rid of the code */ + if (cl->ClRefCount == 0 && (cl->ClFlags & (ErasedMask|DirtyMask))) { + if (PREG != FAILCODE) { + /* I am the last one using this clause, hence I don't need a lock + to dispose of it + */ + if (lcl->ClRefCount == 1) { + /* make sure the clause isn't destroyed */ + /* always add an extra reference */ + INC_CLREF_COUNT(lcl); + TRAIL_CLREF(lcl); + } + } + if (cl->ClFlags & ErasedMask) { + saveregs(); + Yap_ErLogUpdIndex(cl); + setregs(); + } else { + saveregs(); + Yap_CleanUpIndex(cl); + setregs(); + } + save_pc(); + } +#else + if (TrailTerm(B->cp_tr-1) == CLREF_TO_TRENTRY(cl) && + B->cp_tr != B->cp_b->cp_tr) { + cl->ClFlags &= ~InUseMask; + --B->cp_tr; +#if FROZEN_STACKS + if (B->cp_tr > TR_FZ) +#endif + { + TR = B->cp_tr; + } + /* next, recover space for the indexing code if it was erased */ + if (cl->ClFlags & (ErasedMask|DirtyMask)) { + if (PREG != FAILCODE) { + /* make sure we don't erase the clause we are jumping too */ + if (!(lcl->ClFlags & InUseMask)) { + lcl->ClFlags |= InUseMask; + TRAIL_CLREF(lcl); + } + } + if (cl->ClFlags & ErasedMask) { + saveregs(); + Yap_ErLogUpdIndex(cl); + setregs(); + } else { + saveregs(); + Yap_CleanUpIndex(cl); + setregs(); + } + save_pc(); + } + } +#endif +#ifdef YAPOR + if (SCH_top_shared_cp(B)) { + SCH_last_alternative(PREG, B_YREG); + restore_args(ap->ArityOfPE); +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#else + S_YREG++; +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B->cp_b); + } else +#endif /* YAPOR */ + { + pop_yaam_regs(); + pop_args(ap->ArityOfPE); + S_YREG--; +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B); + } + SET_BB(B_YREG); + ENDCACHE_Y(); + JMPNext(); + } + ENDBOp(); + + + +/***************************************************************** +* enter a logical semantics dynamic predicate * +*****************************************************************/ + + /* only meaningful with THREADS on! */ + /* lock logical updates predicate. */ + Op(lock_lu, p); +#if PARALLEL_YAP + if (PP) { + GONext(); + } + PP = PREG->y_u.p.p; + PELOCK(3, PP); +#endif + PREG = NEXTOP(PREG, p); + GONext(); + ENDOp(); + + /* only meaningful with THREADS on! */ + /* lock logical updates predicate. */ + Op(unlock_lu, e); +#if defined(YAPOR) || defined(THREADS) + if (PP) { + UNLOCKPE(1,PP); + PP = NULL; + } +#endif + PREG = NEXTOP(PREG, e); + GONext(); + ENDOp(); + + + /* enter logical pred */ + BOp(alloc_for_logical_pred, L); + check_trail(TR); + /* say that an environment is using this clause */ + /* we have our own copy for the clause */ +#if MULTIPLE_STACKS + { + LogUpdClause *cl = PREG->y_u.L.ClBase; +#if PARALLEL_YAP + PredEntry *ap = cl->ClPred; +#endif + + /* always add an extra reference */ + INC_CLREF_COUNT(cl); + TRAIL_CLREF(cl); + UNLOCKPE(2,ap); + PP = NULL; + } +#else + { + LogUpdClause *cl = (LogUpdClause *)PREG->y_u.L.ClBase; + if (!(cl->ClFlags & InUseMask)) { + cl->ClFlags |= InUseMask; + TRAIL_CLREF(cl); + } + } +#endif + PREG = NEXTOP(PREG, L); + JMPNext(); + ENDBOp(); + + /* copy database term */ + BOp(copy_idb_term, e); + { + LogUpdClause *cl = ClauseCodeToLogUpdClause(PREG); + Term t; + + SET_ASP(YREG, E_CB*sizeof(CELL)); + saveregs(); + while ((t = Yap_FetchTermFromDB(cl->lusl.ClSource)) == 0L) { + if (PP) UNLOCKPE(3,PP); +#if defined(YAPOR) || defined(THREADS) + PP = NULL; +#endif + if (LOCAL_Error_TYPE == OUT_OF_ATTVARS_ERROR) { + LOCAL_Error_TYPE = YAP_NO_ERROR; + if (!Yap_growglobal(NULL)) { + Yap_NilError(OUT_OF_ATTVARS_ERROR, LOCAL_ErrorMessage); + FAIL(); + } + } else { + LOCAL_Error_TYPE = YAP_NO_ERROR; + if (!Yap_gc(3, ENV, CP)) { + Yap_NilError(OUT_OF_STACK_ERROR, LOCAL_ErrorMessage); + FAIL(); + } + } +#if defined(YAPOR) || defined(THREADS) + PELOCK(5,ClauseCodeToLogUpdClause(PREG)->ClPred); + PP = ClauseCodeToLogUpdClause(PREG)->ClPred; +#endif + } + if (!Yap_IUnify(ARG2, t)) { + setregs(); +#if defined(YAPOR) || defined(THREADS) + if (PP) UNLOCKPE(6,PP); + PP = NULL; +#endif + FAIL(); + } + if (!Yap_IUnify(ARG3, MkDBRefTerm((DBRef)cl))) { + setregs(); +#if defined(YAPOR) || defined(THREADS) + if (PP) UNLOCKPE(5,PP); + PP = NULL; +#endif + FAIL(); + } + setregs(); + +#if MULTIPLE_STACKS + /* always add an extra reference */ + INC_CLREF_COUNT(cl); + TRAIL_CLREF(cl); + if (PP) UNLOCKPE(7,PP); + PP = NULL; +#else + if (!(cl->ClFlags & InUseMask)) { + /* Clause *cl = (Clause *)PREG->y_u.EC.ClBase; + + PREG->y_u.EC.ClTrail = TR-(tr_fr_ptr)LOCAL_TrailBase; + PREG->y_u.EC.ClENV = LCL0-YREG;*/ + cl->ClFlags |= InUseMask; + TRAIL_CLREF(cl); + } +#endif + } + PREG = CPREG; + YREG = ENV; +#ifdef DEPTH_LIMIT + DEPTH = YREG[E_DEPTH]; +#endif + JMPNext(); + ENDBOp(); + + + /* unify with database term */ + BOp(unify_idb_term, e); + { + LogUpdClause *cl = ClauseCodeToLogUpdClause(PREG); + + saveregs(); + if (!Yap_IUnify(ARG2, cl->lusl.ClSource->Entry)) { + setregs(); + UNLOCKPE(8,PP); +#if defined(YAPOR) || defined(THREADS) + PP = NULL; +#endif + FAIL(); + } + if (!Yap_IUnify(ARG3, MkDBRefTerm((DBRef)cl))) { + setregs(); + UNLOCKPE(9,PP); +#if defined(YAPOR) || defined(THREADS) + PP = NULL; +#endif + FAIL(); + } + setregs(); + + /* say that an environment is using this clause */ + /* we have our own copy for the clause */ +#if MULTIPLE_STACKS + /* always add an extra reference */ + INC_CLREF_COUNT(cl); + TRAIL_CLREF(cl); + UNLOCKPE(10,PP); + PP = NULL; +#else + if (!(cl->ClFlags & InUseMask)) { + /* Clause *cl = (Clause *)PREG->y_u.EC.ClBase; + + PREG->y_u.EC.ClTrail = TR-(tr_fr_ptr)LOCAL_TrailBase; + PREG->y_u.EC.ClENV = LCL0-YREG;*/ + cl->ClFlags |= InUseMask; + TRAIL_CLREF(cl); + } +#endif + } + PREG = CPREG; + YREG = ENV; +#ifdef DEPTH_LIMIT + DEPTH = YREG[E_DEPTH]; +#endif + JMPNext(); + ENDBOp(); + + +/***************************************************************** +* check for enough room * +*****************************************************************/ + + /* ensure_space */ + BOp(ensure_space, Osbpa); + { + Int sz = PREG->y_u.Osbpa.i; + UInt arity = PREG->y_u.Osbpa.p->ArityOfPE; + + if (Unsigned(HR) + sz > Unsigned(YREG)-StackGap( PASS_REGS1 )) { + YENV[E_CP] = (CELL) CPREG; + YENV[E_E] = (CELL) ENV; +#ifdef DEPTH_LIMIT + YENV[E_DEPTH] = DEPTH; +#endif /* DEPTH_LIMIT */ + SET_ASP(YREG, PREG->y_u.Osbpa.s); + PREG = NEXTOP(PREG,Osbpa); + saveregs(); + if (!Yap_gcl(sz, arity, YENV, PREG)) { + Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); + setregs(); + FAIL(); + } else { + setregs(); + } + } else { + PREG = NEXTOP(PREG,Osbpa); + } + } + JMPNext(); + ENDBOp(); + +/***************************************************************** +* try and retry of dynamic predicates * +*****************************************************************/ + + /* spy_or_trymark */ + BOp(spy_or_trymark, Otapl); + PELOCK(5, ((PredEntry *)(PREG->y_u.Otapl.p))); + PREG = (yamop *)(&(((PredEntry *)(PREG->y_u.Otapl.p))->OpcodeOfPred)); + UNLOCKPE(11,(PredEntry *)(PREG->y_u.Otapl.p)); + saveregs(); + spy_goal( PASS_REGS1 ); + setregs(); + ENDBOp(); + + /* try_and_mark Label,NArgs */ + BOp(try_and_mark, Otapl); + check_trail(TR); +#if defined(YAPOR) || defined(THREADS) +#ifdef YAPOR + /* The flags I check here should never change during execution */ + CUT_wait_leftmost(); +#endif /* YAPOR */ + if (PREG->y_u.Otapl.p->PredFlags & LogUpdatePredFlag) { + PELOCK(6,PREG->y_u.Otapl.p); + PP = PREG->y_u.Otapl.p; + } + if (PREG->y_u.Otapl.p->CodeOfPred != PREG) { + /* oops, someone changed the procedure under our feet, + fortunately this is no big deal because we haven't done + anything yet */ + PP = NULL; + PREG = PREG->y_u.Otapl.p->CodeOfPred; + UNLOCKPE(12,PREG->y_u.Otapl.p); + /* for profiler */ + save_pc(); + JMPNext(); + } +#endif + CACHE_Y(YREG); + PREG = PREG->y_u.Otapl.d; + /* + I've got a read lock on the DB, so I don't need to care... + niaaahh.... niahhhh... + */ + LOCK(DynamicLock(PREG)); + /* one can now mess around with the predicate */ + UNLOCKPE(13,((PredEntry *)(PREG->y_u.Otapl.p))); + BEGD(d1); + d1 = PREG->y_u.Otapl.s; + store_args(d1); + store_yaam_regs(PREG, 0); + ENDD(d1); + set_cut(S_YREG, B); + B = B_YREG; +#ifdef YAPOR + SCH_set_load(B_YREG); +#endif /* YAPOR */ + SET_BB(B_YREG); + ENDCACHE_Y(); +#if MULTIPLE_STACKS + INC_CLREF_COUNT(ClauseCodeToDynamicClause(PREG)); + UNLOCK(DynamicLock(PREG)); + TRAIL_CLREF(ClauseCodeToDynamicClause(PREG)); +#else + if (FlagOff(InUseMask, DynamicFlags(PREG))) { + + SetFlag(InUseMask, DynamicFlags(PREG)); + TRAIL_CLREF(ClauseCodeToDynamicClause(PREG)); + } +#endif + PREG = NEXTOP(PREG,Otapl); + JMPNext(); + + ENDBOp(); + + BOp(count_retry_and_mark, Otapl); + LOCAL_RetriesCounter--; + if (LOCAL_RetriesCounter == 0) { + saveregs(); + Yap_NilError(RETRY_COUNTER_UNDERFLOW,""); + setregs(); + JMPNext(); + } + LOCAL_PredEntriesCounter--; + if (LOCAL_PredEntriesCounter == 0) { + saveregs(); + Yap_NilError(PRED_ENTRY_COUNTER_UNDERFLOW,""); + setregs(); + JMPNext(); + } + /* enter a retry dynamic */ + ENDBOp(); + + BOp(profiled_retry_and_mark, Otapl); + LOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); + ((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.NOfRetries++; + UNLOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); + /* enter a retry dynamic */ + ENDBOp(); + + /* retry_and_mark Label,NArgs */ + BOp(retry_and_mark, Otapl); +#ifdef YAPOR + CUT_wait_leftmost(); +#endif /* YAPOR */ + /* need to make the DB stable until I get the new clause */ + PELOCK(7,PREG->y_u.Otapl.p); + CACHE_Y(B); + PREG = PREG->y_u.Otapl.d; + LOCK(DynamicLock(PREG)); + UNLOCK(PREG->y_u.Otapl.p->PELock); + restore_yaam_regs(PREG); + restore_args(PREG->y_u.Otapl.s); +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); + set_cut(S_YREG, B->cp_b); +#else + set_cut(S_YREG, B_YREG->cp_b); +#endif /* FROZEN_STACKS */ + SET_BB(B_YREG); + ENDCACHE_Y(); +#if MULTIPLE_STACKS + INC_CLREF_COUNT(ClauseCodeToDynamicClause(PREG)); + TRAIL_CLREF(ClauseCodeToDynamicClause(PREG)); + UNLOCK(DynamicLock(PREG)); +#else + if (FlagOff(InUseMask, DynamicFlags(PREG))) { + + SetFlag(InUseMask, DynamicFlags(PREG)); + TRAIL_CLREF(ClauseCodeToDynamicClause(PREG)); + } +#endif + PREG = NEXTOP(PREG, Otapl); + JMPNext(); + + ENDBOp(); + +/***************************************************************** +* Failure * +*****************************************************************/ + + /* trust_fail */ + BOp(trust_fail, e); + { + while (POP_CHOICE_POINT(B->cp_b)) + { + POP_EXECUTE(); + } + } +#ifdef YAPOR + { + choiceptr cut_pt; + cut_pt = B->cp_b; + CUT_prune_to(cut_pt); + B = cut_pt; + } +#else + B = B->cp_b; +#endif /* YAPOR */ + goto fail; + ENDBOp(); + +#ifdef YAPOR + shared_fail: + B = Get_LOCAL_top_cp(); + SET_BB(PROTECT_FROZEN_B(B)); + goto fail; +#endif /* YAPOR */ + + /* fail */ + PBOp(op_fail, e); + + if (PP) { + UNLOCK(PP->PELock); + PP = NULL; + } +#ifdef COROUTINING + CACHE_Y_AS_ENV(YREG); + check_stack(NoStackFail, HR); + ENDCACHE_Y_AS_ENV(); +#endif + + fail: + { + register tr_fr_ptr pt0 = TR; +#if defined(YAPOR) || defined(THREADS) + if (PP) { + UNLOCK(PP->PELock); + PP = NULL; + } +#endif + PREG = B->cp_ap; + save_pc(); + CACHE_TR(B->cp_tr); + PREFETCH_OP(PREG); + failloop: + if (pt0 == S_TR) { + SP = SP0; +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) { + int go_on = true; + yamop *ipc = PREG; + + while (go_on) { + op_numbers opnum = Yap_op_from_opcode(ipc->opc); + + go_on = false; + switch (opnum) { +#ifdef TABLING + case _table_load_answer: + low_level_trace(retry_table_loader, LOAD_CP(B)->cp_pred_entry, NULL); + break; + case _table_try_answer: + case _table_retry_me: + case _table_trust_me: + case _table_retry: + case _table_trust: + case _table_completion: +#ifdef THREADS_CONSUMER_SHARING + case _table_answer_resolution_completion: +#endif /* THREADS_CONSUMER_SHARING */ +#ifdef DETERMINISTIC_TABLING + if (IS_DET_GEN_CP(B)) + low_level_trace(retry_table_generator, DET_GEN_CP(B)->cp_pred_entry, NULL); + else +#endif /* DETERMINISTIC_TABLING */ + low_level_trace(retry_table_generator, GEN_CP(B)->cp_pred_entry, (CELL *)(GEN_CP(B) + 1)); + break; + case _table_answer_resolution: + low_level_trace(retry_table_consumer, CONS_CP(B)->cp_pred_entry, NULL); + break; + case _trie_trust_var: + case _trie_retry_var: + case _trie_trust_var_in_pair: + case _trie_retry_var_in_pair: + case _trie_trust_val: + case _trie_retry_val: + case _trie_trust_val_in_pair: + case _trie_retry_val_in_pair: + case _trie_trust_atom: + case _trie_retry_atom: + case _trie_trust_atom_in_pair: + case _trie_retry_atom_in_pair: + case _trie_trust_null: + case _trie_retry_null: + case _trie_trust_null_in_pair: + case _trie_retry_null_in_pair: + case _trie_trust_pair: + case _trie_retry_pair: + case _trie_trust_appl: + case _trie_retry_appl: + case _trie_trust_appl_in_pair: + case _trie_retry_appl_in_pair: + case _trie_trust_extension: + case _trie_retry_extension: + case _trie_trust_double: + case _trie_retry_double: + case _trie_trust_longint: + case _trie_retry_longint: + case _trie_trust_gterm: + case _trie_retry_gterm: + low_level_trace(retry_table_loader, UndefCode, NULL); + break; +#endif /* TABLING */ + case _or_else: + case _or_last: + low_level_trace(retry_or, (PredEntry *)ipc, &(B->cp_a1)); + break; + case _retry2: + case _retry3: + case _retry4: + ipc = NEXTOP(ipc,l); + go_on = true; + break; + case _jump: + ipc = ipc->y_u.l.l; + go_on = true; + break; + case _retry_c: + case _retry_userc: + low_level_trace(retry_pred, ipc->y_u.OtapFs.p, B->cp_args); + break; + case _retry_profiled: + case _count_retry: + ipc = NEXTOP(ipc,p); + go_on = true; + break; + case _retry_me: + case _trust_me: + case _count_retry_me: + case _count_trust_me: + case _profiled_retry_me: + case _profiled_trust_me: + case _retry_and_mark: + case _profiled_retry_and_mark: + case _retry: + case _trust: + low_level_trace(retry_pred, ipc->y_u.Otapl.p, B->cp_args); + break; + case _try_logical: + case _retry_logical: + case _profiled_retry_logical: + case _count_retry_logical: + case _trust_logical: + case _profiled_trust_logical: + case _count_trust_logical: + low_level_trace(retry_pred, ipc->y_u.OtILl.d->ClPred, B->cp_args); + break; + case _Nstop: + case _Ystop: + low_level_trace(retry_pred, NULL, B->cp_args); + break; + default: + break; + } + } + } +#endif /* LOW_LEVEL_TRACER */ +#ifdef FROZEN_STACKS +#ifdef YAPOR_SBA + if (pt0 < TR_FZ || pt0 > (ADDR)CurrentTrailTop+MinTrailGap) +#else + if (pt0 < TR_FZ) +#endif /* YAPOR_SBA */ + { + TR = TR_FZ; + TRAIL_LINK(pt0); + } else +#endif /* FROZEN_STACKS */ + RESTORE_TR(); + GONext(); + } + BEGD(d1); + d1 = TrailTerm(pt0-1); + pt0--; + if (IsVarTerm(d1)) { +#if defined(YAPOR_SBA) && defined(YAPOR) + /* clean up the trail when we backtrack */ + if (Unsigned((Int)(d1)-(Int)(H_FZ)) > + Unsigned((Int)(B_FZ)-(Int)(H_FZ))) { + RESET_VARIABLE(STACK_TO_SBA(d1)); + } else +#endif + /* normal variable */ + RESET_VARIABLE(d1); + goto failloop; + } + /* pointer to code space */ + /* or updatable variable */ +#if defined(TERM_EXTENSIONS) || defined(FROZEN_STACKS) || defined(MULTI_ASSIGNMENT_VARIABLES) + if (IsPairTerm(d1)) +#endif /* TERM_EXTENSIONS || FROZEN_STACKS || MULTI_ASSIGNMENT_VARIABLES */ + { + register CELL flags; + CELL *pt1 = RepPair(d1); +#ifdef LIMIT_TABLING + if ((ADDR) pt1 == LOCAL_TrailBase) { + sg_fr_ptr sg_fr = (sg_fr_ptr) TrailVal(pt0); + TrailTerm(pt0) = AbsPair((CELL *)(pt0 - 1)); + SgFr_state(sg_fr)--; /* complete_in_use --> complete : compiled_in_use --> compiled */ + insert_into_global_sg_fr_list(sg_fr); + goto failloop; + } +#endif /* LIMIT_TABLING */ +#ifdef FROZEN_STACKS /* TRAIL */ + /* avoid frozen segments */ + if ( +#ifdef YAPOR_SBA + (ADDR) pt1 >= HeapTop +#else + IN_BETWEEN(LOCAL_TrailBase, pt1, (ADDR)CurrentTrailTop+MinTrailGap) +#endif /* YAPOR_SBA */ + ) + { + pt0 = (tr_fr_ptr) pt1; + goto failloop; + } else +#endif /* FROZEN_STACKS */ + if (IN_BETWEEN(H0,pt1,HR)) { + if (IsAttVar(pt1)) { + goto failloop; + } else if (*pt1 == (CELL)FunctorBigInt) { + Yap_CleanOpaqueVariable(pt1); + goto failloop; + } + } +#ifdef FROZEN_STACKS /* TRAIL */ + /* don't reset frozen variables */ + if (pt0 < TR_FZ) + goto failloop; +#endif + flags = *pt1; +#if MULTIPLE_STACKS + if (FlagOn(DBClMask, flags)) { + DBRef dbr = DBStructFlagsToDBStruct(pt1); + int erase; + + LOCK(dbr->lock); + DEC_DBREF_COUNT(dbr); + erase = (dbr->Flags & ErasedMask) && (dbr->ref_count == 0); + UNLOCK(dbr->lock); + if (erase) { + saveregs(); + Yap_ErDBE(dbr); + setregs(); + } + } else { + if (flags & LogUpdMask) { + if (flags & IndexMask) { + LogUpdIndex *cl = ClauseFlagsToLogUpdIndex(pt1); + int erase; +#if PARALLEL_YAP + PredEntry *ap = cl->ClPred; +#endif + + PELOCK(8,ap); + DEC_CLREF_COUNT(cl); + erase = (cl->ClFlags & ErasedMask) && !(cl->ClRefCount); + if (erase) { + saveregs(); + /* at this point, + we are the only ones accessing the clause, + hence we don't need to have a lock it */ + Yap_ErLogUpdIndex(cl); + setregs(); + } else if (cl->ClFlags & DirtyMask) { + saveregs(); + /* at this point, + we are the only ones accessing the clause, + hence we don't need to have a lock it */ + Yap_CleanUpIndex(cl); + setregs(); + } + UNLOCK(ap->PELock); + } else { + LogUpdClause *cl = ClauseFlagsToLogUpdClause(pt1); + int erase; +#if PARALLEL_YAP + PredEntry *ap = cl->ClPred; +#endif + /* BB support */ + if (ap) { + + PELOCK(9,ap); + DEC_CLREF_COUNT(cl); + erase = (cl->ClFlags & ErasedMask) && !(cl->ClRefCount); + if (erase) { + saveregs(); + /* at this point, + we are the only ones accessing the clause, + hence we don't need to have a lock it */ + Yap_ErLogUpdCl(cl); + setregs(); + } + UNLOCK(ap->PELock); + } + } + } else { + DynamicClause *cl = ClauseFlagsToDynamicClause(pt1); + int erase; + + LOCK(cl->ClLock); + DEC_CLREF_COUNT(cl); + erase = (cl->ClFlags & ErasedMask) && !(cl->ClRefCount); + UNLOCK(cl->ClLock); + if (erase) { + saveregs(); + /* at this point, + we are the only ones accessing the clause, + hence we don't need to have a lock it */ + Yap_ErCl(cl); + setregs(); + } + } + } +#else + ResetFlag(InUseMask, flags); + *pt1 = flags; + if (FlagOn((ErasedMask|DirtyMask), flags)) { + if (FlagOn(DBClMask, flags)) { + saveregs(); + Yap_ErDBE(DBStructFlagsToDBStruct(pt1)); + setregs(); + } else { + saveregs(); + if (flags & LogUpdMask) { + if (flags & IndexMask) { + if (FlagOn(ErasedMask, flags)) { + Yap_ErLogUpdIndex(ClauseFlagsToLogUpdIndex(pt1)); + } else { + Yap_CleanUpIndex(ClauseFlagsToLogUpdIndex(pt1)); + } + } else { + Yap_ErLogUpdCl(ClauseFlagsToLogUpdClause(pt1)); + } + } else { + Yap_ErCl(ClauseFlagsToDynamicClause(pt1)); + } + setregs(); + } + } +#endif + goto failloop; + } +#ifdef MULTI_ASSIGNMENT_VARIABLES + else /* if (IsApplTerm(d1)) */ { + CELL *pt = RepAppl(d1); + /* AbsAppl means */ + /* multi-assignment variable */ + /* so the next cell is the old value */ +#ifdef FROZEN_STACKS + --pt0; + pt[0] = TrailVal(pt0); +#else + pt[0] = TrailTerm(pt0-1); + pt0 -= 2; +#endif /* FROZEN_STACKS */ + goto failloop; + } +#endif + ENDD(d1); + ENDCACHE_TR(); + } + +#ifdef COROUTINING + NoStackFail: + BEGD(d0); +#ifdef SHADOW_S + Yap_REGS.S_ = SREG; +#endif + saveregs(); + d0 = interrupt_fail( PASS_REGS1 ); + setregs(); +#ifdef SHADOW_S + SREG = Yap_REGS.S_; +#endif + if (!d0) FAIL(); + JMPNext(); + ENDD(d0); + +#endif /* COROUTINING */ + ENDPBOp(); + + + +/************************************************************************\ +* Cut & Commit Instructions * +\************************************************************************/ + + /* cut */ + Op(cut, s); +#ifdef COROUTINING + CACHE_Y_AS_ENV(YREG); + check_stack(NoStackCut, HR); + ENDCACHE_Y_AS_ENV(); + do_cut: +#endif + SET_ASP(YREG, PREG->y_u.s.s); + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, s),Osbpp),l); + /* assume cut is always in stack */ + saveregs(); + prune((choiceptr)YREG[E_CB] PASS_REGS); + setregs(); + GONext(); + +#ifdef COROUTINING + NoStackCut: + PROCESS_INT(interrupt_cut, do_cut); +#endif + + ENDOp(); + + /* cut_t */ + /* cut_t does the same as cut */ + Op(cut_t, s); +#ifdef COROUTINING + CACHE_Y_AS_ENV(YREG); + check_stack(NoStackCutT, HR); + ENDCACHE_Y_AS_ENV(); + do_cut_t: +#endif + SET_ASP(YREG, PREG->y_u.s.s); + /* assume cut is always in stack */ + saveregs(); + prune((choiceptr)YREG[E_CB] PASS_REGS); + setregs(); + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, s),Osbpp),l); + GONext(); + +#ifdef COROUTINING + NoStackCutT: + PROCESS_INT(interrupt_cut_t, do_cut_t); +#endif + + ENDOp(); + + /* cut_e */ + Op(cut_e, s); +#ifdef COROUTINING + CACHE_Y_AS_ENV(YREG); + check_stack(NoStackCutE, HR); + ENDCACHE_Y_AS_ENV(); + do_cut_e: +#endif + SET_ASP(YREG, PREG->y_u.s.s); + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, s),Osbpp),l); + saveregs(); + prune((choiceptr)SREG[E_CB] PASS_REGS); + setregs(); + GONext(); + +#ifdef COROUTINING + NoStackCutE: + PROCESS_INT(interrupt_cut_e, do_cut_e); +#endif + + ENDOp(); + + /* save_b_x Xi */ + Op(save_b_x, x); + BEGD(d0); + d0 = PREG->y_u.x.x; +#if defined(YAPOR_SBA) && defined(FROZEN_STACKS) + XREG(d0) = MkIntegerTerm((Int)B); +#else + XREG(d0) = MkIntegerTerm(LCL0-(CELL *) (B)); +#endif /* YAPOR_SBA && FROZEN_STACKS */ + PREG = NEXTOP(PREG, x); + ENDD(d0); + GONext(); + ENDOp(); + + /* save_b_y Yi */ + Op(save_b_y, y); +#if defined(YAPOR_SBA) + INITIALIZE_PERMVAR(YREG+PREG->y_u.y.y,MkIntegerTerm((Int)B)); +#else + INITIALIZE_PERMVAR(YREG+PREG->y_u.y.y,MkIntegerTerm(LCL0-(CELL *)(B))); +#endif /* YAPOR_SBA*/ + PREG = NEXTOP(PREG, y); + GONext(); + ENDOp(); + + /* commit_b_x Xi */ + Op(commit_b_x, xps); +#ifdef COROUTINING + CACHE_Y_AS_ENV(YREG); + check_stack(NoStackCommitX, HR); + ENDCACHE_Y_AS_ENV(); + do_commit_b_x: +#endif + BEGD(d0); + d0 = XREG(PREG->y_u.xps.x); + deref_head(d0, commit_b_x_unk); + commit_b_x_nvar: + /* skip a void call and a label */ + SET_ASP(YREG, PREG->y_u.xps.s); + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xps),Osbpp),l); + { + choiceptr pt0; +#if defined(YAPOR_SBA) && defined(FROZEN_STACKS) + pt0 = (choiceptr)IntegerOfTerm(d0); +#else + pt0 = (choiceptr)(LCL0-IntegerOfTerm(d0)); +#endif /* YAPOR_SBA && FROZEN_STACKS */ + saveregs(); + prune(pt0 PASS_REGS); + setregs(); + } + GONext(); + + BEGP(pt1); + deref_body(d0, pt1, commit_b_x_unk, commit_b_x_nvar); + ENDP(pt1); + /* never cut to a variable */ + /* Abort */ + FAIL(); + ENDD(d0); + +#ifdef COROUTINING + /* Problem: have I got an environment or not? */ + NoStackCommitX: + PROCESS_INT(interrupt_commit_x, do_commit_b_x); +#endif + ENDOp(); + + /* commit_b_y Yi */ + Op(commit_b_y, yps); +#ifdef COROUTINING + CACHE_Y_AS_ENV(YREG); + check_stack(NoStackCommitY, HR); + ENDCACHE_Y_AS_ENV(); + do_commit_b_y: +#endif + BEGD(d0); + d0 = YREG[PREG->y_u.yps.y]; + deref_head(d0, commit_b_y_unk); + commit_b_y_nvar: + SET_ASP(YREG, PREG->y_u.yps.s); + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yps),Osbpp),l); + { + choiceptr pt0; +#if defined(YAPOR_SBA) && defined(FROZEN_STACKS) + pt0 = (choiceptr)IntegerOfTerm(d0); +#else + pt0 = (choiceptr)(LCL0-IntegerOfTerm(d0)); +#endif + saveregs(); + prune(pt0 PASS_REGS); + setregs(); + } + GONext(); + + BEGP(pt1); + deref_body(d0, pt1, commit_b_y_unk, commit_b_y_nvar); + ENDP(pt1); + /* never cut to a variable */ + /* Abort */ + FAIL(); + ENDD(d0); + +#ifdef COROUTINING + /* This is easier: I know there is an environment so I cannot do allocate */ + NoStackCommitY: + PROCESS_INT(interrupt_commit_y, do_commit_b_y); +#endif + ENDOp(); + +/************************************************************************* +* Call / Proceed instructions * +*************************************************************************/ + +/* Macros for stack trimming */ + + /* execute Label */ + BOp(execute, pp); + { + PredEntry *pt0; + CACHE_Y_AS_ENV(YREG); + pt0 = PREG->y_u.pp.p; +#ifndef NO_CHECKING + check_stack(NoStackExecute, HR); + goto skip_do_execute; +#endif + do_execute: + FETCH_Y_FROM_ENV(YREG); + pt0 = PREG->y_u.pp.p; + skip_do_execute: +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) { + low_level_trace(enter_pred,pt0,XREGS+1); + } +#endif /* LOW_LEVEL_TRACE */ + CACHE_A1(); + ALWAYS_LOOKAHEAD(pt0->OpcodeOfPred); + BEGD(d0); + d0 = (CELL)B; + PREG = pt0->CodeOfPred; + /* for profiler */ + save_pc(); + ENV_YREG[E_CB] = d0; + ENDD(d0); +#ifdef DEPTH_LIMIT + if (DEPTH <= MkIntTerm(1)) {/* I assume Module==0 is prolog */ + if (pt0->ModuleOfPred) { + if (DEPTH == MkIntTerm(0)) + FAIL(); + else DEPTH = RESET_DEPTH(); + } + } else if (pt0->ModuleOfPred) + DEPTH -= MkIntConstant(2); +#endif /* DEPTH_LIMIT */ + /* this is the equivalent to setting up the stack */ + ALWAYS_GONext(); + ALWAYS_END_PREFETCH(); + ENDCACHE_Y_AS_ENV(); + } + + NoStackExecute: + PROCESS_INT(interrupt_execute, do_execute); + + ENDBOp(); + + /* dexecute Label */ + /* joint deallocate and execute */ + BOp(dexecute, pp); +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) + low_level_trace(enter_pred,PREG->y_u.pp.p,XREGS+1); +#endif /* LOW_LEVEL_TRACER */ + CACHE_Y_AS_ENV(YREG); + { + PredEntry *pt0; + + CACHE_A1(); + pt0 = PREG->y_u.pp.p; +#ifndef NO_CHECKING + /* check stacks */ + check_stack(NoStackDExecute, HR); + goto skip_dexecute; +#endif + continue_dexecute: + FETCH_Y_FROM_ENV(YREG); + pt0 = PREG->y_u.pp.p; + skip_dexecute: +#ifdef DEPTH_LIMIT + if (DEPTH <= MkIntTerm(1)) {/* I assume Module==0 is primitives */ + if (pt0->ModuleOfPred) { + if (DEPTH == MkIntTerm(0)) + FAIL(); + else DEPTH = RESET_DEPTH(); + } + } else if (pt0->ModuleOfPred) + DEPTH -= MkIntConstant(2); +#endif /* DEPTH_LIMIT */ + PREG = pt0->CodeOfPred; + /* for profiler */ + save_pc(); + ALWAYS_LOOKAHEAD(pt0->OpcodeOfPred); + /* do deallocate */ + CPREG = (yamop *) ENV_YREG[E_CP]; + ENV_YREG = ENV = (CELL *) ENV_YREG[E_E]; +#ifdef FROZEN_STACKS + { + choiceptr top_b = PROTECT_FROZEN_B(B); +#ifdef YAPOR_SBA + if (ENV_YREG > (CELL *) top_b || ENV_YREG < HR) ENV_YREG = (CELL *) top_b; +#else + if (ENV_YREG > (CELL *) top_b) ENV_YREG = (CELL *) top_b; +#endif /* YAPOR_SBA */ + else ENV_YREG = (CELL *)((CELL)ENV_YREG + ENV_Size(CPREG)); + } +#else + if (ENV_YREG > (CELL *)B) { + ENV_YREG = (CELL *)B; + } + else { + ENV_YREG = (CELL *) ((CELL) ENV_YREG + ENV_Size(CPREG)); + } +#endif /* FROZEN_STACKS */ + WRITEBACK_Y_AS_ENV(); + /* setup GB */ + ENV_YREG[E_CB] = (CELL) B; + ALWAYS_GONext(); + ALWAYS_END_PREFETCH(); + } + ENDCACHE_Y_AS_ENV(); + + NoStackDExecute: + PROCESS_INT(interrupt_dexecute, continue_dexecute); + + ENDBOp(); + + BOp(fcall, Osbpp); + CACHE_Y_AS_ENV(YREG); + ENV_YREG[E_CP] = (CELL) CPREG; + ENV_YREG[E_E] = (CELL) ENV; +#ifdef DEPTH_LIMIT + ENV_YREG[E_DEPTH] = DEPTH; +#endif /* DEPTH_LIMIT */ + ENDCACHE_Y_AS_ENV(); + ENDBOp(); + + BOp(call, Osbpp); +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) { + low_level_trace(enter_pred,PREG->y_u.Osbpp.p,XREGS+1); + } +#endif /* LOW_LEVEL_TRACER */ + CACHE_Y_AS_ENV(YREG); + { + PredEntry *pt; + CACHE_A1(); + pt = PREG->y_u.Osbpp.p; +#ifndef NO_CHECKING + check_stack(NoStackCall, HR); + goto skip_call; +#endif + call_body: + /* external jump if we don;t want to creep */ + FETCH_Y_FROM_ENV(YREG); + pt = PREG->y_u.Osbpp.p; + skip_call: + ENV = ENV_YREG; + /* Try to preserve the environment */ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + PREG->y_u.Osbpp.s); + CPREG = NEXTOP(PREG, Osbpp); + ALWAYS_LOOKAHEAD(pt->OpcodeOfPred); + PREG = pt->CodeOfPred; + /* for profiler */ + save_pc(); +#ifdef DEPTH_LIMIT + if (DEPTH <= MkIntTerm(1)) {/* I assume Module==0 is primitives */ + if (pt->ModuleOfPred) { + if (DEPTH == MkIntTerm(0)) + FAIL(); + else DEPTH = RESET_DEPTH(); + } + } else if (pt->ModuleOfPred) + DEPTH -= MkIntConstant(2); +#endif /* DEPTH_LIMIT */ +#ifdef FROZEN_STACKS + { + choiceptr top_b = PROTECT_FROZEN_B(B); +#ifdef YAPOR_SBA + if (ENV_YREG > (CELL *) top_b || ENV_YREG < HR) ENV_YREG = (CELL *) top_b; +#else + if (ENV_YREG > (CELL *) top_b) ENV_YREG = (CELL *) top_b; +#endif /* YAPOR_SBA */ + } +#else + if (ENV_YREG > (CELL *) B) { + ENV_YREG = (CELL *) B; + } +#endif /* FROZEN_STACKS */ + WRITEBACK_Y_AS_ENV(); + /* setup GB */ + ENV_YREG[E_CB] = (CELL) B; +#ifdef YAPOR + SCH_check_requests(); +#endif /* YAPOR */ + ALWAYS_GONext(); + ALWAYS_END_PREFETCH(); + } + ENDCACHE_Y_AS_ENV(); + ENDBOp(); + + BOp(procceed, p); + CACHE_Y_AS_ENV(YREG); + ALWAYS_LOOKAHEAD(CPREG->opc); + PREG = CPREG; + /* for profiler */ + save_pc(); + ENV_YREG = ENV; +#ifdef DEPTH_LIMIT + DEPTH = ENV_YREG[E_DEPTH]; +#endif + WRITEBACK_Y_AS_ENV(); + ALWAYS_GONext(); + ALWAYS_END_PREFETCH(); + ENDCACHE_Y_AS_ENV(); + + NoStackCall: + PROCESS_INT(interrupt_call, call_body); + + ENDBOp(); + + Op(allocate, e); + CACHE_Y_AS_ENV(YREG); + PREG = NEXTOP(PREG, e); + ENV_YREG[E_CP] = (CELL) CPREG; + ENV_YREG[E_E] = (CELL) ENV; +#ifdef DEPTH_LIMIT + ENV_YREG[E_DEPTH] = DEPTH; +#endif /* DEPTH_LIMIT */ + ENV = ENV_YREG; + ENDCACHE_Y_AS_ENV(); + GONext(); + ENDOp(); + + Op(deallocate, p); + CACHE_Y_AS_ENV(YREG); + check_trail(TR); + PREG = NEXTOP(PREG, p); + /* other instructions do depend on S being set by deallocate + :-( */ + SREG = YREG; + CPREG = (yamop *) ENV_YREG[E_CP]; + ENV = ENV_YREG = (CELL *) ENV_YREG[E_E]; +#ifdef DEPTH_LIMIT + DEPTH = ENV_YREG[E_DEPTH]; +#endif /* DEPTH_LIMIT */ +#ifdef FROZEN_STACKS + { + choiceptr top_b = PROTECT_FROZEN_B(B); +#ifdef YAPOR_SBA + if (ENV_YREG > (CELL *) top_b || ENV_YREG < HR) ENV_YREG = (CELL *) top_b; +#else + if (ENV_YREG > (CELL *) top_b) ENV_YREG = (CELL *) top_b; +#endif /* YAPOR_SBA */ + else ENV_YREG = (CELL *)((CELL) ENV_YREG + ENV_Size(CPREG)); + } +#else + if (ENV_YREG > (CELL *) B) + ENV_YREG = (CELL *) B; + else + ENV_YREG = (CELL *) ((CELL) ENV_YREG + ENV_Size(CPREG)); +#endif /* FROZEN_STACKS */ + WRITEBACK_Y_AS_ENV(); +#ifndef NO_CHECKING + /* check stacks */ + check_stack(NoStackDeallocate, HR); +#endif + ENDCACHE_Y_AS_ENV(); + GONext(); + + NoStackDeallocate: + BEGD(d0); +#ifdef SHADOW_S + Yap_REGS.S_ = SREG; +#endif + saveregs(); + d0 = interrupt_deallocate( PASS_REGS1 ); + setregs(); +#ifdef SHADOW_S + SREG = Yap_REGS.S_; +#endif + if (!d0) FAIL(); + JMPNext(); + ENDD(d0); + ENDOp(); + +/********************************************** +* OPTYap instructions * +**********************************************/ + +#ifdef YAPOR +#include "or.insts.i" +#endif /* YAPOR */ +#ifdef TABLING +#include "tab.insts.i" +#include "tab.tries.insts.i" +#endif /* TABLING */ + + + +#ifdef BEAM + extern int eam_am(PredEntry *); + + Op(retry_eam, e); + printf("Aqui estou eu..................\n"); + if (!eam_am(2)) { + abort_eam("Falhei\n"); + FAIL(); + } + + goto procceed; + PREG = NEXTOP(PREG, e); + GONext(); + ENDOp(); + + Op(run_eam, os); + if (inp==-9000) { /* use indexing to find out valid alternatives */ + extern CELL *beam_ALTERNATIVES; + *beam_ALTERNATIVES= (CELL *) PREG->y_u.os.opcw; + beam_ALTERNATIVES++; + if (OLD_B!=B) goto fail; +#if PUSH_REGS + Yap_regp=old_regs; +#endif + return(0); + } + + saveregs(); + if (!eam_am((PredEntry *) PREG->y_u.os.s)) FAIL(); + setregs(); + + /* cut */ + BACKUP_B(); + while (POP_CHOICE_POINT(B->cp_b)) { + POP_EXECUTE(); + } + B = B->cp_b; /* cut_fail */ + HB = B->cp_h; /* cut_fail */ + RECOVER_B(); + + if (0) { register choiceptr ccp; + /* initialize ccp */ +#define NORM_CP(CP) ((choiceptr)(CP)) + + YREG = (CELL *) (NORM_CP(YREG) - 1); + ccp = NORM_CP(YREG); + store_yaam_reg_cpdepth(ccp); + ccp->cp_tr = TR; + ccp->cp_ap = BEAM_RETRY_CODE; + ccp->cp_h = HR; + ccp->cp_b = B; + ccp->cp_env= ENV; + ccp->cp_cp = CPREG; + B = ccp; + SET_BB(B); + } + goto procceed; + PREG = NEXTOP(PREG, os); + GONext(); + ENDOp(); +#endif + + + + +/************************************************************************\ +* Get Instructions * +\************************************************************************/ + + Op(get_x_var, xx); + BEGD(d0); + d0 = XREG(PREG->y_u.xx.xr); + XREG(PREG->y_u.xx.xl) = d0; + PREG = NEXTOP(PREG, xx); + ENDD(d0); + GONext(); + ENDOp(); + + Op(get_y_var, yx); + BEGD(d0); + BEGP(pt0); + pt0 = YREG + PREG->y_u.yx.y; + d0 = XREG(PREG->y_u.yx.x); + PREG = NEXTOP(PREG, yx); + INITIALIZE_PERMVAR(pt0,d0); + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(get_yy_var, yyxx); + CACHE_Y(YREG); + BEGD(d0); + BEGP(pt0); + pt0 = S_YREG + PREG->y_u.yyxx.y1; + d0 = XREG(PREG->y_u.yyxx.x1); + BEGD(d1); + BEGP(pt1); + pt1 = S_YREG + PREG->y_u.yyx.y2; + d1 = XREG(PREG->y_u.yyxx.x2); + PREG = NEXTOP(PREG, yyxx); + INITIALIZE_PERMVAR(pt0,d0); + INITIALIZE_PERMVAR(pt1,d1); + ENDP(pt1); + ENDD(d1); + GONext(); + ENDP(pt0); + ENDD(d0); + ENDCACHE_Y(); + ENDOp(); + + /* The code for get_x_val is hard to follow because I use a + * lot of jumps. The convention is that in the label + * gval_X_YREG X refers to the state of the first argument, and + * YREG to the state of the second argument */ + Op(get_x_val, xx); + BEGD(d0); + d0 = XREG(PREG->y_u.xx.xl); + deref_head(d0, gvalx_unk); + + /* d0 will keep the first argument */ + gvalx_nonvar: + /* first argument is bound */ + BEGD(d1); + d1 = XREG(PREG->y_u.xx.xr); + deref_head(d1, gvalx_nonvar_unk); + + gvalx_nonvar_nonvar: + /* both arguments are bound */ + /* we may have to bind structures */ + PREG = NEXTOP(PREG, xx); + UnifyBound(d0, d1); + + BEGP(pt0); + /* deref second argument */ + deref_body(d1, pt0, gvalx_nonvar_unk, gvalx_nonvar_nonvar); + /* first argument bound, second unbound */ + PREG = NEXTOP(PREG, xx); + YapBind(pt0, d0); + GONext(); + + ENDP(pt0); + ENDD(d1); + + BEGP(pt0); + /* first argument may be unbound */ + deref_body(d0, pt0, gvalx_unk, gvalx_nonvar); + /* first argument is unbound and in pt0 and in d0 */ + BEGD(d1); + d1 = XREG(PREG->y_u.xx.xr); + deref_head(d1, gvalx_var_unk); + + gvalx_var_nonvar: + /* first unbound, second bound */ + PREG = NEXTOP(PREG, xx); + YapBind(pt0, d1); + GONext(); + + BEGP(pt1); + deref_body(d1, pt1, gvalx_var_unk, gvalx_var_nonvar); + /* both arguments are unbound */ + PREG = NEXTOP(PREG, xx); + UnifyCells(pt0, pt1); + GONext(); + ENDP(pt1); + ENDD(d1); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + /* The code for get_y_val mostly uses the code for get_x_val + */ + + Op(get_y_val, yx); + BEGD(d0); + BEGD(d1); + BEGP(pt0); + pt0 = YREG + PREG->y_u.yx.y; + d0 = *pt0; + + /* From now on, it's just a copy of the code for get_x_val */ + + deref_head(d0, gvaly_unk); + gvaly_nonvar: + + /* first argument is bound */ + d1 = XREG(PREG->y_u.yx.x); + deref_head(d1, gvaly_nonvar_unk); + gvaly_nonvar_nonvar: + + /* both arguments are bound */ + /* we may have to bind structures */ + PREG = NEXTOP(PREG, yx); + UnifyBound(d0, d1); + + BEGP(pt1); + /* deref second argument */ + deref_body(d1, pt1, gvaly_nonvar_unk, gvaly_nonvar_nonvar); + /* first argument bound, second unbound */ + PREG = NEXTOP(PREG, yx); + YapBind(pt1, d0); + GONext(); + ENDP(pt1); + + + /* first argument may be unbound */ + derefa_body(d0, pt0, gvaly_unk, gvaly_nonvar); + /* first argument is unbound */ + d1 = XREG(PREG->y_u.yx.x); + deref_head(d1, gvaly_var_unk); + + gvaly_var_nonvar: + /* first unbound, second bound */ + PREG = NEXTOP(PREG, yx); + YapBind(pt0, d1); + GONext(); + + BEGP(pt1); + deref_body(d1, pt1, gvaly_var_unk, gvaly_var_nonvar); + /* both arguments are unbound */ + PREG = NEXTOP(PREG, yx); + UnifyCells(pt0, pt1); + GONext(); + ENDP(pt1); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(get_atom, xc); + BEGD(d0); + BEGD(d1); + /* fetch arguments */ + d0 = XREG(PREG->y_u.xc.x); + d1 = PREG->y_u.xc.c; + + BEGP(pt0); + deref_head(d0, gatom_unk); + /* argument is nonvar */ + gatom_nonvar: + if (d0 == d1) { + PREG = NEXTOP(PREG, xc); + GONext(); + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_unk, gatom_nonvar); + /* argument is a variable */ + PREG = NEXTOP(PREG, xc); + YapBind(pt0, d1); + GONext(); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(get_atom_exo, x); + BEGD(d0); + BEGD(d1); + /* fetch arguments */ + d0 = XREG(PREG->y_u.x.x); + d1 = *SREG; + SREG++; + + BEGP(pt0); + deref_head(d0, gatom_exo_unk); + /* argument is nonvar */ + gatom_exo_nonvar: + if (d0 == d1) { + PREG = NEXTOP(PREG, x); + GONext(); + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_exo_unk, gatom_exo_nonvar); + /* argument is a variable */ + pt0 = (CELL *)d0; + PREG = NEXTOP(PREG, x); + YapBind(pt0, d1); + GONext(); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(get_2atoms, cc); + BEGD(d0); + BEGD(d1); + /* fetch arguments */ + d0 = ARG1; + + BEGP(pt0); + deref_head(d0, gatom_2unk); + /* argument is nonvar */ + gatom_2nonvar: + if (d0 == PREG->y_u.cc.c1) { + goto gatom_2b; + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_2unk, gatom_2nonvar); + /* argument is a variable */ + YapBind(pt0, PREG->y_u.cc.c1); + ENDP(pt0); + gatom_2b: + /* fetch arguments */ + d0 = ARG2; + d1 = PREG->y_u.cc.c2; + + BEGP(pt0); + deref_head(d0, gatom_2bunk); + /* argument is nonvar */ + gatom_2bnonvar: + if (d0 == d1) { + PREG = NEXTOP(PREG, cc); + GONext(); + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_2bunk, gatom_2bnonvar); + /* argument is a variable */ + PREG = NEXTOP(PREG, cc); + YapBind(pt0, d1); + GONext(); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(get_3atoms, ccc); + BEGD(d0); + BEGD(d1); + /* fetch arguments */ + d0 = ARG1; + + BEGP(pt0); + deref_head(d0, gatom_3unk); + /* argument is nonvar */ + gatom_3nonvar: + if (d0 == PREG->y_u.ccc.c1) { + goto gatom_3b; + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_3unk, gatom_3nonvar); + /* argument is a variable */ + YapBind(pt0, PREG->y_u.ccc.c1); + ENDP(pt0); + gatom_3b: + /* fetch arguments */ + d0 = ARG2; + + BEGP(pt0); + deref_head(d0, gatom_3bunk); + /* argument is nonvar */ + gatom_3bnonvar: + if (d0 == PREG->y_u.ccc.c2) { + goto gatom_3c; + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_3bunk, gatom_3bnonvar); + /* argument is a variable */ + YapBind(pt0, PREG->y_u.ccc.c2); + ENDP(pt0); + gatom_3c: + /* fetch arguments */ + d0 = ARG3; + d1 = PREG->y_u.ccc.c3; + + BEGP(pt0); + deref_head(d0, gatom_3cunk); + /* argument is nonvar */ + gatom_3cnonvar: + if (d0 == d1) { + PREG = NEXTOP(PREG, ccc); + GONext(); + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_3cunk, gatom_3cnonvar); + /* argument is a variable */ + PREG = NEXTOP(PREG, ccc); + YapBind(pt0, d1); + GONext(); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(get_4atoms, cccc); + BEGD(d0); + BEGD(d1); + /* fetch arguments */ + d0 = ARG1; + + BEGP(pt0); + deref_head(d0, gatom_4unk); + /* argument is nonvar */ + gatom_4nonvar: + if (d0 == PREG->y_u.cccc.c1) { + goto gatom_4b; + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_4unk, gatom_4nonvar); + /* argument is a variable */ + YapBind(pt0, PREG->y_u.cccc.c1); + ENDP(pt0); + gatom_4b: + /* fetch arguments */ + d0 = ARG2; + + BEGP(pt0); + deref_head(d0, gatom_4bunk); + /* argument is nonvar */ + gatom_4bnonvar: + if (d0 == PREG->y_u.cccc.c2) { + goto gatom_4c; + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_4bunk, gatom_4bnonvar); + /* argument is a variable */ + YapBind(pt0, PREG->y_u.cccc.c2); + ENDP(pt0); + gatom_4c: + /* fetch arguments */ + d0 = ARG3; + + BEGP(pt0); + deref_head(d0, gatom_4cunk); + /* argument is nonvar */ + gatom_4cnonvar: + if (d0 == PREG->y_u.cccc.c3) { + goto gatom_4d; + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_4cunk, gatom_4cnonvar); + /* argument is a variable */ + YapBind(pt0, PREG->y_u.cccc.c3); + ENDP(pt0); + gatom_4d: + /* fetch arguments */ + d0 = ARG4; + d1 = PREG->y_u.cccc.c4; + + BEGP(pt0); + deref_head(d0, gatom_4dunk); + /* argument is nonvar */ + gatom_4dnonvar: + if (d0 == d1) { + PREG = NEXTOP(PREG, cccc); + GONext(); + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_4dunk, gatom_4dnonvar); + /* argument is a variable */ + PREG = NEXTOP(PREG, cccc); + YapBind(pt0, d1); + GONext(); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(get_5atoms, ccccc); + BEGD(d0); + BEGD(d1); + /* fetch arguments */ + d0 = ARG1; + + BEGP(pt0); + deref_head(d0, gatom_5unk); + /* argument is nonvar */ + gatom_5nonvar: + if (d0 == PREG->y_u.ccccc.c1) { + goto gatom_5b; + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_5unk, gatom_5nonvar); + /* argument is a variable */ + YapBind(pt0, PREG->y_u.ccccc.c1); + ENDP(pt0); + gatom_5b: + /* fetch arguments */ + d0 = ARG2; + + BEGP(pt0); + deref_head(d0, gatom_5bunk); + /* argument is nonvar */ + gatom_5bnonvar: + if (d0 == PREG->y_u.ccccc.c2) { + goto gatom_5c; + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_5bunk, gatom_5bnonvar); + /* argument is a variable */ + YapBind(pt0, PREG->y_u.ccccc.c2); + ENDP(pt0); + gatom_5c: + /* fetch arguments */ + d0 = ARG3; + + BEGP(pt0); + deref_head(d0, gatom_5cunk); + /* argument is nonvar */ + gatom_5cnonvar: + if (d0 == PREG->y_u.ccccc.c3) { + goto gatom_5d; + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_5cunk, gatom_5cnonvar); + /* argument is a variable */ + YapBind(pt0, PREG->y_u.ccccc.c3); + ENDP(pt0); + gatom_5d: + /* fetch arguments */ + d0 = ARG4; + + BEGP(pt0); + deref_head(d0, gatom_5dunk); + /* argument is nonvar */ + gatom_5dnonvar: + if (d0 == PREG->y_u.ccccc.c4) { + goto gatom_5e; + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_5dunk, gatom_5dnonvar); + /* argument is a variable */ + YapBind(pt0, PREG->y_u.ccccc.c4); + ENDP(pt0); + gatom_5e: + /* fetch arguments */ + d0 = ARG5; + d1 = PREG->y_u.ccccc.c5; + + BEGP(pt0); + deref_head(d0, gatom_5eunk); + /* argument is nonvar */ + gatom_5enonvar: + if (d0 == d1) { + PREG = NEXTOP(PREG, ccccc); + GONext(); + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_5eunk, gatom_5enonvar); + /* argument is a variable */ + PREG = NEXTOP(PREG, ccccc); + YapBind(pt0, d1); + GONext(); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(get_6atoms, cccccc); + BEGD(d0); + BEGD(d1); + /* fetch arguments */ + d0 = ARG1; + + BEGP(pt0); + deref_head(d0, gatom_6unk); + /* argument is nonvar */ + gatom_6nonvar: + if (d0 == PREG->y_u.cccccc.c1) { + goto gatom_6b; + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_6unk, gatom_6nonvar); + /* argument is a variable */ + YapBind(pt0, PREG->y_u.cccccc.c1); + ENDP(pt0); + gatom_6b: + /* fetch arguments */ + d0 = ARG2; + + BEGP(pt0); + deref_head(d0, gatom_6bunk); + /* argument is nonvar */ + gatom_6bnonvar: + if (d0 == PREG->y_u.cccccc.c2) { + goto gatom_6c; + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_6bunk, gatom_6bnonvar); + /* argument is a variable */ + YapBind(pt0, PREG->y_u.cccccc.c2); + ENDP(pt0); + gatom_6c: + /* fetch arguments */ + d0 = ARG3; + + BEGP(pt0); + deref_head(d0, gatom_6cunk); + /* argument is nonvar */ + gatom_6cnonvar: + if (d0 == PREG->y_u.cccccc.c3) { + goto gatom_6d; + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_6cunk, gatom_6cnonvar); + /* argument is a variable */ + YapBind(pt0, PREG->y_u.cccccc.c3); + ENDP(pt0); + gatom_6d: + /* fetch arguments */ + d0 = ARG4; + + BEGP(pt0); + deref_head(d0, gatom_6dunk); + /* argument is nonvar */ + gatom_6dnonvar: + if (d0 == PREG->y_u.cccccc.c4) { + goto gatom_6e; + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_6dunk, gatom_6dnonvar); + /* argument is a variable */ + YapBind(pt0, PREG->y_u.cccccc.c4); + ENDP(pt0); + gatom_6e: + /* fetch arguments */ + d0 = ARG5; + + BEGP(pt0); + deref_head(d0, gatom_6eunk); + /* argument is nonvar */ + gatom_6enonvar: + if (d0 == PREG->y_u.cccccc.c5) { + goto gatom_6f; + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_6eunk, gatom_6enonvar); + /* argument is a variable */ + YapBind(pt0, PREG->y_u.cccccc.c5); + ENDP(pt0); + gatom_6f: + /* fetch arguments */ + d0 = ARG6; + d1 = PREG->y_u.cccccc.c6; + + BEGP(pt0); + deref_head(d0, gatom_6funk); + /* argument is nonvar */ + gatom_6fnonvar: + if (d0 == d1) { + PREG = NEXTOP(PREG, cccccc); + GONext(); + } + else { + FAIL(); + } + + deref_body(d0, pt0, gatom_6funk, gatom_6fnonvar); + /* argument is a variable */ + PREG = NEXTOP(PREG, cccccc); + YapBind(pt0, d1); + GONext(); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + /* The next instructions can lead to either the READ stream + * or the write stream */ + + OpRW(get_list, x); + BEGD(d0); + d0 = XREG(PREG->y_u.x.x); + deref_head(d0, glist_unk); + + glist_nonvar: + /* did we find a list? */ + if (!IsPairTerm(d0)) { + FAIL(); + } + START_PREFETCH(x); + PREG = NEXTOP(PREG, x); + /* enter read mode */ + SREG = RepPair(d0); + GONext(); + END_PREFETCH(); + + BEGP(pt0); + deref_body(d0, pt0, glist_unk, glist_nonvar); + /* glist var */ + /* enter write mode */ + CACHE_S(); + S_SREG = HR; + START_PREFETCH_W(x); + PREG = NEXTOP(PREG, x); + BEGD(d0); + d0 = AbsPair(S_SREG); + YapBind(pt0, d0); + S_SREG = HR; + /* don't put an ENDD just after a label */ + HR = S_SREG + 2; + ENDD(d0); + WRITEBACK_S(S_SREG); + GONextW(); + + + END_PREFETCH_W(); + ENDCACHE_S(); + ENDP(pt0); + + ENDD(d0); + ENDOpRW(); + + OpRW(get_struct, xfa); + BEGD(d0); + d0 = XREG(PREG->y_u.xfa.x); + deref_head(d0, gstruct_unk); + + gstruct_nonvar: + if (!IsApplTerm(d0)) + FAIL(); + /* we have met a compound term */ + START_PREFETCH(xfa); + CACHE_S(); + S_SREG = RepAppl(d0); + /* check functor */ + d0 = (CELL) (PREG->y_u.xfa.f); + if (*S_SREG != d0) { + FAIL(); + } + WRITEBACK_S(S_SREG+1); + ENDCACHE_S(); + PREG = NEXTOP(PREG, xfa); + /* enter read mode */ + GONext(); + END_PREFETCH(); + + BEGP(pt0); + deref_body(d0, pt0, gstruct_unk, gstruct_nonvar); + /* Enter Write mode */ + /* set d1 to be the new structure we are going to create */ + START_PREFETCH_W(xfa); + BEGD(d1); + d1 = AbsAppl(HR); + YapBind(pt0, d1); + /* now, set pt0 to point to the heap where we are going to + * build our term */ + pt0 = HR; + ENDD(d1); + /* first, put the functor */ + d0 = (CELL) (PREG->y_u.xfa.f); + *pt0++ = d0; + HR = pt0 + PREG->y_u.xfa.a; + PREG = NEXTOP(PREG, xfa); + /* set SREG */ + SREG = pt0; + /* update HR */ + GONextW(); + END_PREFETCH_W(); + ENDP(pt0); + + ENDD(d0); + ENDOpRW(); + + Op(get_float, xd); + BEGD(d0); + d0 = XREG(PREG->y_u.xd.x); + deref_head(d0, gfloat_unk); + + gfloat_nonvar: + if (!IsApplTerm(d0)) + FAIL(); + /* we have met a preexisting float */ + START_PREFETCH(xd); + BEGP(pt0); + pt0 = RepAppl(d0); + /* check functor */ + if (*pt0 != (CELL)FunctorDouble) { + FAIL(); + } + BEGP(pt1); + pt1 = PREG->y_u.xd.d; + PREG = NEXTOP(PREG, xd); + if ( + pt1[1] != pt0[1] +#if SIZEOF_DOUBLE == 2*SIZEOF_INT_P + || pt1[2] != pt0[2] +#endif + ) FAIL(); + ENDP(pt1); + ENDP(pt0); + /* enter read mode */ + GONext(); + END_PREFETCH(); + + BEGP(pt0); + deref_body(d0, pt0, gfloat_unk, gfloat_nonvar); + /* Enter Write mode */ + /* set d1 to be the new structure we are going to create */ + START_PREFETCH(xc); + BEGD(d1); + d1 = AbsAppl(PREG->y_u.xd.d); + PREG = NEXTOP(PREG, xd); + YapBind(pt0, d1); + GONext(); + ENDD(d1); + END_PREFETCH(); + ENDP(pt0); + + ENDD(d0); + ENDOp(); + + Op(get_string, xu); + BEGD(d0); + d0 = XREG(PREG->y_u.xu.x); + deref_head(d0, gstring_unk); + + gstring_nonvar: + if (!IsApplTerm(d0)) + FAIL(); + /* we have met a preexisting string */ + START_PREFETCH(xu); + BEGP(pt0); + pt0 = RepAppl(d0); + /* check functor */ + if (*pt0 != (CELL)FunctorString) { + FAIL(); + } + BEGP(pt1); + pt1 = RepAppl(PREG->y_u.xu.ut); + PREG = NEXTOP(PREG, xu); + if ( + pt1[1] != pt0[1] || + strcmp((const char *)(pt1+2), (const char *)(pt0+2)) + ) FAIL(); + ENDP(pt1); + ENDP(pt0); + /* enter read mode */ + GONext(); + END_PREFETCH(); + + BEGP(pt0); + deref_body(d0, pt0, gstring_unk, gstring_nonvar); + /* Enter Write mode */ + /* set d1 to be the new structure we are going to create */ + START_PREFETCH(xc); + BEGD(d1); + d1 = PREG->y_u.xu.ut; + PREG = NEXTOP(PREG, xu); + YapBind(pt0, d1); + GONext(); + ENDD(d1); + END_PREFETCH(); + ENDP(pt0); + + ENDD(d0); + ENDOp(); + + Op(get_longint, xi); + BEGD(d0); + d0 = XREG(PREG->y_u.xi.x); + deref_head(d0, glongint_unk); + + glongint_nonvar: + if (!IsApplTerm(d0)) + FAIL(); + /* we have met a preexisting longint */ + START_PREFETCH(xi); + BEGP(pt0); + pt0 = RepAppl(d0); + /* check functor */ + if (*pt0 != (CELL)FunctorLongInt) { + FAIL(); + } + if (PREG->y_u.xi.i[1] != (CELL)pt0[1]) FAIL(); + ENDP(pt0); + PREG = NEXTOP(PREG, xi); + /* enter read mode */ + GONext(); + END_PREFETCH(); + + BEGP(pt0); + deref_body(d0, pt0, glongint_unk, glongint_nonvar); + /* Enter Write mode */ + /* set d1 to be the new structure we are going to create */ + START_PREFETCH(xi); + BEGD(d1); + d1 = AbsAppl(PREG->y_u.xi.i); + PREG = NEXTOP(PREG, xi); + YapBind(pt0, d1); + GONext(); + ENDD(d1); + END_PREFETCH(); + ENDP(pt0); + + ENDD(d0); + ENDOp(); + + Op(get_bigint, xN); +#ifdef USE_GMP + BEGD(d0); + d0 = XREG(PREG->y_u.xN.x); + deref_head(d0, gbigint_unk); + + gbigint_nonvar: + if (!IsApplTerm(d0)) + FAIL(); + /* we have met a preexisting bigint */ + START_PREFETCH(xN); + BEGP(pt0); + pt0 = RepAppl(d0); + /* check functor */ + if (*pt0 != (CELL)FunctorBigInt) + { + FAIL(); + } + if (Yap_gmp_tcmp_big_big(d0,PREG->y_u.xN.b)) + FAIL(); + PREG = NEXTOP(PREG, xN); + ENDP(pt0); + /* enter read mode */ + GONext(); + END_PREFETCH(); + + BEGP(pt0); + deref_body(d0, pt0, gbigint_unk, gbigint_nonvar); + /* Enter Write mode */ + /* set d1 to be the new structure we are going to create */ + START_PREFETCH(xN); + BEGD(d1); + d1 = PREG->y_u.xN.b; + PREG = NEXTOP(PREG, xN); + YapBind(pt0, d1); + GONext(); + ENDD(d1); + END_PREFETCH(); + ENDP(pt0); + + ENDD(d0); +#else + FAIL(); +#endif + ENDOp(); + + + Op(get_dbterm, xD); + BEGD(d0); + d0 = XREG(PREG->y_u.xD.x); + deref_head(d0, gdbterm_unk); + + gdbterm_nonvar: + BEGD(d1); + /* we have met a preexisting dbterm */ + d1 = PREG->y_u.xD.D; + PREG = NEXTOP(PREG, xD); + UnifyBound(d0,d1); + ENDD(d1); + + BEGP(pt0); + deref_body(d0, pt0, gdbterm_unk, gdbterm_nonvar); + /* Enter Write mode */ + /* set d1 to be the new structure we are going to create */ + START_PREFETCH(xD); + BEGD(d1); + d1 = PREG->y_u.xD.D; + PREG = NEXTOP(PREG, xD); + YapBind(pt0, d1); + GONext(); + ENDD(d1); + END_PREFETCH(); + ENDP(pt0); + + ENDD(d0); + ENDOp(); + +/************************************************************************\ +* Optimised Get List Instructions * +\************************************************************************/ + OpRW(glist_valx, xx); + BEGD(d0); + d0 = XREG(PREG->y_u.xx.xl); + deref_head(d0, glist_valx_write); + glist_valx_read: + BEGP(pt0); + /* did we find a list? */ + if (!IsPairTerm(d0)) + FAIL(); + /* enter read mode */ + START_PREFETCH(xx); + pt0 = RepPair(d0); + SREG = pt0 + 1; + /* start unification with first argument */ + d0 = *pt0; + deref_head(d0, glist_valx_unk); + + /* first argument is in d0 */ + glist_valx_nonvar: + /* first argument is bound */ + BEGD(d1); + d1 = XREG(PREG->y_u.xx.xr); + deref_head(d1, glist_valx_nonvar_unk); + + glist_valx_nonvar_nonvar: + /* both arguments are bound */ + /* we may have to bind structures */ + PREG = NEXTOP(PREG, xx); + UnifyBound(d0, d1); + + BEGP(pt1); + /* deref second argument */ + deref_body(d1, pt1, glist_valx_nonvar_unk, glist_valx_nonvar_nonvar); + /* head bound, argument unbound */ + PREG = NEXTOP(PREG, xx); + YapBind(pt1, d0); + GONext(); + ENDP(pt1); + + + ENDD(d1); + + /* head may be unbound */ + derefa_body(d0, pt0, glist_valx_unk, glist_valx_nonvar); + /* head is unbound, pt0 has the value */ + d0 = XREG(PREG->y_u.xx.xr); + deref_head(d0, glist_valx_var_unk); + + glist_valx_var_nonvar: + /* head is unbound, second arg bound */ + PREG = NEXTOP(PREG, xx); + Bind_Global(pt0, d0); + GONext(); + + BEGP(pt1); + deref_body(d0, pt1, glist_valx_var_unk, glist_valx_var_nonvar); + /* head and second argument are unbound */ + PREG = NEXTOP(PREG, xx); + UnifyGlobalCellToCell(pt0, pt1); + GONext(); + ENDP(pt1); + ENDP(pt0); + END_PREFETCH(); + + BEGP(pt0); + deref_body(d0, pt0, glist_valx_write, glist_valx_read); + CACHE_S(); + /* enter write mode */ + S_SREG = HR; + BEGD(d1); + d1 = XREG(PREG->y_u.xx.xr); + d0 = AbsPair(S_SREG); + S_SREG[0] = d1; + ENDD(d1); + ALWAYS_START_PREFETCH_W(xx); + PREG = NEXTOP(PREG, xx); + HR = S_SREG + 2; + WRITEBACK_S(S_SREG+1); + YapBind(pt0, d0); + ALWAYS_GONextW(); + ALWAYS_END_PREFETCH_W(); + ENDCACHE_S(); + ENDP(pt0); + + ENDD(d0); + ENDOpRW(); + + OpRW(glist_valy, yx); + BEGD(d0); + d0 = XREG(PREG->y_u.yx.x); + deref_head(d0, glist_valy_write); + glist_valy_read: + BEGP(pt0); + /* did we find a list? */ + if (!IsPairTerm(d0)) + FAIL(); + START_PREFETCH(yx); + /* enter read mode */ + pt0 = RepPair(d0); + SREG = pt0 + 1; + /* start unification with first argument */ + d0 = *pt0; + deref_head(d0, glist_valy_unk); + + glist_valy_nonvar: + /* first argument is bound */ + BEGD(d1); + BEGP(pt1); + pt1 = YREG + PREG->y_u.yx.y; + d1 = *pt1; + PREG = NEXTOP(PREG, yx); + deref_head(d1, glist_valy_nonvar_unk); + + glist_valy_nonvar_nonvar: + /* both arguments are bound */ + /* we may have to bind structures */ + SREG = pt0 + 1; + UnifyBound(d0, d1); + + /* deref second argument */ + derefa_body(d1, pt1, glist_valy_nonvar_unk, glist_valy_nonvar_nonvar); + /* first argument bound, second unbound */ + YapBind(pt1, d0); + GONext(); + + + ENDP(pt1); + + /* first argument may be unbound */ + derefa_body(d0, pt0, glist_valy_unk, glist_valy_nonvar); + /* first argument is unbound */ + BEGP(pt1); + pt1 = YREG+PREG->y_u.yx.y; + d1 = *pt1; + deref_head(d1, glist_valy_var_unk); + glist_valy_var_nonvar: + /* first unbound, second bound */ + PREG = NEXTOP(PREG, yx); + Bind_Global(pt0, d1); + GONext(); + + derefa_body(d1, pt1, glist_valy_var_unk, glist_valy_var_nonvar); + /* both arguments are unbound */ + PREG = NEXTOP(PREG, yx); + UnifyGlobalCellToCell(pt0, pt1); + GONext(); + ENDP(pt1); + ENDD(d1); + + END_PREFETCH(); + ENDP(pt0); + + BEGP(pt0); + deref_body(d0, pt0, glist_valy_write, glist_valy_read); + /* enter write mode */ + START_PREFETCH_W(yx); + BEGP(pt1); + pt1 = HR; + d0 = AbsPair(pt1); + YapBind(pt0, d0); + BEGD(d0); + /* include XREG on it */ + d0 = YREG[PREG->y_u.yx.y]; + pt1[0] = d0; + ENDD(d0); + HR = pt1 + 2; + SREG = pt1 + 1; + ENDP(pt1); + PREG = NEXTOP(PREG, yx); + GONextW(); + END_PREFETCH_W(); + ENDP(pt0); + + ENDD(d0); + ENDOpRW(); + + Op(gl_void_varx, xx); + BEGD(d0); + d0 = XREG(PREG->y_u.xx.xl); + deref_head(d0, glist_void_varx_write); + glist_void_varx_read: + /* did we find a list? */ + if (!IsPairTerm(d0)) + FAIL(); + ALWAYS_START_PREFETCH(xx); + /* enter read mode */ + BEGP(pt0); + pt0 = RepPair(d0); + d0 = pt0[1]; + XREG(PREG->y_u.xx.xr) = d0; + PREG = NEXTOP(PREG, xx); + ALWAYS_GONext(); + ENDP(pt0); + ALWAYS_END_PREFETCH(); + + BEGP(pt0); + deref_body(d0, pt0, glist_void_varx_write, glist_void_varx_read); + /* enter write mode */ + BEGP(pt1); + pt1 = HR; + /* include XREG on it */ + XREG(PREG->y_u.xx.xr) = + Unsigned(pt1 + 1); + RESET_VARIABLE(pt1); + RESET_VARIABLE(pt1+1); + HR = pt1 + 2; + BEGD(d0); + d0 = AbsPair(pt1); + YapBind(pt0, d0); + PREG = NEXTOP(PREG, xx); + ENDD(d0); + ENDP(pt1); + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(gl_void_vary, yx); + BEGD(d0); + d0 = XREG(PREG->y_u.yx.x); + deref_head(d0, glist_void_vary_write); + glist_void_vary_read: + /* did we find a list? */ + if (!IsPairTerm(d0)) + FAIL(); + /* enter read mode */ + BEGP(pt0); + pt0 = RepPair(d0); + d0 = pt0[1]; + ENDP(pt0); + INITIALIZE_PERMVAR(YREG+PREG->y_u.yx.y,d0); + PREG = NEXTOP(PREG, yx); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, glist_void_vary_write, glist_void_vary_read); + /* enter write mode */ + BEGP(pt1); + pt1 = HR; + /* include XREG on it */ + INITIALIZE_PERMVAR(YREG+PREG->y_u.yx.y,Unsigned(pt1 + 1)); + PREG = NEXTOP(PREG, yx); + RESET_VARIABLE(pt1); + RESET_VARIABLE(pt1+1); + d0 = AbsPair(pt1); + HR = pt1 + 2; + YapBind(pt0, d0); + GONext(); + ENDP(pt1); + ENDP(pt0); + + ENDD(d0); + ENDOp(); + + Op(gl_void_valx, xx); + BEGD(d0); + d0 = XREG(PREG->y_u.xx.xl); + deref_head(d0, glist_void_valx_write); + glist_void_valx_read: + BEGP(pt0); + /* did we find a list? */ + if (!IsPairTerm(d0)) + FAIL(); + /* enter read mode */ + pt0 = RepPair(d0)+1; + /* start unification with first argument */ + d0 = *pt0; + deref_head(d0, glist_void_valx_unk); + + glist_void_valx_nonvar: + /* first argument is bound */ + BEGD(d1); + d1 = XREG(PREG->y_u.xx.xr); + deref_head(d1, glist_void_valx_nonvar_unk); + + glist_void_valx_nonvar_nonvar: + /* both arguments are bound */ + /* we may have to bind structures */ + PREG = NEXTOP(PREG, xx); + UnifyBound(d0, d1); + + /* deref second argument */ + BEGP(pt1); + deref_body(d1, pt1, glist_void_valx_nonvar_unk, glist_void_valx_nonvar_nonvar); + /* first argument bound, second unbound */ + PREG = NEXTOP(PREG, xx); + YapBind(pt1, d0); + GONext(); + ENDP(pt1); + ENDD(d1); + + /* first argument may be unbound */ + derefa_body(d0, pt0, glist_void_valx_unk, glist_void_valx_nonvar); + /* first argument is unbound */ + BEGD(d1); + d1 = XREG(PREG->y_u.xx.xr); + deref_head(d1, glist_void_valx_var_unk); + + glist_void_valx_var_nonvar: + /* first unbound, second bound */ + PREG = NEXTOP(PREG, xx); + Bind_Global(pt0, d1); + GONext(); + + BEGP(pt1); + deref_body(d1, pt1, glist_void_valx_var_unk, glist_void_valx_var_nonvar); + /* both arguments are unbound */ + PREG = NEXTOP(PREG, xx); + UnifyGlobalCellToCell(pt0, pt1); + GONext(); + ENDP(pt1); + ENDD(d1); + ENDP(pt0); + + BEGP(pt0); + deref_body(d0, pt0, glist_void_valx_write, glist_void_valx_read); + /* enter write mode */ + BEGP(pt1); + pt1 = HR; + d0 = AbsPair(pt1); + YapBind(pt0, d0); + pt1 = HR; + BEGD(d0); + /* include XREG on it */ + d0 = XREG(PREG->y_u.xx.xr); + RESET_VARIABLE(pt1); + pt1[1] = d0; + HR = pt1 + 2; + ENDD(d0); + ENDP(pt1); + PREG = NEXTOP(PREG, xx); + GONext(); + ENDP(pt0); + + ENDD(d0); + ENDOp(); + + Op(gl_void_valy, yx); + BEGD(d0); + d0 = XREG(PREG->y_u.yx.x); + deref_head(d0, glist_void_valy_write); + glist_void_valy_read: + BEGP(pt0); + /* did we find a list? */ + if (!IsPairTerm(d0)) + FAIL(); + /* enter read mode */ + pt0 = RepPair(d0)+1; + /* start unification with first argument */ + d0 = *pt0; + deref_head(d0, glist_void_valy_unk); + + glist_void_valy_nonvar: + /* first argument is bound */ + BEGD(d1); + BEGP(pt1); + pt1 = YREG+PREG->y_u.yx.y; + d1 = *pt1; + deref_head(d1, glist_void_valy_nonvar_unk); + + glist_void_valy_nonvar_nonvar: + /* both arguments are bound */ + /* we may have to bind structures */ + PREG = NEXTOP(PREG, yx); + UnifyBound(d0, d1); + + /* deref second argument */ + derefa_body(d1, pt1, glist_void_valy_nonvar_unk, glist_void_valy_nonvar_nonvar); + /* first argument bound, second unbound */ + PREG = NEXTOP(PREG, yx); + YapBind(pt1, d0); + GONext(); + + ENDP(pt1); + + /* first argument may be unbound */ + derefa_body(d0, pt0, glist_void_valy_unk, glist_void_valy_nonvar); + /* first argument is unbound */ + BEGP(pt1); + pt1 = YREG+PREG->y_u.yx.y; + d1 = *pt1; + deref_head(d1, glist_void_valy_var_unk); + + glist_void_valy_var_nonvar: + /* first unbound, second bound */ + PREG = NEXTOP(PREG, yx); + Bind_Global(pt0, d1); + GONext(); + + deref_body(d1, pt1, glist_void_valy_var_unk, glist_void_valy_var_nonvar); + /* both arguments are unbound */ + PREG = NEXTOP(PREG, yx); + UnifyGlobalCellToCell(pt0, pt1); + GONext(); + ENDP(pt1); + ENDD(d1); + ENDP(pt0); + + BEGP(pt0); + deref_body(d0, pt0, glist_void_valy_write, glist_void_valy_read); + /* enter write mode */ + CACHE_S(); + S_SREG = HR; + d0 = AbsPair(S_SREG); + YapBind(pt0, d0); + S_SREG = HR; + /* include XREG on it */ + BEGD(d1); + d1 = YREG[PREG->y_u.yx.y]; + RESET_VARIABLE(S_SREG); + S_SREG[1] = d1; + ENDD(d1); + PREG = NEXTOP(PREG, yx); + HR = S_SREG + 2; + ENDCACHE_S(); + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + + +/************************************************************************\ +* Unify instructions * +\************************************************************************/ + + Op(unify_x_var, ox); + CACHE_S(); + READ_IN_S(); + BEGD(d0); + d0 = *S_SREG; +#ifdef YAPOR_SBA + if (d0 == 0) + d0 = (CELL)S_SREG; +#endif + WRITEBACK_S(S_SREG+1); + ALWAYS_START_PREFETCH(ox); + XREG(PREG->y_u.ox.x) = d0; + PREG = NEXTOP(PREG, ox); + ALWAYS_GONext(); + ALWAYS_END_PREFETCH(); + ENDD(d0); + ENDCACHE_S(); + ENDOp(); + + OpW(unify_x_var_write, ox); + CACHE_S(); + READ_IN_S(); + BEGP(pt0); + pt0 = &XREG(PREG->y_u.ox.x); + PREG = NEXTOP(PREG, ox); + RESET_VARIABLE(S_SREG); + *pt0 = (CELL) S_SREG; + WRITEBACK_S(S_SREG+1); + ENDP(pt0); + ENDCACHE_S(); + GONextW(); + ENDOpW(); + + BOp(unify_l_x_var, ox); + ALWAYS_START_PREFETCH(ox); + BEGP(pt0); + BEGD(d0); + d0 = SREG[0]; + pt0 = &XREG(PREG->y_u.ox.x); + PREG = NEXTOP(PREG, ox); +#ifdef YAPOR_SBA + if (d0 == 0) + d0 = (CELL)SREG; +#endif + *pt0 = d0; + ALWAYS_GONext(); + ENDD(d0); + ENDP(pt0); + ALWAYS_END_PREFETCH(); + ENDBOp(); + + BOp(unify_l_x_var_write, ox); + ALWAYS_START_PREFETCH(ox); + CACHE_S(); + READ_IN_S(); + BEGP(pt0); + pt0 = &XREG(PREG->y_u.ox.x); + PREG = NEXTOP(PREG, ox); + RESET_VARIABLE(S_SREG); + *pt0 = (CELL)S_SREG; + ENDP(pt0); + ENDCACHE_S(); + ALWAYS_GONext(); + ENDBOp(); + ALWAYS_END_PREFETCH(); + + BOp(unify_x_var2, oxx); + CACHE_S(); + ALWAYS_START_PREFETCH(oxx); + READ_IN_S(); + BEGP(pt0); + pt0 = &XREG(PREG->y_u.oxx.xr); + BEGD(d0); + d0 = S_SREG[0]; + BEGD(d1); + d1 = S_SREG[1]; +#ifdef YAPOR_SBA + if (d0 == 0) + d0 = (CELL)S_SREG; + if (d1 == 0) + d1 = (CELL)(S_SREG+1); +#endif + WRITEBACK_S(S_SREG+2); + XREG(PREG->y_u.oxx.xl) = d0; + PREG = NEXTOP(PREG, oxx); + *pt0 = d1; + ENDD(d0); + ENDD(d1); + ENDP(pt0); + ALWAYS_GONext(); + ENDBOp(); + ALWAYS_END_PREFETCH(); + ENDCACHE_S(); + + OpW(unify_x_var2_write, oxx); + CACHE_S(); + READ_IN_S(); + BEGP(pt0); + pt0 = &XREG(PREG->y_u.oxx.xr); + RESET_VARIABLE(S_SREG); + XREG(PREG->y_u.oxx.xl) = (CELL) S_SREG; + S_SREG++; + PREG = NEXTOP(PREG, oxx); + RESET_VARIABLE(S_SREG); + *pt0 = (CELL) S_SREG; + ENDP(pt0); + WRITEBACK_S(S_SREG+1); + ENDCACHE_S(); + GONextW(); + ENDOpW(); + + BOp(unify_l_x_var2, oxx); + ALWAYS_START_PREFETCH(oxx); + CACHE_S(); + READ_IN_S(); + BEGP(pt0); + pt0 = &XREG(PREG->y_u.oxx.xr); + BEGD(d0); + d0 = S_SREG[0]; + BEGD(d1); + d1 = S_SREG[1]; +#ifdef YAPOR_SBA + if (d0 == 0) + XREG(PREG->y_u.oxx.xl) = (CELL)S_SREG; + else +#endif + XREG(PREG->y_u.oxx.xl) = d0; + PREG = NEXTOP(PREG, oxx); +#ifdef YAPOR_SBA + if (d1 == 0) + *pt0 = (CELL)(S_SREG+1); + else +#endif + *pt0 = d1; + ENDD(d0); + ENDD(d1); + ENDP(pt0); + ENDCACHE_S(); + ALWAYS_GONext(); + ENDBOp(); + ALWAYS_END_PREFETCH(); + + Op(unify_l_x_var2_write, oxx); + CACHE_S(); + READ_IN_S(); + BEGP(pt0); + pt0 = &XREG(PREG->y_u.oxx.xr); + XREG(PREG->y_u.oxx.xl) = (CELL) S_SREG; + RESET_VARIABLE(S_SREG); + S_SREG++; + *pt0 = (CELL) S_SREG; + PREG = NEXTOP(PREG, oxx); + RESET_VARIABLE(S_SREG); + ENDP(pt0); + ENDCACHE_S(); + GONext(); + ENDOp(); + + Op(unify_y_var, oy); + BEGD(d0); + d0 = *SREG++; +#ifdef YAPOR_SBA + if (d0 == 0) { + INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,(CELL)(SREG-1)); + } else +#else + INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,d0); +#endif /* YAPOR_SBA */ + PREG = NEXTOP(PREG, oy); + GONext(); + ENDD(d0); + ENDOp(); + + OpW(unify_y_var_write, oy); + CACHE_S(); + READ_IN_S(); + INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,(CELL) S_SREG); + PREG = NEXTOP(PREG, oy); + RESET_VARIABLE(S_SREG); + WRITEBACK_S(S_SREG+1); + ENDCACHE_S(); + GONextW(); + ENDOpW(); + + Op(unify_l_y_var, oy); + BEGD(d0); + d0 = SREG[0]; +#ifdef YAPOR_SBA + if (d0 == 0) { + INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,(CELL)SREG); + } else +#else + INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,d0); +#endif /* YAPOR_SBA */ + PREG = NEXTOP(PREG, oy); + GONext(); + ENDD(d0); + ENDOp(); + + Op(unify_l_y_var_write, oy); + CACHE_S(); + READ_IN_S(); + INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,(CELL) S_SREG); + PREG = NEXTOP(PREG, oy); + RESET_VARIABLE(S_SREG); + ENDCACHE_S(); + GONext(); + ENDOp(); + + /* We assume the value in X is pointing to an object in the + * global stack */ + Op(unify_x_val, ox); + BEGD(d0); + BEGD(d1); + BEGP(pt0); + pt0 = SREG; + d0 = *pt0; + deref_head(d0, uvalx_unk); + + uvalx_nonvar: + /* first argument is bound */ + d1 = XREG(PREG->y_u.ox.x); + deref_head(d1, uvalx_nonvar_unk); + + uvalx_nonvar_nonvar: + /* both arguments are bound */ + /* we may have to bind structures */ + PREG = NEXTOP(PREG, ox); + SREG++; + UnifyBound(d0, d1); + + /* deref second argument */ + /* pt0 is in the structure and pt1 the register */ + BEGP(pt1); + deref_body(d1, pt1, uvalx_nonvar_unk, uvalx_nonvar_nonvar); + /* first argument bound, second unbound */ + PREG = NEXTOP(PREG, ox); + SREG++; + YapBind(pt1, d0); + GONext(); + ENDP(pt1); + + /* first argument may be unbound */ + derefa_body(d0, pt0, uvalx_unk, uvalx_nonvar); + /* first argument is unbound */ + d1 = XREG(PREG->y_u.ox.x); + deref_head(d1, uvalx_var_unk); + + uvalx_var_nonvar: + /* first unbound, second bound */ + PREG = NEXTOP(PREG, ox); + SREG++; + Bind_Global(pt0, d1); + GONext(); + + BEGP(pt1); + deref_body(d1, pt1, uvalx_var_unk, uvalx_var_nonvar); + /* both arguments are unbound */ + PREG = NEXTOP(PREG, ox); + SREG++; + UnifyGlobalCellToCell(pt0, pt1); + GONext(); + ENDP(pt1); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + OpW(unify_x_val_write, ox); + /* we are in write mode */ + *SREG++ = XREG(PREG->y_u.ox.x); + PREG = NEXTOP(PREG, ox); + GONextW(); + ENDOpW(); + + /* We assume the value in X is pointing to an object in the + * global stack */ + Op(unify_l_x_val, ox); + BEGD(d0); + BEGD(d1); + BEGP(pt0); + pt0 = SREG; + d0 = *pt0; + deref_head(d0, ulvalx_unk); + + ulvalx_nonvar: + /* first argument is bound */ + d1 = XREG(PREG->y_u.ox.x); + deref_head(d1, ulvalx_nonvar_unk); + + ulvalx_nonvar_nonvar: + /* both arguments are bound */ + /* we may have to bind structures */ + PREG = NEXTOP(PREG, ox); + UnifyBound(d0, d1); + + BEGP(pt1); + /* deref second argument */ + deref_body(d1, pt1, ulvalx_nonvar_unk, ulvalx_nonvar_nonvar); + /* first argument bound, second unbound */ + PREG = NEXTOP(PREG, ox); + YapBind(pt1, d0); + GONext(); + ENDP(pt1); + + /* first argument may be unbound */ + derefa_body(d0, pt0, ulvalx_unk, ulvalx_nonvar); + /* first argument is unbound */ + d1 = XREG(PREG->y_u.ox.x); + deref_head(d1, ulvalx_var_unk); + + ulvalx_var_nonvar: + /* first unbound, second bound */ + PREG = NEXTOP(PREG, ox); + Bind_Global(pt0, d1); + GONext(); + + BEGP(pt1); + deref_body(d1, pt1, ulvalx_var_unk, ulvalx_var_nonvar); + /* both arguments are unbound */ + PREG = NEXTOP(PREG, ox); + UnifyGlobalCellToCell(pt0, pt1); + GONext(); + ENDP(pt1); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(unify_l_x_val_write, ox); + /* we are in write mode */ + SREG[0] = XREG(PREG->y_u.ox.x); + PREG = NEXTOP(PREG, ox); + GONext(); + ENDOp(); + + /* We assume the value in X is pointing to an object in the + * global stack */ + Op(unify_y_val, oy); + BEGD(d0); + BEGD(d1); + BEGP(pt0); + pt0 = SREG; + d0 = *pt0; + deref_head(d0, uvaly_unk); + + uvaly_nonvar: + /* first argument is bound */ + BEGP(pt1); + pt1 = YREG+PREG->y_u.oy.y; + d1 = *pt1; + deref_head(d1, uvaly_nonvar_unk); + + uvaly_nonvar_nonvar: + /* both arguments are bound */ + /* we may have to bind structures */ + PREG = NEXTOP(PREG, oy); + SREG++; + UnifyBound(d0, d1); + + /* deref second argument */ + derefa_body(d1, pt1, uvaly_nonvar_unk, uvaly_nonvar_nonvar); + /* first argument bound, second unbound */ + PREG = NEXTOP(PREG, oy); + SREG++; + YapBind(pt1, d0); + GONext(); + ENDP(pt1); + + /* first argument may be unbound */ + derefa_body(d0, pt0, uvaly_unk, uvaly_nonvar); + /* first argument is unbound */ + BEGP(pt1); + pt1 = YREG+PREG->y_u.oy.y; + d1 = *pt1; + deref_head(d1, uvaly_var_unk); + + uvaly_var_nonvar: + /* first unbound, second bound */ + PREG = NEXTOP(PREG, oy); + SREG++; + Bind_Global(pt0, d1); + GONext(); + + derefa_body(d1, pt1, uvaly_var_unk, uvaly_var_nonvar); + /* both arguments are unbound */ + PREG = NEXTOP(PREG, oy); + SREG++; + UnifyGlobalCellToCell(pt0, pt1); + GONext(); + ENDP(pt1); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + OpW(unify_y_val_write, oy); + /* we are in write mode */ + BEGD(d0); + d0 = YREG[PREG->y_u.oy.y]; +#ifdef YAPOR_SBA + if (d0 == 0) /* free variable */ + *SREG++ = (CELL)(YREG+PREG->y_u.oy.y); + else +#endif + *SREG++ = d0; + ENDD(d0); + PREG = NEXTOP(PREG, oy); + GONextW(); + ENDOpW(); + + /* We assume the value in X is pointing to an object in the + * global stack */ + Op(unify_l_y_val, oy); + BEGD(d0); + BEGD(d1); + BEGP(pt0); + pt0 = SREG; + d0 = *pt0; + deref_head(d0, ulvaly_unk); + + ulvaly_nonvar: + /* first argument is bound */ + BEGP(pt1); + pt1 = YREG+PREG->y_u.oy.y; + d1 = *pt1; + deref_head(d1, ulvaly_nonvar_unk); + + ulvaly_nonvar_nonvar: + /* both arguments are bound */ + /* we may have to bind structures */ + PREG = NEXTOP(PREG, oy); + UnifyBound(d0, d1); + + /* deref second argument */ + derefa_body(d1, pt1, ulvaly_nonvar_unk, ulvaly_nonvar_nonvar); + /* first argument bound, second unbound */ + PREG = NEXTOP(PREG, oy); + YapBind(pt1, d0); + GONext(); + ENDP(pt1); + + /* first argument may be unbound */ + derefa_body(d0, pt0, ulvaly_unk, ulvaly_nonvar); + /* first argument is unbound */ + BEGP(pt1); + pt1 = YREG+PREG->y_u.oy.y; + d1 = *pt1; + deref_head(d1, ulvaly_var_unk); + + ulvaly_var_nonvar: + /* first unbound, second bound */ + PREG = NEXTOP(PREG, oy); + Bind_Global(pt0, d1); + GONext(); + + /* Here we are in trouble: we have a clash between pt1 and + * SREG. We address this by storing SREG in d0 for the duration. */ + derefa_body(d1, pt1, ulvaly_var_unk, ulvaly_var_nonvar); + /* both arguments are unbound */ + PREG = NEXTOP(PREG, oy); + UnifyGlobalCellToCell(pt0, pt1); + GONext(); + ENDP(pt1); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(unify_l_y_val_write, oy); + /* we are in write mode */ + BEGD(d0); + d0 = YREG[PREG->y_u.oy.y]; +#ifdef YAPOR_SBA + if (d0 == 0) /* new variable */ + SREG[0] = (CELL)(YREG+PREG->y_u.oy.y); + else +#endif + SREG[0] = d0; + ENDD(d0); + PREG = NEXTOP(PREG, oy); + GONext(); + ENDOp(); + + /* In the next instructions, we do not know anything about + * what is in X */ + Op(unify_x_loc, ox); + BEGD(d0); + BEGD(d1); + BEGP(pt0); + pt0 = SREG; + d0 = *pt0; + deref_head(d0, uvalx_loc_unk); + + uvalx_loc_nonvar: + /* first argument is bound */ + d1 = XREG(PREG->y_u.ox.x); + deref_head(d1, uvalx_loc_nonvar_unk); + + uvalx_loc_nonvar_nonvar: + /* both arguments are bound */ + /* we may have to bind structures */ + PREG = NEXTOP(PREG, ox); + SREG++; + UnifyBound(d0, d1); + + BEGP(pt1); + /* deref second argument */ + deref_body(d1, pt1, uvalx_loc_nonvar_unk, uvalx_loc_nonvar_nonvar); + /* first argument bound, second unbound */ + PREG = NEXTOP(PREG, ox); + SREG++; + YapBind(pt1, d0); + GONext(); + ENDP(pt1); + + + /* first argument may be unbound */ + derefa_body(d0, pt0, uvalx_loc_unk, uvalx_loc_nonvar); + /* first argument is unbound */ + d1 = XREG(PREG->y_u.ox.x); + deref_head(d1, uvalx_loc_var_unk); + + uvalx_loc_var_nonvar: + /* first unbound, second bound */ + PREG = NEXTOP(PREG, ox); + SREG++; + Bind_Global(pt0, d1); + GONext(); + + /* Here we are in trouble: we have a clash between pt1 and + * SREG. We address this by storing SREG in d0 for the duration. */ + BEGP(pt1); + deref_body(d1, pt1, uvalx_loc_var_unk, uvalx_loc_var_nonvar); + /* both arguments are unbound */ + PREG = NEXTOP(PREG, ox); + SREG++; + UnifyCells(pt0, pt1); + GONext(); + ENDP(pt1); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + OpW(unify_x_loc_write, ox); + /* we are in write mode */ + BEGD(d0); + d0 = XREG(PREG->y_u.ox.x); + deref_head(d0, unify_x_loc_unk); + unify_x_loc_nonvar: + *SREG++ = d0; + PREG = NEXTOP(PREG, ox); + GONextW(); + + BEGP(pt0); + deref_body(d0, pt0, unify_x_loc_unk, unify_x_loc_nonvar); + /* move ahead in the instructions */ + PREG = NEXTOP(PREG, ox); + /* d0 is a variable, check whether we need to globalise it */ + if (pt0 < HR) { + /* variable is global */ + *SREG++ = Unsigned(pt0); + GONextW(); + } + else { + /* bind our variable to the structure */ + CACHE_S(); + READ_IN_S(); + Bind_Local(pt0, Unsigned(S_SREG)); + RESET_VARIABLE(S_SREG); + WRITEBACK_S(S_SREG+1); + ENDCACHE_S(); + GONextW(); + } + ENDP(pt0); + ENDD(d0); + ENDOpW(); + + /* In the next instructions, we do not know anything about + * what is in X */ + Op(unify_l_x_loc, ox); + BEGD(d0); + BEGD(d1); + BEGP(pt0); + pt0 = SREG; + d0 = *pt0; + deref_head(d0, ulvalx_loc_unk); + + ulvalx_loc_nonvar: + /* first argument is bound */ + d1 = XREG(PREG->y_u.ox.x); + deref_head(d1, ulvalx_loc_nonvar_unk); + + ulvalx_loc_nonvar_nonvar: + /* both arguments are bound */ + /* we may have to bind structures */ + PREG = NEXTOP(PREG, ox); + UnifyBound(d0, d1); + + /* deref second argument */ + deref_body(d1, pt0, ulvalx_loc_nonvar_unk, ulvalx_loc_nonvar_nonvar); + /* first argument bound, second unbound */ + PREG = NEXTOP(PREG, ox); + YapBind(pt0, d0); + GONext(); + + /* first argument may be unbound */ + derefa_body(d0, pt0, ulvalx_loc_unk, ulvalx_loc_nonvar); + /* first argument is unbound */ + d1 = XREG(PREG->y_u.ox.x); + deref_head(d1, ulvalx_loc_var_unk); + + ulvalx_loc_var_nonvar: + /* first unbound, second bound */ + PREG = NEXTOP(PREG, ox); + Bind_Global(pt0, d1); + GONext(); + + BEGP(pt1); + deref_body(d1, pt1, ulvalx_loc_var_unk, ulvalx_loc_var_nonvar); + /* both arguments are unbound */ + PREG = NEXTOP(PREG, ox); + UnifyGlobalCellToCell(pt0, pt1); + GONext(); + ENDP(pt1); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(unify_l_x_loc_write, ox); + /* we are in write mode */ + BEGD(d0); + d0 = XREG(PREG->y_u.ox.x); + deref_head(d0, ulnify_x_loc_unk); + ulnify_x_loc_nonvar: + SREG[0] = d0; + PREG = NEXTOP(PREG, ox); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, ulnify_x_loc_unk, ulnify_x_loc_nonvar); + /* d0 is a variable, check whether we need to globalise it */ + PREG = NEXTOP(PREG, ox); + if (pt0 < HR) { + /* variable is global */ + SREG[0] = Unsigned(pt0); + GONext(); + } + else { + /* create a new Heap variable and bind our variable to it */ + Bind_Local(pt0, Unsigned(SREG)); + RESET_VARIABLE(SREG); + GONext(); + } + ENDP(pt0); + ENDD(d0); + ENDOpW(); + + Op(unify_y_loc, oy); + /* we are in read mode */ + BEGD(d0); + BEGD(d1); + BEGP(pt0); + pt0 = SREG; + d0 = *pt0; + deref_head(d0, uvaly_loc_unk); + + uvaly_loc_nonvar: + /* structure is bound */ + BEGP(pt1); + pt1 = YREG+PREG->y_u.oy.y; + d1 = *pt1; + deref_head(d1, uvaly_loc_nonvar_unk); + + uvaly_loc_nonvar_nonvar: + /* both arguments are bound */ + /* we may have to bind structures */ + PREG = NEXTOP(PREG, oy); + SREG++; + UnifyBound(d0, d1); + + /* deref second argument */ + derefa_body(d1, pt1, uvaly_loc_nonvar_unk, uvaly_loc_nonvar_nonvar); + /* first argument bound, second unbound */ + PREG = NEXTOP(PREG, oy); + SREG++; + YapBind(pt1, d0); + GONext(); + ENDP(pt1); + + /* first argument may be unbound */ + derefa_body(d0, pt0, uvaly_loc_unk, uvaly_loc_nonvar); + /* first argument is unbound */ + BEGP(pt1); + pt1 = YREG+PREG->y_u.oy.y; + d1 = *pt1; + deref_head(d1, uvaly_loc_var_unk); + + uvaly_loc_var_nonvar: + /* first unbound, second bound */ + PREG = NEXTOP(PREG, oy); + SREG++; + Bind_Global(pt0, d1); + GONext(); + + /* Here we are in trouble: we have a clash between pt1 and + * SREG. We address this by storing SREG in d0 for the duration. */ + derefa_body(d1, pt1, uvaly_loc_var_unk, uvaly_loc_var_nonvar); + /* both arguments are unbound */ + PREG = NEXTOP(PREG, oy); + SREG++; + UnifyCells(pt0, pt1); + GONext(); + ENDP(pt1); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + OpW(unify_y_loc_write, oy); + /* we are in write mode */ + BEGD(d0); + BEGP(pt0); + pt0 = YREG+PREG->y_u.oy.y; + d0 = *pt0; + deref_head(d0, unify_y_loc_unk); + unify_y_loc_nonvar: + *SREG++ = d0; + PREG = NEXTOP(PREG, oy); + GONextW(); + + derefa_body(d0, pt0, unify_y_loc_unk, unify_y_loc_nonvar); + /* d0 is a variable, check whether we need to globalise it */ + PREG = NEXTOP(PREG, oy); + if (pt0 < HR) { + /* variable is global */ + *SREG++ = Unsigned(pt0); + GONextW(); + } + else { + /* create a new Heap variable and bind our variable to it */ + CACHE_S(); + READ_IN_S(); + Bind_Local(pt0, Unsigned(S_SREG)); + RESET_VARIABLE(S_SREG); + WRITEBACK_S(S_SREG+1); + ENDCACHE_S(); + GONextW(); + } + ENDP(pt0); + ENDD(d0); + ENDOpW(); + + Op(unify_l_y_loc, oy); + /* else we are in read mode */ + BEGD(d0); + BEGD(d1); + BEGP(pt0); + pt0 = SREG; + d0 = *pt0; + deref_head(d0, ulvaly_loc_unk); + + ulvaly_loc_nonvar: + /* structure is bound */ + BEGP(pt1); + pt1 = YREG+PREG->y_u.oy.y; + d1 = *pt1; + deref_head(d1, ulvaly_loc_nonvar_unk); + + ulvaly_loc_nonvar_nonvar: + /* both arguments are bound */ + /* we may have to bind structures */ + PREG = NEXTOP(PREG, oy); + UnifyBound(d0, d1); + + /* deref second argument */ + derefa_body(d1, pt1, ulvaly_loc_nonvar_unk, ulvaly_loc_nonvar_nonvar); + /* first argument bound, second unbound */ + PREG = NEXTOP(PREG, oy); + YapBind(pt1, d0); + GONext(); + ENDP(pt1); + + /* first argument may be unbound */ + derefa_body(d0, pt0, ulvaly_loc_unk, ulvaly_loc_nonvar); + /* first argument is unbound */ + BEGP(pt1); + pt1 = YREG+PREG->y_u.oy.y; + d1 = *pt1; + deref_head(d1, ulvaly_loc_var_unk); + + ulvaly_loc_var_nonvar: + /* first unbound, second bound */ + PREG = NEXTOP(PREG, oy); + Bind_Global(pt0, d1); + GONext(); + + /* Here we are in trouble: we have a clash between pt1 and + * SREG. We address this by storing SREG in d0 for the duration. */ + derefa_body(d1, pt1, ulvaly_loc_var_unk, ulvaly_loc_var_nonvar); + /* both arguments are unbound */ + PREG = NEXTOP(PREG, oy); + UnifyGlobalCellToCell(pt0, pt1); + GONext(); + ENDP(pt1); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(unify_l_y_loc_write, oy); + /* we are in write mode */ + BEGD(d0); + BEGP(pt0); + pt0 = YREG+PREG->y_u.oy.y; + d0 = *pt0; + deref_head(d0, ulunify_y_loc_unk); + ulunify_y_loc_nonvar: + SREG[0] = d0; + PREG = NEXTOP(PREG, oy); + GONext(); + + derefa_body(d0, pt0, ulunify_y_loc_unk, ulunify_y_loc_nonvar); + /* d0 is a variable, check whether we need to globalise it */ + PREG = NEXTOP(PREG, oy); + if (pt0 < HR) { + /* variable is global */ + SREG[0] = Unsigned(pt0); + GONext(); + } + else { + /* create a new Heap variable and bind our variable to it */ + CACHE_S(); + READ_IN_S(); + Bind_Local(pt0, Unsigned(S_SREG)); + RESET_VARIABLE(S_SREG); + ENDCACHE_S(); + GONext(); + } + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(unify_void, o); + START_PREFETCH(o); + PREG = NEXTOP(PREG, o); + SREG++; + GONext(); + END_PREFETCH(); + ENDOp(); + + OpW(unify_void_write, o); + CACHE_S(); + READ_IN_S(); + PREG = NEXTOP(PREG, o); + RESET_VARIABLE(S_SREG); + WRITEBACK_S(S_SREG+1); + ENDCACHE_S(); + GONextW(); + ENDOpW(); + + Op(unify_l_void, o); + PREG = NEXTOP(PREG, o); + GONext(); + ENDOp(); + + Op(unify_l_void_write, o); + PREG = NEXTOP(PREG, o); + RESET_VARIABLE(SREG); + GONext(); + ENDOp(); + + Op(unify_n_voids, os); + SREG += PREG->y_u.os.s; + PREG = NEXTOP(PREG, os); + GONext(); + ENDOp(); + + OpW(unify_n_voids_write, os); + BEGD(d0); + CACHE_S(); + d0 = PREG->y_u.os.s; + READ_IN_S(); + PREG = NEXTOP(PREG, os); + for (; d0 > 0; d0--) { + RESET_VARIABLE(S_SREG); + S_SREG++; + } + WRITEBACK_S(S_SREG); + ENDCACHE_S(); + ENDD(d0); + GONextW(); + ENDOpW(); + + Op(unify_l_n_voids, os); + PREG = NEXTOP(PREG, os); + GONext(); + ENDOp(); + + Op(unify_l_n_voids_write, os); + BEGD(d0); + d0 = PREG->y_u.os.s; + PREG = NEXTOP(PREG, os); + CACHE_S(); + READ_IN_S(); + for (; d0 > 0; d0--) { + RESET_VARIABLE(S_SREG); + S_SREG++; + } + ENDCACHE_S(); + ENDD(d0); + GONext(); + ENDOp(); + + Op(unify_atom, oc); + BEGD(d0); + BEGP(pt0); + pt0 = SREG++; + d0 = *pt0; + deref_head(d0, uatom_unk); + uatom_nonvar: + if (d0 != PREG->y_u.oc.c) { + FAIL(); + } + PREG = NEXTOP(PREG, oc); + GONext(); + + derefa_body(d0, pt0, uatom_unk, uatom_nonvar); + d0 = PREG->y_u.oc.c; + PREG = NEXTOP(PREG, oc); + Bind_Global(pt0, d0); + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + OpW(unify_atom_write, oc); + * SREG++ = PREG->y_u.oc.c; + PREG = NEXTOP(PREG, oc); + GONextW(); + ENDOpW(); + + Op(unify_l_atom, oc); + BEGD(d0); + BEGP(pt0); + pt0 = SREG; + d0 = *SREG; + deref_head(d0, ulatom_unk); + ulatom_nonvar: + if (d0 != PREG->y_u.oc.c) { + FAIL(); + } + PREG = NEXTOP(PREG, oc); + GONext(); + + derefa_body(d0, pt0, ulatom_unk, ulatom_nonvar); + d0 = PREG->y_u.oc.c; + PREG = NEXTOP(PREG, oc); + Bind_Global(pt0, d0); + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(unify_l_atom_write, oc); + SREG[0] = PREG->y_u.oc.c; + PREG = NEXTOP(PREG, oc); + GONext(); + ENDOp(); + + Op(unify_n_atoms, osc); + { + register Int i = PREG->y_u.osc.s; /* not enough registers */ + + BEGD(d1); + d1 = PREG->y_u.osc.c; + for (; i > 0; i--) { + BEGD(d0); + BEGP(pt0); + pt0 = SREG++; + d0 = *pt0; + deref_head(d0, uatom_n_var); + uatom_n_nonvar: + if (d0 != d1) { + FAIL(); + } + continue; + + derefa_body(d0, pt0, uatom_n_var, uatom_n_nonvar); + Bind_Global(pt0, d1); + continue; + ENDP(pt0); + ENDD(d0); + } + ENDD(d1); + } + PREG = NEXTOP(PREG, osc); + GONext(); + ENDOp(); + + OpW(unify_n_atoms_write, osc); + BEGD(d0); + BEGD(d1); + d0 = PREG->y_u.osc.s; + d1 = PREG->y_u.osc.c; + /* write N atoms */ + CACHE_S(); + READ_IN_S(); + PREG = NEXTOP(PREG, osc); + for (; d0 > 0; d0--) + *S_SREG++ = d1; + WRITEBACK_S(S_SREG); + ENDCACHE_S(); + ENDD(d1); + ENDD(d0); + GONextW(); + ENDOpW(); + + Op(unify_float, od); + BEGD(d0); + BEGP(pt0); + pt0 = SREG++; + d0 = *pt0; + deref_head(d0, ufloat_unk); + ufloat_nonvar: + if (!IsApplTerm(d0)) { + FAIL(); + } + /* look inside term */ + BEGP(pt0); + pt0 = RepAppl(d0); + BEGD(d0); + d0 = *pt0; + if (d0 != (CELL)FunctorDouble) { + FAIL(); + } + ENDD(d0); + BEGP(pt1); + pt1 = PREG->y_u.od.d; + PREG = NEXTOP(PREG, od); + if ( + pt1[1] != pt0[1] +#if SIZEOF_DOUBLE == 2*SIZEOF_INT_P + || pt1[2] != pt0[2] +#endif + ) FAIL(); + ENDP(pt1); + ENDP(pt0); + GONext(); + + derefa_body(d0, pt0, ufloat_unk, ufloat_nonvar); + BEGD(d1); + d1 = AbsAppl(PREG->y_u.od.d); + PREG = NEXTOP(PREG, od); + Bind_Global(pt0, d1); + GONext(); + ENDD(d1); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + OpW(unify_float_write, od); + * SREG++ = AbsAppl(PREG->y_u.od.d); + PREG = NEXTOP(PREG, od); + GONextW(); + ENDOpW(); + + Op(unify_l_float, od); + BEGD(d0); + CACHE_S(); + READ_IN_S(); + d0 = *S_SREG; + deref_head(d0, ulfloat_unk); + ulfloat_nonvar: + if (!IsApplTerm(d0)) { + FAIL(); + } + BEGP(pt0); + pt0 = RepAppl(d0); + BEGD(d0); + d0 = *pt0; + if (d0 != (CELL)FunctorDouble) { + FAIL(); + } + ENDD(d0); + BEGP(pt1); + pt1 = PREG->y_u.od.d; + PREG = NEXTOP(PREG, od); + if ( + pt1[1] != pt0[1] +#if SIZEOF_DOUBLE == 2*SIZEOF_INT_P + || pt1[2] != pt0[2] +#endif + ) FAIL(); + ENDP(pt1); + ENDP(pt0); + GONext(); + + derefa_body(d0, S_SREG, ulfloat_unk, ulfloat_nonvar); + BEGD(d1); + d1 = AbsAppl(PREG->y_u.od.d); + PREG = NEXTOP(PREG, od); + Bind_Global(S_SREG, d1); + GONext(); + ENDD(d1); + ENDCACHE_S(); + ENDD(d0); + ENDOp(); + + Op(unify_l_float_write, od); + SREG[0] = AbsAppl(PREG->y_u.od.d); + PREG = NEXTOP(PREG, od); + GONext(); + ENDOp(); + + Op(unify_string, ou); + BEGD(d0); + BEGP(pt0); + pt0 = SREG++; + d0 = *pt0; + deref_head(d0, ustring_unk); + ustring_nonvar: + if (!IsApplTerm(d0)) { + FAIL(); + } + /* look inside term */ + BEGP(pt0); + pt0 = RepAppl(d0); + BEGD(d0); + d0 = *pt0; + if (d0 != (CELL)FunctorString) { + FAIL(); + } + ENDD(d0); + BEGP(pt1); + pt1 = RepAppl(PREG->y_u.ou.ut); + PREG = NEXTOP(PREG, ou); + if ( + pt1[1] != pt0[1] + || strcmp( (const char *)(pt1 + 2), (const char *)(pt0+2) ) + ) FAIL(); + ENDP(pt1); + ENDP(pt0); + GONext(); + + derefa_body(d0, pt0, ustring_unk, ustring_nonvar); + BEGD(d1); + d1 = PREG->y_u.ou.ut; + PREG = NEXTOP(PREG, ou); + Bind_Global(pt0, d1); + GONext(); + ENDD(d1); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(unify_l_string, ou); + BEGD(d0); + CACHE_S(); + READ_IN_S(); + d0 = *S_SREG; + deref_head(d0, ulstring_unk); + ulstring_nonvar: + if (!IsApplTerm(d0)) { + FAIL(); + } + BEGP(pt0); + pt0 = RepAppl(d0); + BEGD(d0); + d0 = *pt0; + if (d0 != (CELL)FunctorString) { + FAIL(); + } + ENDD(d0); + BEGP(pt1); + pt1 = RepAppl(PREG->y_u.ou.ut); + PREG = NEXTOP(PREG, ou); + if ( + pt1[1] != pt0[1] + || strcmp( (const char *)(pt1 + 2), (const char *)(pt0+2) ) + ) FAIL(); + ENDP(pt1); + ENDP(pt0); + GONext(); + + derefa_body(d0, S_SREG, ulstring_unk, ulstring_nonvar); + BEGD(d1); + d1 = PREG->y_u.ou.ut; + PREG = NEXTOP(PREG, ou); + Bind_Global(S_SREG, d1); + GONext(); + ENDD(d1); + ENDCACHE_S(); + ENDD(d0); + ENDOp(); + + Op(unify_longint, oi); + BEGD(d0); + BEGP(pt0); + pt0 = SREG++; + d0 = *pt0; + deref_head(d0, ulongint_unk); + ulongint_nonvar: + /* look inside term */ + if (!IsApplTerm(d0)) { + FAIL(); + } + BEGP(pt0); + pt0 = RepAppl(d0); + BEGD(d0); + d0 = *pt0; + if (d0 != (CELL)FunctorLongInt) { + FAIL(); + } + ENDD(d0); + BEGP(pt1); + pt1 = PREG->y_u.oi.i; + PREG = NEXTOP(PREG, oi); + if (pt1[1] != pt0[1]) FAIL(); + ENDP(pt1); + ENDP(pt0); + GONext(); + + derefa_body(d0, pt0, ulongint_unk, ulongint_nonvar); + BEGD(d1); + d1 = AbsAppl(PREG->y_u.oi.i); + PREG = NEXTOP(PREG, oi); + Bind_Global(pt0, d1); + GONext(); + ENDD(d1); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + OpW(unify_longint_write, oi); + * SREG++ = AbsAppl(PREG->y_u.oi.i); + PREG = NEXTOP(PREG, oi); + GONextW(); + ENDOpW(); + + Op(unify_l_longint, oi); + BEGD(d0); + CACHE_S(); + READ_IN_S(); + d0 = *S_SREG; + deref_head(d0, ullongint_unk); + ullongint_nonvar: + if (!IsApplTerm(d0)) { + FAIL(); + } + BEGP(pt0); + pt0 = RepAppl(d0); + BEGD(d0); + d0 = *pt0; + if (d0 != (CELL)FunctorLongInt) { + FAIL(); + } + ENDD(d0); + BEGP(pt1); + pt1 = PREG->y_u.oi.i; + PREG = NEXTOP(PREG, oi); + if (pt1[1] != pt0[1]) FAIL(); + ENDP(pt1); + ENDP(pt0); + GONext(); + + derefa_body(d0, S_SREG, ullongint_unk, ullongint_nonvar); + BEGD(d1); + d1 = AbsAppl(PREG->y_u.oi.i); + PREG = NEXTOP(PREG, oi); + Bind_Global(S_SREG, d1); + GONext(); + ENDD(d1); + ENDCACHE_S(); + ENDD(d0); + ENDOp(); + + Op(unify_l_longint_write, oi); + SREG[0] = AbsAppl(PREG->y_u.oi.i); + PREG = NEXTOP(PREG, oi); + GONext(); + ENDOp(); + + Op(unify_bigint, oN); +#ifdef USE_GMP + BEGD(d0); + BEGP(pt0); + pt0 = SREG++; + d0 = *pt0; + deref_head(d0, ubigint_unk); + ubigint_nonvar: + /* look inside term */ + if (!IsApplTerm(d0)) { + FAIL(); + } + BEGP(pt0); + pt0 = RepAppl(d0); + BEGD(d1); + d1 = *pt0; + if (d1 != (CELL)FunctorBigInt) + { + FAIL(); + } + ENDD(d1); + if (Yap_gmp_tcmp_big_big(d0,PREG->y_u.oN.b)) + FAIL(); + PREG = NEXTOP(PREG, oN); + ENDP(pt0); + GONext(); + + derefa_body(d0, pt0, ubigint_unk, ubigint_nonvar); + BEGD(d1); + d1 = PREG->y_u.oN.b; + PREG = NEXTOP(PREG, oN); + Bind_Global(pt0, d1); + GONext(); + ENDD(d1); + ENDP(pt0); + ENDD(d0); +#else + FAIL(); +#endif + ENDOp(); + + Op(unify_l_bigint, oN); +#ifdef USE_GMP + BEGD(d0); + CACHE_S(); + READ_IN_S(); + d0 = *S_SREG; + deref_head(d0, ulbigint_unk); + ulbigint_nonvar: + if (!IsApplTerm(d0)) { + FAIL(); + } + BEGP(pt0); + pt0 = RepAppl(d0); + BEGD(d0); + d0 = *pt0; + if (d0 != (CELL)FunctorBigInt) + { + FAIL(); + } + ENDD(d0); + if (Yap_gmp_tcmp_big_big(d0,PREG->y_u.oN.b)) + FAIL(); + PREG = NEXTOP(PREG, oN); + ENDP(pt0); + GONext(); + + derefa_body(d0, S_SREG, ulbigint_unk, ulbigint_nonvar); + BEGD(d1); + d1 = PREG->y_u.oN.b; + PREG = NEXTOP(PREG, oN); + Bind_Global(S_SREG, d1); + GONext(); + ENDD(d1); + ENDCACHE_S(); + ENDD(d0); +#else + FAIL(); +#endif + ENDOp(); + + Op(unify_dbterm, oD); + BEGD(d0); + BEGP(pt0); + pt0 = SREG++; + d0 = *pt0; + deref_head(d0, udbterm_unk); + udbterm_nonvar: + BEGD(d1); + /* we have met a preexisting dbterm */ + d1 = PREG->y_u.oD.D; + PREG = NEXTOP(PREG, oD); + UnifyBound(d0,d1); + ENDD(d1); + + derefa_body(d0, pt0, udbterm_unk, udbterm_nonvar); + BEGD(d1); + d1 = PREG->y_u.oD.D; + PREG = NEXTOP(PREG, oD); + Bind_Global(pt0, d1); + GONext(); + ENDD(d1); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(unify_l_dbterm, oD); + BEGD(d0); + CACHE_S(); + READ_IN_S(); + d0 = *S_SREG; + deref_head(d0, uldbterm_unk); + uldbterm_nonvar: + BEGD(d1); + /* we have met a preexisting dbterm */ + d1 = PREG->y_u.oD.D; + PREG = NEXTOP(PREG, oD); + UnifyBound(d0,d1); + ENDD(d1); + + derefa_body(d0, S_SREG, uldbterm_unk, uldbterm_nonvar); + BEGD(d1); + d1 = PREG->y_u.oD.D; + PREG = NEXTOP(PREG, oD); + Bind_Global(S_SREG, d1); + GONext(); + ENDD(d1); + ENDCACHE_S(); + ENDD(d0); + ENDOp(); + + OpRW(unify_list, o); + *--SP = Unsigned(SREG + 1); + *--SP = READ_MODE; + BEGD(d0); + BEGP(pt0); + pt0 = SREG; + d0 = *pt0; + deref_head(d0, ulist_unk); + ulist_nonvar: + if (!IsPairTerm(d0)) { + FAIL(); + } + /* we continue in read mode */ + START_PREFETCH(o); + SREG = RepPair(d0); + PREG = NEXTOP(PREG, o); + GONext(); + END_PREFETCH(); + + derefa_body(d0, pt0, ulist_unk, ulist_nonvar); + /* we enter write mode */ + START_PREFETCH_W(o); + CACHE_S(); + READ_IN_S(); + S_SREG = HR; + PREG = NEXTOP(PREG, o); + HR = S_SREG + 2; + d0 = AbsPair(S_SREG); + WRITEBACK_S(S_SREG); + ENDCACHE_S(); + Bind_Global(pt0, d0); + GONextW(); + END_PREFETCH_W(); + + ENDP(pt0); + + ENDD(d0); + ENDOpRW(); + + OpW(unify_list_write, o); + PREG = NEXTOP(PREG, o); + BEGD(d0); + d0 = AbsPair(HR); + CACHE_S(); + READ_IN_S(); + SP -= 2; + SP[0] = WRITE_MODE; + SP[1] = Unsigned(S_SREG + 1); + S_SREG[0] = d0; + S_SREG = HR; + HR = S_SREG + 2; + WRITEBACK_S(S_SREG); + ENDCACHE_S(); + GONextW(); + ENDD(d0); + ENDOpW(); + + OpRW(unify_l_list, o); + BEGD(d0); + BEGP(pt0); + pt0 = SREG; + d0 = *pt0; + deref_head(d0, ullist_unk); + ullist_nonvar: + START_PREFETCH(o); + if (!IsPairTerm(d0)) { + FAIL(); + } + /* we continue in read mode */ + PREG = NEXTOP(PREG, o); + SREG = RepPair(d0); + GONext(); + END_PREFETCH(); + + derefa_body(d0, pt0, ullist_unk, ullist_nonvar); + /* we enter write mode */ + START_PREFETCH_W(o); + PREG = NEXTOP(PREG, o); + CACHE_S(); + READ_IN_S(); + S_SREG = HR; + HR = S_SREG + 2; + d0 = AbsPair(S_SREG); + WRITEBACK_S(S_SREG); + ENDCACHE_S(); + Bind_Global(pt0, d0); + GONextW(); + END_PREFETCH_W(); + + ENDP(pt0); + ENDD(d0); + ENDOpRW(); + + OpW(unify_l_list_write, o); + /* we continue in write mode */ + BEGD(d0); + d0 = AbsPair(HR); + PREG = NEXTOP(PREG, o); + CACHE_S(); + READ_IN_S(); + S_SREG[0] = d0; + S_SREG = HR; + HR = S_SREG + 2; + WRITEBACK_S(S_SREG); + ENDCACHE_S(); + GONextW(); + ENDD(d0); + ENDOpW(); + + OpRW(unify_struct, ofa); + *--SP = Unsigned(SREG + 1); + *--SP = READ_MODE; + BEGD(d0); + BEGP(pt0); + pt0 = SREG; + d0 = *pt0; + START_PREFETCH(ofa); + deref_head(d0, ustruct_unk); + ustruct_nonvar: + /* we are in read mode */ + if (!IsApplTerm(d0)) { + FAIL(); + } + CACHE_S(); + READ_IN_S(); + /* we continue in read mode */ + S_SREG = RepAppl(d0); + /* just check functor */ + d0 = (CELL) (PREG->y_u.ofa.f); + if (*S_SREG != d0) { + FAIL(); + } + PREG = NEXTOP(PREG, ofa); + WRITEBACK_S(S_SREG+1); + ENDCACHE_S(); + GONext(); + END_PREFETCH(); + + derefa_body(d0, pt0, ustruct_unk, ustruct_nonvar); + /* Enter Write mode */ + START_PREFETCH_W(ofa); + /* set d1 to be the new structure we are going to create */ + BEGD(d1); + d1 = AbsAppl(HR); + /* we know the variable must be in the heap */ + Bind_Global(pt0, d1); + /* now, set pt0 to point to the heap where we are going to + * build our term */ + pt0 = HR; + ENDD(d1); + /* first, put the functor */ + d0 = (CELL) (PREG->y_u.ofa.f); + *pt0++ = d0; + HR = pt0 + PREG->y_u.ofa.a; + PREG = NEXTOP(PREG, ofa); + /* set SREG */ + SREG = pt0; + /* update H */ + GONextW(); + END_PREFETCH_W(); + + ENDP(pt0); + + ENDD(d0); + ENDOpRW(); + + OpW(unify_struct_write, ofa); + CACHE_S(); + READ_IN_S(); + *--SP = Unsigned(S_SREG + 1); + *--SP = WRITE_MODE; + /* we continue in write mode */ + BEGD(d0); + d0 = AbsAppl(HR); + S_SREG[0] = d0; + S_SREG = HR; + d0 = (CELL) (PREG->y_u.ofa.f); + *S_SREG++ = d0; + HR = S_SREG + PREG->y_u.ofa.a; + PREG = NEXTOP(PREG, ofa); + WRITEBACK_S(S_SREG); + ENDCACHE_S(); + ENDD(d0); + GONextW(); + ENDOpW(); + + OpRW(unify_l_struc, ofa); + BEGD(d0); + BEGP(pt0); + pt0 = SREG; + d0 = *pt0; + deref_head(d0, ulstruct_unk); + ulstruct_nonvar: + /* we are in read mode */ + START_PREFETCH(ofa); + if (!IsApplTerm(d0)) { + FAIL(); + } + /* we continue in read mode */ + SREG = RepAppl(d0); + /* just check functor */ + d0 = (CELL) (PREG->y_u.ofa.f); + if (*SREG++ != d0) { + FAIL(); + } + PREG = NEXTOP(PREG, ofa); + GONext(); + END_PREFETCH(); + + derefa_body(d0, pt0, ulstruct_unk, ulstruct_nonvar); + /* Enter Write mode */ + /* set d1 to be the new structure we are going to create */ + START_PREFETCH_W(ofa); + BEGD(d1); + d1 = AbsAppl(HR); + /* we know the variable must be in the heap */ + Bind_Global(pt0, d1); + /* now, set pt0 to point to the heap where we are going to + * build our term */ + pt0 = HR; + ENDD(d1); + /* first, put the functor */ + d0 = (CELL) (PREG->y_u.ofa.f); + *pt0++ = d0; + HR = pt0 + PREG->y_u.ofa.a; + PREG = NEXTOP(PREG, ofa); + /* set SREG */ + SREG = pt0; + /* update H */ + GONextW(); + END_PREFETCH_W(); + ENDP(pt0); + + ENDD(d0); + ENDOpRW(); + + OpW(unify_l_struc_write, ofa); + BEGD(d0); + d0 = AbsAppl(HR); + CACHE_S(); + READ_IN_S(); + S_SREG[0] = d0; + S_SREG = HR; + d0 = (CELL) (PREG->y_u.ofa.f); + *S_SREG++ = d0; + HR = S_SREG + PREG->y_u.ofa.a; + PREG = NEXTOP(PREG, ofa); + WRITEBACK_S(S_SREG); + ENDCACHE_S(); + ENDD(d0); + GONextW(); + ENDOpW(); + + +/************************************************************************\ +* Put Instructions * +\************************************************************************/ + + Op(put_x_var, xx); + BEGP(pt0); + pt0 = HR; + XREG(PREG->y_u.xx.xl) = Unsigned(pt0); + HR = pt0 + 1; + XREG(PREG->y_u.xx.xr) = Unsigned(pt0); + PREG = NEXTOP(PREG, xx); + RESET_VARIABLE(pt0); + ENDP(pt0); + GONext(); + ENDOp(); + + Op(put_y_var, yx); + BEGP(pt0); + pt0 = YREG + PREG->y_u.yx.y; + XREG(PREG->y_u.yx.x) = (CELL) pt0; + PREG = NEXTOP(PREG, yx); +#if defined(YAPOR_SBA) && defined(FROZEN_STACKS) + /* We must initialise a shared variable to point to the SBA */ + if (Unsigned((Int)(pt0)-(Int)(H_FZ)) > + Unsigned((Int)(B_FZ)-(Int)(H_FZ))) { + *pt0 = (CELL)STACK_TO_SBA(pt0); + } else +#endif /* YAPOR_SBA && FROZEN_STACKS */ + INITIALIZE_PERMVAR(pt0, (CELL)pt0); + ENDP(pt0); + GONext(); + ENDOp(); + + Op(put_x_val, xx); + BEGD(d0); + d0 = XREG(PREG->y_u.xx.xl); + XREG(PREG->y_u.xx.xr) = d0; + ENDD(d0); + PREG = NEXTOP(PREG, xx); + GONext(); + ENDOp(); + + Op(put_xx_val, xxxx); + BEGD(d0); + BEGD(d1); + d0 = XREG(PREG->y_u.xxxx.xl1); + d1 = XREG(PREG->y_u.xxxx.xl2); + XREG(PREG->y_u.xxxx.xr1) = d0; + XREG(PREG->y_u.xxxx.xr2) = d1; + ENDD(d1); + ENDD(d0); + PREG = NEXTOP(PREG, xxxx); + GONext(); + ENDOp(); + + Op(put_y_val, yx); + BEGD(d0); + d0 = YREG[PREG->y_u.yx.y]; +#ifdef YAPOR_SBA + if (d0 == 0) /* new variable */ + XREG(PREG->y_u.yx.x) = (CELL)(YREG+PREG->y_u.yx.y); + else +#endif + XREG(PREG->y_u.yx.x) = d0; + ENDD(d0); + PREG = NEXTOP(PREG, yx); + GONext(); + ENDOp(); + + Op(put_y_vals, yyxx); + ALWAYS_START_PREFETCH(yyxx); + BEGD(d0); + d0 = YREG[PREG->y_u.yyxx.y1]; +#ifdef YAPOR_SBA + if (d0 == 0) /* new variable */ + XREG(PREG->y_u.yyxx.x1) = (CELL)(YREG+PREG->y_u.yyxx.y1); + else +#endif + XREG(PREG->y_u.yyxx.x1) = d0; + ENDD(d0); + /* allow for some prefetching */ + PREG = NEXTOP(PREG, yyxx); + BEGD(d1); + d1 = YREG[PREVOP(PREG,yyxx)->y_u.yyxx.y2]; +#ifdef YAPOR_SBA + if (d1 == 0) /* new variable */ + XREG(PREVOP(PREG->y_u.yyxx,yyxx).x2) = (CELL)(YREG+PREG->y_u.yyxx.y2); + else +#endif + XREG(PREVOP(PREG,yyxx)->y_u.yyxx.x2) = d1; + ENDD(d1); + ALWAYS_GONext(); + ALWAYS_END_PREFETCH(); + ENDOp(); + + Op(put_unsafe, yx); + BEGD(d0); + BEGP(pt0); + pt0 = YREG+PREG->y_u.yx.y; + d0 = *pt0; + deref_head(d0, punsafe_unk); + punsafe_nonvar: + XREG(PREG->y_u.yx.x) = d0; + PREG = NEXTOP(PREG, yx); + GONext(); + + derefa_body(d0, pt0, punsafe_unk, punsafe_nonvar); + /* d0 is a variable, check whether we need to globalise it */ + if (pt0 <= HR || pt0 >= YREG) { + /* variable is safe */ + XREG(PREG->y_u.yx.x) = Unsigned(pt0); + PREG = NEXTOP(PREG, yx); + GONext(); + } + else { + /* create a new Heap variable and bind our variable to it */ + Bind_Local(pt0, Unsigned(HR)); + XREG(PREG->y_u.yx.x) = (CELL) HR; + RESET_VARIABLE(HR); + HR++; + PREG = NEXTOP(PREG, yx); + GONext(); + } + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(put_atom, xc); + BEGD(d0); + d0 = PREG->y_u.xc.c; + XREG(PREG->y_u.xc.x) = d0; + PREG = NEXTOP(PREG, xc); + GONext(); + ENDD(d0); + ENDOp(); + + Op(put_dbterm, xD); + BEGD(d0); + d0 = PREG->y_u.xD.D; + XREG(PREG->y_u.xD.x) = d0; + PREG = NEXTOP(PREG, xD); + GONext(); + ENDD(d0); + ENDOp(); + + Op(put_bigint, xN); + BEGD(d0); + d0 = PREG->y_u.xN.b; + XREG(PREG->y_u.xN.x) = d0; + PREG = NEXTOP(PREG, xN); + GONext(); + ENDD(d0); + ENDOp(); + + Op(put_float, xd); + BEGD(d0); + d0 = AbsAppl(PREG->y_u.xd.d); + XREG(PREG->y_u.xd.x) = d0; + PREG = NEXTOP(PREG, xd); + GONext(); + ENDD(d0); + ENDOp(); + + Op(put_longint, xi); + BEGD(d0); + d0 = AbsAppl(PREG->y_u.xi.i); + XREG(PREG->y_u.xi.x) = d0; + PREG = NEXTOP(PREG, xi); + GONext(); + ENDD(d0); + ENDOp(); + + Op(put_list, x); + CACHE_S(); + READ_IN_S(); + S_SREG = HR; + HR += 2; + BEGD(d0); + d0 = AbsPair(S_SREG); + XREG(PREG->y_u.x.x) = d0; + PREG = NEXTOP(PREG, x); + ENDD(d0); + WRITEBACK_S(S_SREG); + ENDCACHE_S(); + GONext(); + ENDOp(); + + Op(put_struct, xfa); + BEGD(d0); + d0 = AbsAppl(HR); + XREG(PREG->y_u.xfa.x) = d0; + d0 = (CELL) (PREG->y_u.xfa.f); + *HR++ = d0; + SREG = HR; + HR += PREG->y_u.xfa.a; + ENDD(d0); + PREG = NEXTOP(PREG, xfa); + GONext(); + ENDOp(); + +/************************************************************************\ +* Write Instructions * +\************************************************************************/ + + Op(write_x_var, x); + XREG(PREG->y_u.x.x) = Unsigned(SREG); + PREG = NEXTOP(PREG, x); + RESET_VARIABLE(SREG); + SREG++; + GONext(); + ENDOp(); + + Op(write_void, e); + PREG = NEXTOP(PREG, e); + RESET_VARIABLE(SREG); + SREG++; + GONext(); + ENDOp(); + + Op(write_n_voids, s); + BEGD(d0); + d0 = PREG->y_u.s.s; + PREG = NEXTOP(PREG, s); + for (; d0 > 0; d0--) { + RESET_VARIABLE(SREG); + SREG++; + } + ENDD(d0); + GONext(); + ENDOp(); + + Op(write_y_var, y); + INITIALIZE_PERMVAR(YREG+PREG->y_u.y.y,Unsigned(SREG)); + PREG = NEXTOP(PREG, y); + RESET_VARIABLE(SREG); + SREG++; + GONext(); + ENDOp(); + + Op(write_x_val, x); + BEGD(d0); + d0 = XREG(PREG->y_u.x.x); + *SREG++ = d0; + ENDD(d0); + PREG = NEXTOP(PREG, x); + GONext(); + ENDOp(); + + Op(write_x_loc, x); + BEGD(d0); + d0 = XREG(PREG->y_u.x.x); + PREG = NEXTOP(PREG, x); + deref_head(d0, w_x_unk); + w_x_bound: + *SREG++ = d0; + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, w_x_unk, w_x_bound); +#if defined(YAPOR_SBA) && defined(FROZEN_STACKS) + if (pt0 > HR && pt0<(CELL *)B_FZ) { +#else + if (pt0 > HR) { +#endif /* YAPOR_SBA && FROZEN_STACKS */ + /* local variable: let us bind it to the list */ +#ifdef FROZEN_STACKS /* TRAIL */ + Bind_Local(pt0, Unsigned(SREG)); +#else + TRAIL_LOCAL(pt0, Unsigned(SREG)); + *pt0 = Unsigned(SREG); +#endif /* FROZEN_STACKS */ + RESET_VARIABLE(SREG); + SREG++; + GONext(); + } + else { + *SREG++ = Unsigned(pt0); + GONext(); + } + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(write_y_val, y); + BEGD(d0); + d0 = YREG[PREG->y_u.y.y]; +#ifdef YAPOR_SBA + if (d0 == 0) /* new variable */ + *SREG++ = (CELL)(YREG+PREG->y_u.y.y); + else +#endif + *SREG++ = d0; + ENDD(d0); + PREG = NEXTOP(PREG, y); + GONext(); + ENDOp(); + + Op(write_y_loc, y); + BEGD(d0); + BEGP(pt0); + pt0 = YREG+PREG->y_u.y.y; + d0 = *pt0; + deref_head(d0, w_y_unk); + w_y_bound: + PREG = NEXTOP(PREG, y); + *SREG++ = d0; + GONext(); + + derefa_body(d0, pt0, w_y_unk, w_y_bound); + if (pt0 > HR +#if defined(YAPOR_SBA) && defined(FROZEN_STACKS) + && pt0<(CELL *)B_FZ +#endif /* YAPOR_SBA && FROZEN_STACKS */ + ) { + PREG = NEXTOP(PREG, y); + /* local variable: let us bind it to the list */ +#ifdef FROZEN_STACKS + Bind_Local(pt0, Unsigned(SREG)); +#else + *pt0 = Unsigned(SREG); + TRAIL_LOCAL(pt0, Unsigned(SREG)); +#endif /* FROZEN_STACKS */ + RESET_VARIABLE(SREG); + SREG++; + GONext(); + } else { + PREG = NEXTOP(PREG, y); + *SREG++ = Unsigned(pt0); + GONext(); + } + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(write_atom, c); + BEGD(d0); + d0 = PREG->y_u.c.c; + *SREG++ = d0; + ENDD(d0); + PREG = NEXTOP(PREG, c); + GONext(); + ENDOp(); + + Op(write_bigint, N); + BEGD(d0); + d0 = PREG->y_u.N.b; + *SREG++ = d0; + ENDD(d0); + PREG = NEXTOP(PREG, N); + GONext(); + ENDOp(); + + Op(write_dbterm, D); + BEGD(d0); + d0 = PREG->y_u.D.D; + *SREG++ = d0; + ENDD(d0); + PREG = NEXTOP(PREG, D); + GONext(); + ENDOp(); + + Op(write_float, d); + BEGD(d0); + d0 = AbsAppl(PREG->y_u.d.d); + *SREG++ = d0; + ENDD(d0); + PREG = NEXTOP(PREG, d); + GONext(); + ENDOp(); + + Op(write_longint, i); + BEGD(d0); + d0 = AbsAppl(PREG->y_u.i.i); + *SREG++ = d0; + ENDD(d0); + PREG = NEXTOP(PREG, i); + GONext(); + ENDOp(); + + Op(write_n_atoms, sc); + BEGD(d0); + BEGD(d1); + d0 = PREG->y_u.sc.s; + d1 = PREG->y_u.sc.c; + for (; d0 > 0; d0--) + *SREG++ = d1; + ENDD(d1); + ENDD(d0); + PREG = NEXTOP(PREG, sc); + GONext(); + ENDOp(); + + Op(write_list, e); + BEGD(d0); + d0 = AbsPair(HR); + *SREG++ = d0; + /* I will not actually store the mode in the stack */ + SP[-1] = Unsigned(SREG); + SP[-2] = 1; /* Put instructions follow the main stream */ + SP -= 2; + SREG = HR; + HR += 2; + ENDD(d0); + PREG = NEXTOP(PREG, e); + GONext(); + ENDOp(); + + Op(write_l_list, e); + ALWAYS_START_PREFETCH(e); + PREG = NEXTOP(PREG, e); + BEGD(d0); + CACHE_S(); + READ_IN_S(); + d0 = AbsPair(HR); + *S_SREG = d0; + WRITEBACK_S(HR); + HR += 2; + ENDCACHE_S(); + ENDD(d0); + ALWAYS_GONext(); + ALWAYS_END_PREFETCH(); + ENDOp(); + + Op(write_struct, fa); + BEGD(d0); + d0 = AbsAppl(HR); + *SREG++ = d0; + SP[-1] = Unsigned(SREG); + SP[-2] = 1; /* Put instructions follow the main stream */ + SP -= 2; + d0 = (CELL) (PREG->y_u.fa.f); + *HR++ = d0; + ENDD(d0); + BEGD(d0); + d0 = PREG->y_u.fa.a; + PREG = NEXTOP(PREG, fa); + SREG = HR; + HR += d0; + ENDD(d0); + GONext(); + ENDOp(); + + Op(write_l_struc, fa); + BEGD(d0); + d0 = AbsAppl(HR); + *SREG = d0; + d0 = (CELL) (PREG->y_u.fa.f); + *HR++ = d0; + SREG = HR; + ENDD(d0); + BEGD(d0); + d0 = PREG->y_u.fa.a; + PREG = NEXTOP(PREG, fa); + HR += d0; + ENDD(d0); + GONext(); + ENDOp(); + +/************************************************************************\ +* Save last unified struct or list * +\************************************************************************/ + +/* vitor: I think I should kill these two instructions, by expanding the + * othe instructions. + */ + + Op(save_pair_x, ox); + XREG(PREG->y_u.ox.x) = AbsPair(SREG); + PREG = NEXTOP(PREG, ox); + GONext(); + ENDOp(); + + OpW(save_pair_x_write, ox); + XREG(PREG->y_u.ox.x) = AbsPair(SREG); + PREG = NEXTOP(PREG, ox); + GONextW(); + ENDOpW(); + + Op(save_pair_y, oy); + INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,AbsPair(SREG)); + PREG = NEXTOP(PREG, oy); + GONext(); + ENDOp(); + + OpW(save_pair_y_write, oy); + INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,AbsPair(SREG)); + PREG = NEXTOP(PREG, oy); + GONextW(); + ENDOpW(); + + Op(save_appl_x, ox); + XREG(PREG->y_u.ox.x) = AbsAppl(SREG - 1); + PREG = NEXTOP(PREG, ox); + GONext(); + ENDOp(); + + OpW(save_appl_x_write, ox); + XREG(PREG->y_u.ox.x) = AbsAppl(SREG - 1); + PREG = NEXTOP(PREG, ox); + GONextW(); + ENDOpW(); + + Op(save_appl_y, oy); + INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,AbsAppl(SREG-1)); + PREG = NEXTOP(PREG, oy); + GONext(); + ENDOp(); + + OpW(save_appl_y_write, oy); + INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,AbsAppl(SREG-1)); + PREG = NEXTOP(PREG, oy); + GONextW(); + ENDOpW(); + + +/************************************************************************\ +* Instructions for implemeting 'or;' * +\************************************************************************/ + + BOp(jump, l); + PREG = PREG->y_u.l.l; + JMPNext(); + ENDBOp(); + + /* This instruction is called when the previous goal + was interrupted when waking up goals + */ + BOp(move_back, l); + PREG = (yamop *)(((char *)PREG)-(Int)(NEXTOP((yamop *)NULL,Osbpp))); + JMPNext(); + ENDBOp(); + + /* This instruction is called when the previous goal + was interrupted when waking up goals + */ + BOp(skip, l); + PREG = NEXTOP(PREG,l); + JMPNext(); + ENDBOp(); + + Op(either, Osblp); +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) { + low_level_trace(try_or, (PredEntry *)PREG, NULL); + } +#endif +#ifdef COROUTINING + CACHE_Y_AS_ENV(YREG); + check_stack(NoStackEither, HR); + ENDCACHE_Y_AS_ENV(); + either_notest: +#endif + BEGD(d0); + /* Try to preserve the environment */ + d0 = PREG->y_u.Osblp.s; + BEGCHO(pt1); + pt1 = (choiceptr) ((char *) YREG + (yslot) d0); +#ifdef FROZEN_STACKS + { + choiceptr top_b = PROTECT_FROZEN_B(B); +#ifdef YAPOR_SBA + if (pt1 > top_b || pt1 < (choiceptr)HR) pt1 = top_b; +#else + if (pt1 > top_b) pt1 = top_b; +#endif /* YAPOR_SBA */ + } +#else + if (pt1 > B) { + pt1 = B; + } +#endif /* FROZEN_STACKS */ + pt1 = (choiceptr)(((CELL *) pt1)-1); + *(CELL **) pt1 = YREG; + store_yaam_regs_for_either(PREG->y_u.Osblp.l, PREG); + SREG = (CELL *) (B = pt1); +#ifdef YAPOR + SCH_set_load(pt1); +#endif /* YAPOR */ + SET_BB(pt1); + ENDCHO(pt1); + /* skip the current instruction plus the next one */ + PREG = NEXTOP(NEXTOP(PREG, Osblp),l); + GONext(); + ENDD(d0); + +#ifdef COROUTINING + NoStackEither: + PROCESS_INT(interrupt_either, either_notest); +#endif + + ENDOp(); + + Op(or_else, Osblp); + HR = HBREG = PROTECT_FROZEN_H(B); + ENV = B->cp_env; + B->cp_cp = PREG; +#ifdef DEPTH_LIMIT + DEPTH = B->cp_depth; +#endif /* DEPTH_LIMIT */ + SET_BB(PROTECT_FROZEN_B(B)); +#ifdef YAPOR + if (SCH_top_shared_cp(B)) { + SCH_new_alternative(PREG, PREG->y_u.Osblp.l); + } else +#endif /* YAPOR */ + B->cp_ap = PREG->y_u.Osblp.l; + PREG = NEXTOP(PREG, Osblp); + YREG = (CELL *) B->cp_a1; + GONext(); + ENDOp(); + +#ifdef YAPOR + Op(or_last, Osblp); +#else + Op(or_last, p); +#endif /* YAPOR */ + BEGCHO(pt0); + pt0 = B; +#ifdef YAPOR + if (SCH_top_shared_cp(B)) { + HR = HBREG = PROTECT_FROZEN_H(pt0); + YREG = (CELL *) pt0->cp_a1; + ENV = pt0->cp_env; +#ifdef DEPTH_LIMIT + DEPTH = pt0->cp_depth; +#endif /* DEPTH_LIMIT */ + SCH_new_alternative(PREG, NULL); + } + else +#endif /* YAPOR */ + { + B = pt0->cp_b; + HR = PROTECT_FROZEN_H(pt0); + YREG = (CELL *) pt0->cp_a1; + ENV = pt0->cp_env; +#ifdef DEPTH_LIMIT + DEPTH = pt0->cp_depth; +#endif /* DEPTH_LIMIT */ + HBREG = PROTECT_FROZEN_H(B); + } +#ifdef YAPOR + PREG = NEXTOP(PREG, Osblp); +#else + PREG = NEXTOP(PREG, p); +#endif /* YAPOR */ + SET_BB(PROTECT_FROZEN_B(B)); + GONext(); + ENDCHO(pt0); + ENDOp(); + +/************************************************************************\ +* Pop operations * +\************************************************************************/ + + OpRW(pop_n, s); + /* write mode might have been called from read mode */ + BEGD(d0); + d0 = PREG->y_u.os.s; + SP = (CELL *) (((char *) SP) + d0); + ENDD(d0); + BEGD(d0); + d0 = SP[0]; + if (d0) { + START_PREFETCH(s); + SREG = (CELL *) (SP[1]); + SP += 2; + PREG = NEXTOP(PREG, s); + GONext(); + END_PREFETCH(); + } + else { + START_PREFETCH_W(s); + SREG = (CELL *) (SP[1]); + SP += 2; + PREG = NEXTOP(PREG, s); + GONextW(); + END_PREFETCH_W(); + } + ENDD(d0); + ENDOpRW(); + + OpRW(pop, e); + BEGD(d0); + d0 = SP[0]; + SREG = (CELL *) (SP[1]); + SP += 2; + if (d0) { + START_PREFETCH(e); + PREG = NEXTOP(PREG, e); + GONext(); + END_PREFETCH(); + } + else { + START_PREFETCH_W(e); + PREG = NEXTOP(PREG, e); + GONextW(); + END_PREFETCH_W(); + } + ENDD(d0); + ENDOpRW(); + +/************************************************************************\ +* Call C predicates instructions * +\************************************************************************/ + + BOp(call_cpred, Osbpp); + check_trail(TR); + if (!(PREG->y_u.Osbpp.p->PredFlags & (SafePredFlag|NoTracePredFlag|HiddenPredFlag))) { + CACHE_Y_AS_ENV(YREG); + check_stack(NoStackCCall, HR); + ENDCACHE_Y_AS_ENV(); + } + do_c_call: +#ifdef FROZEN_STACKS + { + choiceptr top_b = PROTECT_FROZEN_B(B); + +#ifdef YAPOR_SBA + if (YREG > (CELL *) top_b || YREG < HR) ASP = (CELL *)top_b; +#else + if (YREG > (CELL *) top_b) ASP = (CELL *)top_b; +#endif /* YAPOR_SBA */ + else ASP = (CELL *)(((char *)YREG) + PREG->y_u.Osbpp.s); + } +#else + SET_ASP(YREG, PREG->y_u.Osbpp.s); + /* for slots to work */ +#endif /* FROZEN_STACKS */ +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) + low_level_trace(enter_pred,PREG->y_u.Osbpp.p,XREGS+1); +#endif /* LOW_LEVEL_TRACE */ + BEGD(d0); + CPredicate f = PREG->y_u.Osbpp.p->cs.f_code; + PREG = NEXTOP(PREG, Osbpp); + saveregs(); + d0 = (f)(PASS_REGS1); + setregs(); +#ifdef SHADOW_S + SREG = Yap_REGS.S_; +#endif + if (!d0) { + FAIL(); + } + CACHE_A1(); + ENDD(d0); + JMPNext(); + + NoStackCCall: + PROCESS_INT(interrupt_call, do_c_call); + + ENDBOp(); + + /* execute Label */ + BOp(execute_cpred, pp); + check_trail(TR); + { + PredEntry *pt0; + + BEGD(d0); + CACHE_Y_AS_ENV(YREG); +#ifndef NO_CHECKING + check_stack(NoStackExecuteC, HR); + do_executec: +#endif +#ifdef FROZEN_STACKS + { + choiceptr top_b = PROTECT_FROZEN_B(B); + +#ifdef YAPOR_SBA + if (YREG > (CELL *) top_b || YREG < HR) ASP = (CELL *)top_b; +#else + if (YREG > (CELL *) top_b) ASP = (CELL *)top_b; +#endif /* YAPOR_SBA */ + else ASP = YREG+E_CB; + } +#else + SET_ASP(YREG, E_CB*sizeof(CELL)); + /* for slots to work */ +#endif /* FROZEN_STACKS */ + pt0 = PREG->y_u.pp.p; +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) { + low_level_trace(enter_pred,pt0,XREGS+1); + } +#endif /* LOW_LEVEL_TRACE */ + CACHE_A1(); + BEGD(d0); + d0 = (CELL)B; + /* for profiler */ + save_pc(); + ENV_YREG[E_CB] = d0; + ENDD(d0); +#ifdef DEPTH_LIMIT + if (DEPTH <= MkIntTerm(1)) {/* I assume Module==0 is prolog */ + if (pt0->ModuleOfPred) { + if (DEPTH == MkIntTerm(0)) + FAIL(); + else DEPTH = RESET_DEPTH(); + } + } else if (pt0->ModuleOfPred) { + DEPTH -= MkIntConstant(2); + } +#endif /* DEPTH_LIMIT */ + /* now call C-Code */ + { + CPredicate f = PREG->y_u.pp.p->cs.f_code; + yamop *oldPREG = PREG; + saveregs(); + d0 = (f)(PASS_REGS1); + setregs(); +#ifdef SHADOW_S + SREG = Yap_REGS.S_; +#endif + if (!d0) { + FAIL(); + } + if (oldPREG == PREG) { + /* we did not update PREG */ + /* we can proceed */ + PREG = CPREG; + ENV_YREG = ENV; +#ifdef DEPTH_LIMIT + DEPTH = ENV_YREG[E_DEPTH]; +#endif + WRITEBACK_Y_AS_ENV(); + } else { + /* call the new code */ + CACHE_A1(); + } + } + JMPNext(); + ENDCACHE_Y_AS_ENV(); + ENDD(d0); + } + + NoStackExecuteC: + PROCESS_INT(interrupt_execute, do_executec); + ENDBOp(); + + /* Like previous, the only difference is that we do not */ + /* trust the C-function we are calling and hence we must */ + /* guarantee that *all* machine registers are saved and */ + /* restored */ + BOp(call_usercpred, Osbpp); + CACHE_Y_AS_ENV(YREG); + check_stack(NoStackUserCall, HR); + ENDCACHE_Y_AS_ENV(); + do_user_call: +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) { + low_level_trace(enter_pred,PREG->y_u.Osbpp.p,XREGS+1); + } +#endif /* LOW_LEVEL_TRACE */ +#ifdef FROZEN_STACKS + { + choiceptr top_b = PROTECT_FROZEN_B(B); +#ifdef YAPOR_SBA + if (YREG > (CELL *) top_b || YREG < HR) ASP = (CELL *) top_b; +#else + if (YREG > (CELL *) top_b) ASP = (CELL *) top_b; +#endif /* YAPOR_SBA */ + else ASP = (CELL *)(((char *)YREG) + PREG->y_u.Osbpp.s); + } +#else + SET_ASP(YREG, PREG->y_u.Osbpp.s); + /* for slots to work */ +#endif /* FROZEN_STACKS */ + { + /* make sure that we can still have access to our old PREG after calling user defined goals and backtracking or failing */ + yamop *savedP; + + LOCAL_PrologMode |= UserCCallMode; + { + PredEntry *p = PREG->y_u.Osbpp.p; + + PREG = NEXTOP(PREG, Osbpp); + savedP = PREG; + saveregs(); + save_machine_regs(); + + SREG = (CELL *) YAP_Execute(p, p->cs.f_code); + } + setregs(); + LOCAL_PrologMode &= ~UserCCallMode; + restore_machine_regs(); + PREG = savedP; + } + if (EX) { + struct DB_TERM *exp = EX; + EX = NULL; + Yap_JumpToEnv(Yap_PopTermFromDB(exp)); + SREG = NULL; + } + if (!SREG) { + FAIL(); + } + /* in case we call Execute */ + YENV = ENV; + YREG = ENV; + JMPNext(); + + NoStackUserCall: + PROCESS_INT(interrupt_call, do_user_call); + + ENDBOp(); + + BOp(call_c_wfail, slp); +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) { + low_level_trace(enter_pred,PREG->y_u.slp.p,XREGS+1); + } +#endif /* LOW_LEVEL_TRACE */ +#ifdef FROZEN_STACKS + { + choiceptr top_b = PROTECT_FROZEN_B(B); +#ifdef YAPOR_SBA + if (YREG > (CELL *) top_b || YREG < HR) ASP = (CELL *) top_b; +#else + if (YREG > (CELL *) top_b) ASP = (CELL *) top_b; +#endif /* YAPOR_SBA */ + else { + BEGD(d0); + d0 = PREG->y_u.slp.s; + ASP = ((CELL *)YREG) + d0; + ENDD(d0); + } + } +#else + if (YREG > (CELL *) B) + ASP = (CELL *) B; + else { + BEGD(d0); + d0 = PREG->y_u.slp.s; + ASP = ((CELL *) YREG) + d0; + ENDD(d0); + } +#endif /* FROZEN_STACKS */ + { + CPredicate f = PREG->y_u.slp.p->cs.f_code; + saveregs(); + SREG = (CELL *)((f)(PASS_REGS1)); + setregs(); + } + if (!SREG) { + /* be careful about error handling */ + if (PREG != FAILCODE) + PREG = PREG->y_u.slp.l; + } else { + PREG = NEXTOP(PREG, slp); + } + CACHE_A1(); + JMPNext(); + ENDBOp(); + + BOp(try_c, OtapFs); +#ifdef YAPOR + CUT_wait_leftmost(); +#endif /* YAPOR */ + CACHE_Y(YREG); + /* Alocate space for the cut_c structure*/ + CUT_C_PUSH(NEXTOP(NEXTOP(PREG,OtapFs),OtapFs),S_YREG); + S_YREG = S_YREG - PREG->y_u.OtapFs.extra; + store_args(PREG->y_u.OtapFs.s); + store_yaam_regs(NEXTOP(PREG, OtapFs), 0); + B = B_YREG; +#ifdef YAPOR + SCH_set_load(B_YREG); +#endif /* YAPOR */ + SET_BB(B_YREG); + ENDCACHE_Y(); + + TRYCC: + ASP = (CELL *)B; + { + CPredicate f = (CPredicate)(PREG->y_u.OtapFs.f); + saveregs(); + SREG = (CELL *) ((f) (PASS_REGS1)); + /* This last instruction changes B B*/ + while (POP_CHOICE_POINT(B)){ + cut_c_pop(); + } + setregs(); + } + if (!SREG) { + /* Removes the cut functions from the stack + without executing them because we have fail + and not cuted the predicate*/ + while(POP_CHOICE_POINT(B)) + cut_c_pop(); + FAIL(); + } + if ((CELL *) B == YREG && ASP != (CELL *) B) { + /* as Luis says, the predicate that did the try C might + * have left some data on the stack. We should preserve + * it, unless the builtin also did cut */ + YREG = ASP; + HBREG = PROTECT_FROZEN_H(B); + SET_BB(B); + } + PREG = CPREG; + YREG = ENV; + JMPNext(); + ENDBOp(); + + BOp(retry_c, OtapFs); +#ifdef YAPOR + CUT_wait_leftmost(); +#endif /* YAPOR */ + CACHE_Y(B); + CPREG = B_YREG->cp_cp; + ENV = B_YREG->cp_env; + HR = PROTECT_FROZEN_H(B); +#ifdef DEPTH_LIMIT + DEPTH =B->cp_depth; +#endif + HBREG = HR; + restore_args(PREG->y_u.OtapFs.s); + ENDCACHE_Y(); + goto TRYCC; + ENDBOp(); + + BOp(cut_c, OtapFs); + /*This is a phantom instruction. This is not executed by the WAM*/ +#ifdef DEBUG + /*If WAM executes this instruction, probably there's an error + when we put this instruction, cut_c, after retry_c*/ + printf ("ERROR: Should not print this message FILE: absmi.c %d\n",__LINE__); +#endif /*DEBUG*/ + ENDBOp(); + + BOp(try_userc, OtapFs); +#ifdef YAPOR + CUT_wait_leftmost(); +#endif /* YAPOR */ + CACHE_Y(YREG); + /* Alocate space for the cut_c structure*/ + CUT_C_PUSH(NEXTOP(NEXTOP(PREG,OtapFs),OtapFs),S_YREG); + S_YREG = S_YREG - PREG->y_u.OtapFs.extra; + store_args(PREG->y_u.OtapFs.s); + store_yaam_regs(NEXTOP(PREG, OtapFs), 0); + B = B_YREG; +#ifdef YAPOR + SCH_set_load(B_YREG); +#endif + SET_BB(B_YREG); + ENDCACHE_Y(); + LOCAL_PrologMode |= UserCCallMode; + ASP = YREG; + saveregs(); + save_machine_regs(); + SREG = (CELL *) YAP_ExecuteFirst(PREG->y_u.OtapFs.p, (CPredicate)(PREG->y_u.OtapFs.f)); + EX = NULL; + restore_machine_regs(); + setregs(); + LOCAL_PrologMode &= ~UserCCallMode; + if (!SREG) { + FAIL(); + } + if ((CELL *) B == YREG && ASP != (CELL *) B) { + /* as Luis says, the predicate that did the try C might + * have left some data on the stack. We should preserve + * it, unless the builtin also did cut */ + YREG = ASP; + HBREG = PROTECT_FROZEN_H(B); + } + PREG = CPREG; + YREG = ENV; + CACHE_A1(); + JMPNext(); + ENDBOp(); + + BOp(retry_userc, OtapFs); +#ifdef YAPOR + CUT_wait_leftmost(); +#endif /* YAPOR */ + CACHE_Y(B); + CPREG = B_YREG->cp_cp; + ENV = B_YREG->cp_env; + HR = PROTECT_FROZEN_H(B); +#ifdef DEPTH_LIMIT + DEPTH =B->cp_depth; +#endif + HBREG = HR; + restore_args(PREG->y_u.OtapFs.s); + ENDCACHE_Y(); + + LOCAL_PrologMode |= UserCCallMode; + SET_ASP(YREG, E_CB*sizeof(CELL)); + saveregs(); + save_machine_regs(); + SREG = (CELL *) YAP_ExecuteNext(PREG->y_u.OtapFs.p, (CPredicate)(PREG->y_u.OtapFs.f)); + EX = NULL; + restore_machine_regs(); + setregs(); + LOCAL_PrologMode &= ~UserCCallMode; + if (!SREG) { + /* Removes the cut functions from the stack + without executing them because we have fail + and not cuted the predicate*/ + while(POP_CHOICE_POINT(B)) + cut_c_pop(); + FAIL(); + } + if ((CELL *) B == YREG && ASP != (CELL *) B) { + /* as Luis says, the predicate that did the try C might + * have left some data on the stack. We should preserve + * it, unless the builtin also did cut */ + YREG = ASP; + HBREG = PROTECT_FROZEN_H(B); + } + PREG = CPREG; + YREG = ENV; + CACHE_A1(); + JMPNext(); + ENDBOp(); + + BOp(cut_userc, OtapFs); + /*This is a phantom instruction. This is not executed by the WAM*/ +#ifdef DEBUG + /*If WAM executes this instruction, probably there's an error + when we put this instruction, cut_userc, after retry_userc*/ + printf ("ERROR: Should not print this message FILE: absmi.c %d\n",__LINE__); +#endif /*DEBUG*/ + CACHE_A1(); + JMPNext(); + ENDBOp(); + + +/************************************************************************\ +* support instructions * +\************************************************************************/ + + BOp(lock_pred, e); + { + PredEntry *ap = PredFromDefCode(PREG); + PELOCK(10,ap); + PP = ap; + if (!ap->cs.p_code.NOfClauses) { + UNLOCKPE(11,ap); + FAIL(); + } + /* + we do not lock access to the predicate, + we must take extra care here + */ + if (ap->cs.p_code.NOfClauses > 1 && + !(ap->PredFlags & IndexedPredFlag)) { + /* update ASP before calling IPred */ + SET_ASP(YREG, E_CB*sizeof(CELL)); + saveregs(); + Yap_IPred(ap, 0, CP); + /* IPred can generate errors, it thus must get rid of the lock itself */ + setregs(); + CACHE_A1(); + /* for profiler */ + save_pc(); + } + PREG = ap->cs.p_code.TrueCodeOfPred; + } + JMPNext(); + ENDBOp(); + + BOp(index_pred, e); + { + PredEntry *ap = PredFromDefCode(PREG); +#if defined(YAPOR) || defined(THREADS) + /* + we do not lock access to the predicate, + we must take extra care here + */ + if (!PP) { + PELOCK(11,ap); + } + if (ap->OpcodeOfPred != INDEX_OPCODE) { + /* someone was here before we were */ + if (!PP) { + UNLOCKPE(11,ap); + } + PREG = ap->CodeOfPred; + /* for profiler */ + save_pc(); + JMPNext(); + } +#endif + /* update ASP before calling IPred */ + SET_ASP(YREG, E_CB*sizeof(CELL)); + saveregs(); + Yap_IPred(ap, 0, CP); + /* IPred can generate errors, it thus must get rid of the lock itself */ + setregs(); + CACHE_A1(); + PREG = ap->CodeOfPred; + /* for profiler */ + save_pc(); +#if defined(YAPOR) || defined(THREADS) + if (!PP) +#endif + UNLOCKPE(14,ap); + + } + JMPNext(); + ENDBOp(); + +#if THREADS + BOp(thread_local, e); + { + PredEntry *ap = PredFromDefCode(PREG); + ap = Yap_GetThreadPred(ap PASS_REGS); + PREG = ap->CodeOfPred; + /* for profiler */ + save_pc(); + } + JMPNext(); + ENDBOp(); +#endif + + BOp(expand_index, e); + { + PredEntry *pe = PredFromExpandCode(PREG); + yamop *pt0; + + /* update ASP before calling IPred */ + SET_ASP(YREG, E_CB*sizeof(CELL)); +#if defined(YAPOR) || defined(THREADS) + if (!PP) { + PELOCK(12,pe); + } + if (!same_lu_block(PREG_ADDR, PREG)) { + PREG = *PREG_ADDR; + if (!PP) { + UNLOCKPE(15,pe); + } + JMPNext(); + } +#endif +#ifdef SHADOW_S + S = SREG; +#endif /* SHADOW_S */ + saveregs(); + pt0 = Yap_ExpandIndex(pe, 0); + /* restart index */ + setregs(); +#ifdef SHADOW_S + SREG = S; +#endif /* SHADOW_S */ + PREG = pt0; +#if defined(YAPOR) || defined(THREADS) + if (!PP) { + UNLOCKPE(12,pe); + } +#endif + JMPNext(); + } + ENDBOp(); + + BOp(expand_clauses, sssllp); + { + PredEntry *pe = PREG->y_u.sssllp.p; + yamop *pt0; + + /* update ASP before calling IPred */ + SET_ASP(YREG, E_CB*sizeof(CELL)); +#if defined(YAPOR) || defined(THREADS) + if (PP == NULL) { + PELOCK(13,pe); + } + if (!same_lu_block(PREG_ADDR, PREG)) { + PREG = *PREG_ADDR; + if (!PP) { + UNLOCKPE(16,pe); + } + JMPNext(); + } +#endif + saveregs(); + pt0 = Yap_ExpandIndex(pe, 0); + /* restart index */ + setregs(); + PREG = pt0; +#if defined(YAPOR) || defined(THREADS) + if (!PP) { + UNLOCKPE(18,pe); + } +#endif + JMPNext(); + } + ENDBOp(); + + BOp(undef_p, e); + /* save S for module name */ + saveregs(); + undef_goal( PASS_REGS1 ); + setregs(); + /* for profiler */ + CACHE_A1(); + JMPNext(); + ENDBOp(); + + BOp(spy_pred, e); + saveregs(); + spy_goal( PASS_REGS1 ); + setregs(); + CACHE_A1(); + JMPNext(); + ENDBOp(); + + +/************************************************************************\ +* Try / Retry / Trust for main indexing blocks * +\************************************************************************/ + + BOp(try_clause, Otapl); + check_trail(TR); + CACHE_Y(YREG); + /* Point AP to the code that follows this instruction */ + store_at_least_one_arg(PREG->y_u.Otapl.s); + store_yaam_regs(NEXTOP(PREG, Otapl), 0); + PREG = PREG->y_u.Otapl.d; + set_cut(S_YREG, B); + B = B_YREG; +#ifdef YAPOR + SCH_set_load(B_YREG); +#endif /* YAPOR */ + SET_BB(B_YREG); + ENDCACHE_Y(); + JMPNext(); + ENDBOp(); + + BOp(try_clause2, l); + check_trail(TR); + CACHE_Y(YREG); + /* Point AP to the code that follows this instruction */ + { + register CELL x2 = ARG2; + register CELL x1 = ARG1; + + store_yaam_regs(NEXTOP(PREG, l), 2); + B_YREG->cp_a1 = x1; + B_YREG->cp_a2 = x2; + } + PREG = PREG->y_u.l.l; + set_cut(S_YREG, B); + B = B_YREG; +#ifdef YAPOR + SCH_set_load(B_YREG); +#endif /* YAPOR */ + SET_BB(B_YREG); + ENDCACHE_Y(); + JMPNext(); + ENDBOp(); + + BOp(try_clause3, l); + check_trail(TR); + CACHE_Y(YREG); + /* Point AP to the code that follows this instruction */ + { + store_yaam_regs(NEXTOP(PREG, l), 3); + B_YREG->cp_a1 = ARG1; + B_YREG->cp_a2 = ARG2; + B_YREG->cp_a3 = ARG3; + } + PREG = PREG->y_u.l.l; + set_cut(S_YREG, B); + B = B_YREG; +#ifdef YAPOR + SCH_set_load(B_YREG); +#endif /* YAPOR */ + SET_BB(B_YREG); + ENDCACHE_Y(); + JMPNext(); + ENDBOp(); + + BOp(try_clause4, l); + check_trail(TR); + CACHE_Y(YREG); + /* Point AP to the code that follows this instruction */ + { + store_yaam_regs(NEXTOP(PREG, l), 4); + B_YREG->cp_a1 = ARG1; + B_YREG->cp_a2 = ARG2; + B_YREG->cp_a3 = ARG3; + B_YREG->cp_a4 = ARG4; + } + PREG = PREG->y_u.l.l; + set_cut(S_YREG, B); + B = B_YREG; +#ifdef YAPOR + SCH_set_load(B_YREG); +#endif /* YAPOR */ + SET_BB(B_YREG); + ENDCACHE_Y(); + JMPNext(); + ENDBOp(); + + BOp(retry, Otapl); + CACHE_Y(B); + restore_yaam_regs(NEXTOP(PREG, Otapl)); + restore_at_least_one_arg(PREG->y_u.Otapl.s); +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); + set_cut(S_YREG, B->cp_b); +#else + set_cut(S_YREG, B_YREG->cp_b); +#endif /* FROZEN_STACKS */ + SET_BB(B_YREG); + ENDCACHE_Y(); + PREG = PREG->y_u.Otapl.d; + JMPNext(); + ENDBOp(); + + BOp(retry2, l); + CACHE_Y(B); + restore_yaam_regs(NEXTOP(PREG, l)); + PREG = PREG->y_u.l.l; + ARG1 = B_YREG->cp_a1; + ARG2 = B_YREG->cp_a2; +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); + set_cut(S_YREG, B->cp_b); +#else + set_cut(S_YREG, B_YREG->cp_b); +#endif /* FROZEN_STACKS */ + SET_BB(B_YREG); + ENDCACHE_Y(); + JMPNext(); + ENDBOp(); + + BOp(retry3, l); + CACHE_Y(B); + restore_yaam_regs(NEXTOP(PREG, l)); + PREG = PREG->y_u.l.l; + ARG1 = B_YREG->cp_a1; + ARG2 = B_YREG->cp_a2; + ARG3 = B_YREG->cp_a3; +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); + set_cut(S_YREG, B->cp_b); +#else + set_cut(S_YREG, B_YREG->cp_b); +#endif /* FROZEN_STACKS */ + SET_BB(B_YREG); + ENDCACHE_Y(); + JMPNext(); + ENDBOp(); + + BOp(retry4, l); + CACHE_Y(B); + restore_yaam_regs(NEXTOP(PREG, l)); + PREG = PREG->y_u.l.l; + ARG1 = B_YREG->cp_a1; + ARG2 = B_YREG->cp_a2; + ARG3 = B_YREG->cp_a3; + ARG4 = B_YREG->cp_a4; +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); + set_cut(S_YREG, B->cp_b); +#else + set_cut(S_YREG, B_YREG->cp_b); +#endif /* FROZEN_STACKS */ + SET_BB(B_YREG); + ENDCACHE_Y(); + JMPNext(); + ENDBOp(); + + BOp(trust, Otapl); + CACHE_Y(B); +#ifdef YAPOR + if (SCH_top_shared_cp(B)) { + SCH_last_alternative(PREG, B_YREG); + restore_at_least_one_arg(PREG->y_u.Otapl.s); +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B->cp_b); + } + else +#endif /* YAPOR */ + { + pop_yaam_regs(); + pop_at_least_one_arg(PREG->y_u.Otapl.s); +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B); + } + SET_BB(B_YREG); + ENDCACHE_Y(); + PREG = PREG->y_u.Otapl.d; + JMPNext(); + ENDBOp(); + + BOp(try_in, l); + B->cp_ap = NEXTOP(PREG, l); + PREG = PREG->y_u.l.l; + JMPNext(); + ENDBOp(); + + + +/************************************************************************\ +* Logical Updates * +\************************************************************************/ + + /* enter logical pred */ + BOp(enter_lu_pred, Illss); + check_trail(TR); + /* mark the indexing code */ + { + LogUpdIndex *cl = PREG->y_u.Illss.I; + PredEntry *ap = cl->ClPred; + + if (!cl) { FAIL(); } /* in case the index is empty */ + if (ap->LastCallOfPred != LUCALL_EXEC) { + /* + only increment time stamp if we are working on current time + stamp + */ + if (ap->TimeStampOfPred >= TIMESTAMP_RESET) + Yap_UpdateTimestamps(ap); + ap->TimeStampOfPred++; + ap->LastCallOfPred = LUCALL_EXEC; + /* fprintf(stderr,"R %x--%d--%ul\n",ap,ap->TimeStampOfPred,ap->ArityOfPE);*/ + } + *--YREG = MkIntegerTerm(ap->TimeStampOfPred); + /* fprintf(stderr,"> %p/%p %d %d\n",cl,ap,ap->TimeStampOfPred,PREG->y_u.Illss.s);*/ + PREG = PREG->y_u.Illss.l1; + /* indicate the indexing code is being used */ +#if MULTIPLE_STACKS + /* just store a reference */ + INC_CLREF_COUNT(cl); + TRAIL_CLREF(cl); +#else + if (!(cl->ClFlags & InUseMask)) { + cl->ClFlags |= InUseMask; + TRAIL_CLREF(cl); + } +#endif + } + JMPNext(); + ENDBOp(); + + BOp(try_logical, OtaLl); + check_trail(TR); + { + UInt timestamp; + + CACHE_Y(YREG); + timestamp = IntegerOfTerm(S_YREG[0]); + /* fprintf(stderr,"+ %p/%p %d %d %d--%u\n",PREG,PREG->y_u.OtaLl.d->ClPred,timestamp,PREG->y_u.OtaLl.d->ClPred->TimeStampOfPred,PREG->y_u.OtaLl.d->ClTimeStart,PREG->y_u.OtaLl.d->ClTimeEnd);*/ + /* Point AP to the code that follows this instruction */ + /* always do this, even if we are not going to use it */ + store_args(PREG->y_u.OtaLl.s); + store_yaam_regs(PREG->y_u.OtaLl.n, 0); + set_cut(S_YREG, B); + B = B_YREG; +#ifdef YAPOR + SCH_set_load(B_YREG); +#endif /* YAPOR */ +#ifdef YAPOR + PP = PREG->y_u.OtaLl.d->ClPred; +#endif /* YAPOR */ + if (!VALID_TIMESTAMP(timestamp, PREG->y_u.OtaLl.d)) { + /* jump to next alternative */ + PREG=PREG->y_u.OtaLl.n; + } else { + PREG = PREG->y_u.OtaLl.d->ClCode; + } + SET_BB(B_YREG); + ENDCACHE_Y(); + } + JMPNext(); + ENDBOp(); + + BOp(retry_logical, OtaLl); + check_trail(TR); + { + UInt timestamp; + CACHE_Y(B); + +#if defined(YAPOR) || defined(THREADS) + if (PP != PREG->y_u.OtaLl.d->ClPred) { + if (PP) UNLOCKPE(15,PP); + PP = PREG->y_u.OtaLl.d->ClPred; + PELOCK(15,PP); + } +#endif + timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[PREG->y_u.OtaLl.s]); + /* fprintf(stderr,"^ %p/%p %d %d %d--%u\n",PREG,PREG->y_u.OtaLl.d->ClPred,timestamp,PREG->y_u.OtaLl.d->ClPred->TimeStampOfPred,PREG->y_u.OtaLl.d->ClTimeStart,PREG->y_u.OtaLl.d->ClTimeEnd);*/ + if (!VALID_TIMESTAMP(timestamp, PREG->y_u.OtaLl.d)) { + /* jump to next instruction */ + PREG=PREG->y_u.OtaLl.n; + JMPNext(); + } + restore_yaam_regs(PREG->y_u.OtaLl.n); + restore_at_least_one_arg(PREG->y_u.OtaLl.s); +#ifdef THREADS + PP = PREG->y_u.OtaLl.d->ClPred; +#endif + PREG = PREG->y_u.OtaLl.d->ClCode; +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); + set_cut(S_YREG, B->cp_b); +#else + set_cut(S_YREG, B_YREG->cp_b); +#endif /* FROZEN_STACKS */ + SET_BB(B_YREG); + ENDCACHE_Y(); + } + JMPNext(); + ENDBOp(); + + BOp(trust_logical, OtILl); + CACHE_Y(B); + { + LogUpdIndex *cl = PREG->y_u.OtILl.block; + PredEntry *ap = cl->ClPred; + LogUpdClause *lcl = PREG->y_u.OtILl.d; + UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); + + /* fprintf(stderr,"- %p/%p %d %d %p\n",PREG,ap,timestamp,ap->TimeStampOfPred,PREG->y_u.OtILl.d->ClCode);*/ +#if defined(YAPOR) || defined(THREADS) + if (PP != ap) { + if (PP) UNLOCKPE(16,PP); + PP = ap; + PELOCK(16,PP); + } +#endif + if (!VALID_TIMESTAMP(timestamp, lcl)) { + /* jump to next alternative */ + PREG = FAILCODE; + } else { + PREG = lcl->ClCode; + } + /* HEY, leave indexing block alone!! */ + /* check if we are the ones using this code */ +#if MULTIPLE_STACKS + DEC_CLREF_COUNT(cl); + /* clear the entry from the trail */ + B->cp_tr--; + TR = B->cp_tr; + /* actually get rid of the code */ + if (cl->ClRefCount == 0 && (cl->ClFlags & (ErasedMask|DirtyMask))) { + if (PREG != FAILCODE) { + if (lcl->ClRefCount == 1) { + /* make sure the clause isn't destroyed */ + /* always add an extra reference */ + INC_CLREF_COUNT(lcl); + TRAIL_CLREF(lcl); + B->cp_tr = TR; + } + } + if (cl->ClFlags & ErasedMask) { + saveregs(); + Yap_ErLogUpdIndex(cl); + setregs(); + } else { + saveregs(); + Yap_CleanUpIndex(cl); + setregs(); + } + save_pc(); + } +#else + if (TrailTerm(B->cp_tr-1) == CLREF_TO_TRENTRY(cl) && + B->cp_tr != B->cp_b->cp_tr) { + cl->ClFlags &= ~InUseMask; + B->cp_tr--; +#if FROZEN_STACKS + if (B->cp_tr > TR_FZ) +#endif + { + TR = B->cp_tr; + } + /* next, recover space for the indexing code if it was erased */ + if (cl->ClFlags & (ErasedMask|DirtyMask)) { + if (PREG != FAILCODE) { + /* make sure we don't erase the clause we are jumping too */ + if (!(lcl->ClFlags & InUseMask)) { + lcl->ClFlags |= InUseMask; + TRAIL_CLREF(lcl); + B->cp_tr = TR; + } + } + if (cl->ClFlags & ErasedMask) { + saveregs(); + Yap_ErLogUpdIndex(cl); + setregs(); + } else { + saveregs(); + Yap_CleanUpIndex(cl); + setregs(); + } + } + } +#endif +#ifdef YAPOR + if (SCH_top_shared_cp(B)) { + SCH_last_alternative(PREG, B_YREG); + restore_args(ap->ArityOfPE); +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#else + S_YREG++; +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B->cp_b); + } else +#endif /* YAPOR */ + { + pop_yaam_regs(); + pop_args(ap->ArityOfPE); + S_YREG--; +#ifdef FROZEN_STACKS + S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); +#endif /* FROZEN_STACKS */ + set_cut(S_YREG, B); + } + SET_BB(B_YREG); + ENDCACHE_Y(); +#if defined(YAPOR) || defined(THREADS) + if (PREG == FAILCODE) { + UNLOCKPE(26,PP); + PP = NULL; + } +#endif + JMPNext(); + } + ENDBOp(); + + +/************************************************************************\ +* Indexing in ARG1 * +\************************************************************************/ + + BOp(user_switch, lp); + { + yamop *new = Yap_udi_search(PREG->y_u.lp.p); + if (!new) { + PREG = PREG->y_u.lp.l; + JMPNext(); + } + PREG = new; + JMPNext(); + } + ENDBOp(); + + BOp(switch_on_type, llll); + BEGD(d0); + d0 = CACHED_A1(); + deref_head(d0, swt_unk); + /* nonvar */ + swt_nvar: + if (IsPairTerm(d0)) { + /* pair */ + SREG = RepPair(d0); + copy_jmp_address(PREG->y_u.llll.l1); + PREG = PREG->y_u.llll.l1; + JMPNext(); + } + else if (!IsApplTerm(d0)) { + /* constant */ + copy_jmp_address(PREG->y_u.llll.l2); + PREG = PREG->y_u.llll.l2; + I_R = d0; + JMPNext(); + } + else { + /* appl */ + copy_jmp_address(PREG->y_u.llll.l3); + PREG = PREG->y_u.llll.l3; + SREG = RepAppl(d0); + JMPNext(); + } + + BEGP(pt0); + deref_body(d0, pt0, swt_unk, swt_nvar); + /* variable */ + copy_jmp_address(PREG->y_u.llll.l4); + PREG = PREG->y_u.llll.l4; + JMPNext(); + ENDP(pt0); + ENDD(d0); + ENDBOp(); + + /* specialised case where the arguments may be: + * a list; + * the empty list; + * some other atom; + * a variable; + * + */ + BOp(switch_list_nl, ollll); + ALWAYS_LOOKAHEAD(PREG->y_u.ollll.pop); + BEGD(d0); + d0 = CACHED_A1(); +#if UNIQUE_TAG_FOR_PAIRS + deref_list_head(d0, swlnl_unk_p); + swlnl_list_p: + { +#else + deref_head(d0, swlnl_unk_p); + /* non variable */ + swlnl_nvar_p: + if (__builtin_expect(IsPairTerm(d0),1)) { + /* pair */ +#endif + copy_jmp_address(PREG->y_u.ollll.l1); + PREG = PREG->y_u.ollll.l1; + SREG = RepPair(d0); + ALWAYS_GONext(); + } +#if UNIQUE_TAG_FOR_PAIRS + swlnl_nlist_p: +#endif + if (d0 == TermNil) { + /* empty list */ + PREG = PREG->y_u.ollll.l2; + JMPNext(); + } + else { + /* appl or constant */ + if (IsApplTerm(d0)) { + copy_jmp_address(PREG->y_u.ollll.l3); + PREG = PREG->y_u.ollll.l3; + SREG = RepAppl(d0); + JMPNext(); + } else { + copy_jmp_address(PREG->y_u.ollll.l3); + PREG = PREG->y_u.ollll.l3; + I_R = d0; + JMPNext(); + } + } + + BEGP(pt0); +#if UNIQUE_TAG_FOR_PAIRS + swlnl_unk_p: + deref_list_body(d0, pt0, swlnl_list_p, swlnl_nlist_p); +#else + deref_body(d0, pt0, swlnl_unk_p, swlnl_nvar_p); +#endif + ENDP(pt0); + /* variable */ + copy_jmp_address(PREG->y_u.ollll.l4); + PREG = PREG->y_u.ollll.l4; + JMPNext(); + ENDD(d0); + } + ENDBOp(); + + BOp(switch_on_arg_type, xllll); + BEGD(d0); + d0 = XREG(PREG->y_u.xllll.x); + deref_head(d0, arg_swt_unk); + /* nonvar */ + arg_swt_nvar: + if (IsPairTerm(d0)) { + /* pair */ + copy_jmp_address(PREG->y_u.xllll.l1); + PREG = PREG->y_u.xllll.l1; + SREG = RepPair(d0); + JMPNext(); + } + else if (!IsApplTerm(d0)) { + /* constant */ + copy_jmp_address(PREG->y_u.xllll.l2); + PREG = PREG->y_u.xllll.l2; + I_R = d0; + JMPNext(); + } + else { + /* appl */ + copy_jmp_address(PREG->y_u.xllll.l3); + PREG = PREG->y_u.xllll.l3; + SREG = RepAppl(d0); + JMPNext(); + } + + BEGP(pt0); + deref_body(d0, pt0, arg_swt_unk, arg_swt_nvar); + /* variable */ + copy_jmp_address(PREG->y_u.xllll.l4); + PREG = PREG->y_u.xllll.l4; + JMPNext(); + ENDP(pt0); + ENDD(d0); + ENDBOp(); + + BOp(switch_on_sub_arg_type, sllll); + BEGD(d0); + d0 = SREG[PREG->y_u.sllll.s]; + deref_head(d0, sub_arg_swt_unk); + /* nonvar */ + sub_arg_swt_nvar: + if (IsPairTerm(d0)) { + /* pair */ + copy_jmp_address(PREG->y_u.sllll.l1); + PREG = PREG->y_u.sllll.l1; + SREG = RepPair(d0); + JMPNext(); + } + else if (!IsApplTerm(d0)) { + /* constant */ + copy_jmp_address(PREG->y_u.sllll.l2); + PREG = PREG->y_u.sllll.l2; + I_R = d0; + JMPNext(); + } + else { + /* appl */ + copy_jmp_address(PREG->y_u.sllll.l3); + PREG = PREG->y_u.sllll.l3; + SREG = RepAppl(d0); + JMPNext(); + } + + BEGP(pt0); + deref_body(d0, pt0, sub_arg_swt_unk, sub_arg_swt_nvar); + /* variable */ + copy_jmp_address(PREG->y_u.sllll.l4); + PREG = PREG->y_u.sllll.l4; + JMPNext(); + ENDP(pt0); + ENDD(d0); + ENDBOp(); + + BOp(jump_if_var, l); + BEGD(d0); + d0 = CACHED_A1(); + deref_head(d0, jump_if_unk); + /* non var */ + jump0_if_nonvar: + PREG = NEXTOP(PREG, l); + JMPNext(); + + BEGP(pt0); + deref_body(d0, pt0, jump_if_unk, jump0_if_nonvar); + /* variable */ + copy_jmp_address(PREG->y_u.l.l); + PREG = PREG->y_u.l.l; + ENDP(pt0); + JMPNext(); + ENDD(d0); + ENDBOp(); + + BOp(jump_if_nonvar, xll); + BEGD(d0); + d0 = XREG(PREG->y_u.xll.x); + deref_head(d0, jump2_if_unk); + /* non var */ + jump2_if_nonvar: + copy_jmp_address(PREG->y_u.xll.l1); + PREG = PREG->y_u.xll.l1; + JMPNext(); + + BEGP(pt0); + deref_body(d0, pt0, jump2_if_unk, jump2_if_nonvar); + /* variable */ + PREG = NEXTOP(PREG, xll); + ENDP(pt0); + JMPNext(); + ENDD(d0); + ENDBOp(); + + BOp(if_not_then, clll); + BEGD(d0); + d0 = CACHED_A1(); + deref_head(d0, if_n_unk); + if_n_nvar: + /* not variable */ + if (d0 == PREG->y_u.clll.c) { + /* equal to test value */ + copy_jmp_address(PREG->y_u.clll.l2); + PREG = PREG->y_u.clll.l2; + JMPNext(); + } + else { + /* different from test value */ + /* the case to optimise */ + copy_jmp_address(PREG->y_u.clll.l1); + PREG = PREG->y_u.clll.l1; + JMPNext(); + } + + BEGP(pt0); + deref_body(d0, pt0, if_n_unk, if_n_nvar); + ENDP(pt0); + /* variable */ + copy_jmp_address(PREG->y_u.clll.l3); + PREG = PREG->y_u.clll.l3; + JMPNext(); + ENDD(d0); + ENDBOp(); + +/************************************************************************\ +* Indexing on ARG1 * +\************************************************************************/ + +#define HASH_SHIFT 6 + + BOp(switch_on_func, sssl); + BEGD(d1); + d1 = *SREG++; + /* we use a very simple hash function to find elements in a + * switch table */ + { + CELL + /* first, calculate the mask */ + Mask = (PREG->y_u.sssl.s - 1) << 1, /* next, calculate the hash function */ + hash = d1 >> (HASH_SHIFT - 1) & Mask; + CELL *base; + + base = (CELL *)PREG->y_u.sssl.l; + /* PREG now points at the beginning of the hash table */ + BEGP(pt0); + /* pt0 will always point at the item */ + pt0 = base + hash; + BEGD(d0); + d0 = pt0[0]; + /* a match happens either if we found the value, or if we + * found an empty slot */ + if (d0 == d1 || d0 == 0) { + copy_jmp_addressa(pt0+1); + PREG = (yamop *) (pt0[1]); + JMPNext(); + } + else { + /* ooops, collision, look for other items */ + register CELL d = ((d1 | 1) << 1) & Mask; + + while (1) { + hash = (hash + d) & Mask; + pt0 = base + hash; + d0 = pt0[0]; + if (d0 == d1 || d0 == 0) { + copy_jmp_addressa(pt0+1); + PREG = (yamop *) pt0[1]; + JMPNext(); + } + } + } + ENDD(d0); + ENDP(pt0); + } + ENDD(d1); + ENDBOp(); + + BOp(switch_on_cons, sssl); + BEGD(d1); + d1 = I_R; + /* we use a very simple hash function to find elements in a + * switch table */ + { + CELL + /* first, calculate the mask */ + Mask = (PREG->y_u.sssl.s - 1) << 1, /* next, calculate the hash function */ + hash = d1 >> (HASH_SHIFT - 1) & Mask; + CELL *base; + + base = (CELL *)PREG->y_u.sssl.l; + /* PREG now points at the beginning of the hash table */ + BEGP(pt0); + /* pt0 will always point at the item */ + pt0 = base + hash; + BEGD(d0); + d0 = pt0[0]; + /* a match happens either if we found the value, or if we + * found an empty slot */ + if (d0 == d1 || d0 == 0) { + copy_jmp_addressa(pt0+1); + PREG = (yamop *) (pt0[1]); + JMPNext(); + } + else { + /* ooops, collision, look for other items */ + register CELL d = ((d1 | 1) << 1) & Mask; + + while (1) { + hash = (hash + d) & Mask; + pt0 = base + hash; + d0 = pt0[0]; + if (d0 == d1 || d0 == 0) { + copy_jmp_addressa(pt0+1); + PREG = (yamop *) pt0[1]; + JMPNext(); + } + } + } + ENDD(d0); + ENDP(pt0); + } + ENDD(d1); + ENDBOp(); + + BOp(go_on_func, sssl); + BEGD(d0); + { + CELL *pt = (CELL *)(PREG->y_u.sssl.l); + + d0 = *SREG++; + if (d0 == pt[0]) { + copy_jmp_addressa(pt+1); + PREG = (yamop *) pt[1]; + JMPNext(); + } else { + copy_jmp_addressa(pt+3); + PREG = (yamop *) pt[3]; + JMPNext(); + } + } + ENDD(d0); + ENDBOp(); + + BOp(go_on_cons, sssl); + BEGD(d0); + { + CELL *pt = (CELL *)(PREG->y_u.sssl.l); + + d0 = I_R; + if (d0 == pt[0]) { + copy_jmp_addressa(pt+1); + PREG = (yamop *) pt[1]; + JMPNext(); + } else { + copy_jmp_addressa(pt+3); + PREG = (yamop *) pt[3]; + JMPNext(); + } + } + ENDD(d0); + ENDBOp(); + + BOp(if_func, sssl); + BEGD(d1); + BEGP(pt0); + pt0 = (CELL *) PREG->y_u.sssl.l; + d1 = *SREG++; + while (pt0[0] != d1 && pt0[0] != (CELL)NULL ) { + pt0 += 2; + } + copy_jmp_addressa(pt0+1); + PREG = (yamop *) (pt0[1]); + JMPNext(); + ENDP(pt0); + ENDD(d1); + ENDBOp(); + + BOp(if_cons, sssl); + BEGD(d1); + BEGP(pt0); + pt0 = (CELL *) PREG->y_u.sssl.l; + d1 = I_R; + while (pt0[0] != d1 && pt0[0] != 0L ) { + pt0 += 2; + } + copy_jmp_addressa(pt0+1); + PREG = (yamop *) (pt0[1]); + JMPNext(); + ENDP(pt0); + ENDD(d1); + ENDBOp(); + + Op(index_dbref, e); + PREG = NEXTOP(PREG, e); + I_R = AbsAppl(SREG-1); + GONext(); + ENDOp(); + + Op(index_blob, e); + PREG = NEXTOP(PREG, e); + I_R = Yap_DoubleP_key(SREG); + GONext(); + ENDOp(); + + Op(index_long, e); + PREG = NEXTOP(PREG, e); + I_R = Yap_IntP_key(SREG); + GONext(); + ENDOp(); + + + +/************************************************************************\ +* Native Code Execution * +\************************************************************************/ + + /* native_me */ + BOp(native_me, aFlp); + + if (PREG->y_u.aFlp.n) + EXEC_NATIVE(PREG->y_u.aFlp.n); + else { + PREG->y_u.aFlp.n++; + if (PREG->y_u.aFlp.n == MAX_INVOCATION) + PREG->y_u.aFlp.n = Yapc_Compile(PREG->y_u.aFlp.p); + } + + PREG = NEXTOP(PREG, aFlp); + JMPNext(); + + ENDBOp(); + + + +/************************************************************************\ +* Basic Primitive Predicates * +\************************************************************************/ + + Op(p_atom_x, xl); + BEGD(d0); + d0 = XREG(PREG->y_u.xl.x); + deref_head(d0, atom_x_unk); + atom_x_nvar: + if (IsAtomTerm(d0) && !IsBlob(AtomOfTerm(d0))) { + PREG = NEXTOP(PREG, xl); + GONext(); + } + else { + PREG = PREG->y_u.xl.F; + GONext(); + } + + BEGP(pt0); + deref_body(d0, pt0, atom_x_unk, atom_x_nvar); + PREG = PREG->y_u.xl.F; + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_atom_y, yl); + BEGD(d0); + BEGP(pt0); + pt0 = YREG + PREG->y_u.yl.y; + d0 = *pt0; + deref_head(d0, atom_y_unk); + atom_y_nvar: + if (IsAtomTerm(d0) && !IsBlob(AtomOfTerm(d0))) { + PREG = NEXTOP(PREG, yl); + GONext(); + } + else { + PREG = PREG->y_u.yl.F; + GONext(); + } + + derefa_body(d0, pt0, atom_y_unk, atom_y_nvar); + PREG = PREG->y_u.yl.F; + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_atomic_x, xl); + BEGD(d0); + d0 = XREG(PREG->y_u.xl.x); + deref_head(d0, atomic_x_unk); + atomic_x_nvar: + /* non variable */ + if (IsAtomicTerm(d0)) { + PREG = NEXTOP(PREG, xl); + GONext(); + } + else { + PREG = PREG->y_u.xl.F; + GONext(); + } + + BEGP(pt0); + deref_body(d0, pt0, atomic_x_unk, atomic_x_nvar); + PREG = PREG->y_u.xl.F; + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_atomic_y, yl); + BEGD(d0); + BEGP(pt0); + pt0 = YREG + PREG->y_u.yl.y; + d0 = *pt0; + deref_head(d0, atomic_y_unk); + atomic_y_nvar: + /* non variable */ + if (IsAtomicTerm(d0)) { + PREG = NEXTOP(PREG, yl); + GONext(); + } + else { + PREG = PREG->y_u.yl.F; + GONext(); + } + + derefa_body(d0, pt0, atomic_y_unk, atomic_y_nvar); + PREG = PREG->y_u.yl.F; + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_integer_x, xl); + BEGD(d0); + d0 = XREG(PREG->y_u.xl.x); + deref_head(d0, integer_x_unk); + integer_x_nvar: + /* non variable */ + if (IsIntTerm(d0)) { + PREG = NEXTOP(PREG, xl); + GONext(); + } + if (IsApplTerm(d0)) { + Functor f0 = FunctorOfTerm(d0); + if (IsExtensionFunctor(f0)) { + switch ((CELL)f0) { + case (CELL)FunctorBigInt: + { CELL *pt = RepAppl(d0); + if ( pt[1] != BIG_RATIONAL || pt[1] != BIG_INT ) { + PREG = PREG->y_u.xl.F; + GONext(); + } + } + break; + case (CELL)FunctorLongInt: + PREG = NEXTOP(PREG, xl); + GONext(); + break; + default: + PREG = PREG->y_u.xl.F; + GONext(); + } + } + } + PREG = PREG->y_u.xl.F; + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, integer_x_unk, integer_x_nvar); + PREG = PREG->y_u.xl.F; + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_integer_y, yl); + BEGD(d0); + BEGP(pt0); + pt0 = YREG + PREG->y_u.yl.y; + d0 = *pt0; + deref_head(d0, integer_y_unk); + integer_y_nvar: + /* non variable */ + if (IsIntTerm(d0)) { + PREG = NEXTOP(PREG, yl); + GONext(); + } + if (IsApplTerm(d0)) { + Functor f0 = FunctorOfTerm(d0); + if (IsExtensionFunctor(f0)) { + switch ((CELL)f0) { + case (CELL)FunctorBigInt: + { CELL *pt = RepAppl(d0); + if ( pt[1] != BIG_RATIONAL || pt[1] != BIG_INT ) { + PREG = PREG->y_u.yl.F; + GONext(); + } + } + case (CELL)FunctorLongInt: + PREG = NEXTOP(PREG, yl); + GONext(); + default: + PREG = PREG->y_u.yl.F; + GONext(); + } + } + } + PREG = PREG->y_u.yl.F; + GONext(); + + derefa_body(d0, pt0, integer_y_unk, integer_y_nvar); + PREG = PREG->y_u.yl.F; + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_nonvar_x, xl); + BEGD(d0); + d0 = XREG(PREG->y_u.xl.x); + deref_head(d0, nonvar_x_unk); + nonvar_x_nvar: + PREG = NEXTOP(PREG, xl); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, nonvar_x_unk, nonvar_x_nvar); + PREG = PREG->y_u.xl.F; + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_nonvar_y, yl); + BEGD(d0); + BEGP(pt0); + pt0 = YREG + PREG->y_u.yl.y; + d0 = *pt0; + deref_head(d0, nonvar_y_unk); + nonvar_y_nvar: + PREG = NEXTOP(PREG, yl); + GONext(); + + derefa_body(d0, pt0, nonvar_y_unk, nonvar_y_nvar); + PREG = PREG->y_u.yl.F; + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_number_x, xl); + BEGD(d0); + d0 = XREG(PREG->y_u.xl.x); + deref_head(d0, number_x_unk); + number_x_nvar: + /* non variable */ + if (IsIntTerm(d0)) { + PREG = NEXTOP(PREG, xl); + GONext(); + } + if (IsApplTerm(d0)) { + Functor f0 = FunctorOfTerm(d0); + if (IsExtensionFunctor(f0)) { + switch ((CELL)f0) { + case (CELL)FunctorBigInt: + { CELL *pt = RepAppl(d0); + if ( pt[1] != BIG_RATIONAL || pt[1] != BIG_INT ) { + PREG = PREG->y_u.xl.F; + GONext(); + } + } + case (CELL)FunctorLongInt: + case (CELL)FunctorDouble: + PREG = NEXTOP(PREG, xl); + GONext(); + break; + default: + PREG = PREG->y_u.xl.F; + GONext(); + } + } + } + PREG = PREG->y_u.xl.F; + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, number_x_unk, number_x_nvar); + PREG = PREG->y_u.xl.F; + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_number_y, yl); + BEGD(d0); + BEGP(pt0); + pt0 = YREG + PREG->y_u.yl.y; + d0 = *pt0; + deref_head(d0, number_y_unk); + number_y_nvar: + /* non variable */ + /* non variable */ + if (IsIntTerm(d0)) { + PREG = NEXTOP(PREG, xl); + GONext(); + } + if (IsApplTerm(d0)) { + Functor f0 = FunctorOfTerm(d0); + if (IsExtensionFunctor(f0)) { + switch ((CELL)f0) { + case (CELL)FunctorBigInt: + { CELL *pt = RepAppl(d0); + if ( pt[1] != BIG_RATIONAL || pt[1] != BIG_INT ) { + PREG = PREG->y_u.yl.F; + GONext(); + } + } + break; + case (CELL)FunctorLongInt: + case (CELL)FunctorDouble: + PREG = NEXTOP(PREG, yl); + GONext(); + break; + default: + PREG = PREG->y_u.yl.F; + GONext(); + } + } + } + PREG = PREG->y_u.yl.F; + GONext(); + + derefa_body(d0, pt0, number_y_unk, number_y_nvar); + PREG = PREG->y_u.yl.F; + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_var_x, xl); + BEGD(d0); + d0 = XREG(PREG->y_u.xl.x); + deref_head(d0, var_x_unk); + var_x_nvar: + /* non variable */ + PREG = PREG->y_u.xl.F; + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, var_x_unk, var_x_nvar); + PREG = NEXTOP(PREG, xl); + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_var_y, yl); + BEGD(d0); + BEGP(pt0); + pt0 = YREG + PREG->y_u.yl.y; + d0 = *pt0; + deref_head(d0, var_y_unk); + var_y_nvar: + /* non variable */ + PREG = PREG->y_u.yl.F; + GONext(); + + derefa_body(d0, pt0, var_y_unk, var_y_nvar); + PREG = NEXTOP(PREG, yl); + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_db_ref_x, xl); + BEGD(d0); + d0 = XREG(PREG->y_u.xl.x); + deref_head(d0, dbref_x_unk); + dbref_x_nvar: + /* non variable */ + if (IsDBRefTerm(d0)) { + /* only allow references to the database, not general references + * to go through. */ + PREG = NEXTOP(PREG, xl); + GONext(); + } + else { + PREG = PREG->y_u.xl.F; + GONext(); + } + + BEGP(pt0); + deref_body(d0, pt0, dbref_x_unk, dbref_x_nvar); + PREG = PREG->y_u.xl.F; + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_db_ref_y, yl); + BEGD(d0); + BEGP(pt0); + pt0 = YREG + PREG->y_u.yl.y; + d0 = *pt0; + deref_head(d0, dbref_y_unk); + dbref_y_nvar: + /* non variable */ + if (IsDBRefTerm(d0)) { + /* only allow references to the database, not general references + * to go through. */ + PREG = NEXTOP(PREG, yl); + GONext(); + } + else { + PREG = PREG->y_u.yl.F; + GONext(); + } + + derefa_body(d0, pt0, dbref_y_unk, dbref_y_nvar); + PREG = PREG->y_u.yl.F; + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_primitive_x, xl); + BEGD(d0); + d0 = XREG(PREG->y_u.xl.x); + deref_head(d0, primi_x_unk); + primi_x_nvar: + /* non variable */ + if (IsPrimitiveTerm(d0)) { + PREG = NEXTOP(PREG, xl); + GONext(); + } + else { + PREG = PREG->y_u.xl.F; + GONext(); + } + + BEGP(pt0); + deref_body(d0, pt0, primi_x_unk, primi_x_nvar); + PREG = PREG->y_u.xl.F; + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_primitive_y, yl); + BEGD(d0); + BEGP(pt0); + pt0 = YREG + PREG->y_u.yl.y; + d0 = *pt0; + deref_head(d0, primi_y_unk); + primi_y_nvar: + /* non variable */ + if (IsPrimitiveTerm(d0)) { + PREG = NEXTOP(PREG, yl); + GONext(); + } + else { + PREG = PREG->y_u.yl.F; + GONext(); + } + + derefa_body(d0, pt0, primi_y_unk, primi_y_nvar); + PREG = PREG->y_u.yl.F; + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_compound_x, xl); + BEGD(d0); + d0 = XREG(PREG->y_u.xl.x); + deref_head(d0, compound_x_unk); + compound_x_nvar: + /* non variable */ + if (IsPairTerm(d0)) { + PREG = NEXTOP(PREG, xl); + GONext(); + } + else if (IsApplTerm(d0)) { + if (IsExtensionFunctor(FunctorOfTerm(d0))) { + PREG = PREG->y_u.xl.F; + GONext(); + } + PREG = NEXTOP(PREG, xl); + GONext(); + } + else { + PREG = PREG->y_u.xl.F; + GONext(); + } + + BEGP(pt0); + deref_body(d0, pt0, compound_x_unk, compound_x_nvar); + PREG = PREG->y_u.xl.F; + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_compound_y, yl); + BEGD(d0); + BEGP(pt0); + pt0 = YREG + PREG->y_u.yl.y; + d0 = *pt0; + deref_head(d0, compound_y_unk); + compound_y_nvar: + /* non variable */ + if (IsPairTerm(d0)) { + PREG = NEXTOP(PREG, yl); + GONext(); + } + else if (IsApplTerm(d0)) { + if (IsExtensionFunctor(FunctorOfTerm(d0))) { + PREG = PREG->y_u.yl.F; + GONext(); + } + PREG = NEXTOP(PREG, yl); + GONext(); + } + else { + PREG = PREG->y_u.yl.F; + GONext(); + } + + derefa_body(d0, pt0, compound_y_unk, compound_y_nvar); + PREG = PREG->y_u.yl.F; + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_float_x, xl); + BEGD(d0); + d0 = XREG(PREG->y_u.xl.x); + deref_head(d0, float_x_unk); + float_x_nvar: + /* non variable */ + if (IsFloatTerm(d0)) { + PREG = NEXTOP(PREG, xl); + GONext(); + } + PREG = PREG->y_u.xl.F; + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, float_x_unk, float_x_nvar); + PREG = PREG->y_u.xl.F; + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_float_y, yl); + BEGD(d0); + BEGP(pt0); + pt0 = YREG + PREG->y_u.yl.y; + d0 = *pt0; + deref_head(d0, float_y_unk); + float_y_nvar: + /* non variable */ + if (IsFloatTerm(d0)) { + PREG = NEXTOP(PREG, yl); + GONext(); + } + PREG = PREG->y_u.yl.F; + GONext(); + + derefa_body(d0, pt0, float_y_unk, float_y_nvar); + PREG = PREG->y_u.yl.F; + GONext(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_plus_vv, xxx); + BEGD(d0); + BEGD(d1); + d0 = XREG(PREG->y_u.xxx.x1); + /* first check pt1 */ + deref_head(d0, plus_vv_unk); + plus_vv_nvar: + d1 = XREG(PREG->y_u.xxx.x2); + /* next check A2 */ + deref_head(d1, plus_vv_nvar_unk); + plus_vv_nvar_nvar: + /* d0 and d1 are where I want them */ + if (IsIntTerm(d0) && IsIntTerm(d1)) { + d0 = MkIntegerTerm(IntOfTerm(d0) + IntOfTerm(d1)); + } + else { + saveregs(); + d0 = p_plus(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + XREG(PREG->y_u.xxx.x) = d0; + PREG = NEXTOP(PREG, xxx); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, plus_vv_unk, plus_vv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is _+B"); + setregs(); + FAIL(); + ENDP(pt0); + + BEGP(pt0); + deref_body(d1, pt0, plus_vv_nvar_unk, plus_vv_nvar_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A+B"); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(p_plus_vc, xxn); + BEGD(d0); + d0 = XREG(PREG->y_u.xxn.xi); + /* first check pt1 */ + deref_head(d0, plus_vc_unk); + plus_vc_nvar: + { + Int d1 = PREG->y_u.xxn.c; + if (IsIntTerm(d0)) { + d0 = MkIntegerTerm(IntOfTerm(d0) + d1); + } + else { + saveregs(); + d0 = p_plus(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + } + XREG(PREG->y_u.xxn.x) = d0; + PREG = NEXTOP(PREG, xxn); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, plus_vc_unk, plus_vc_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A + " Int_FORMAT, PREG->y_u.xxn.c); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_plus_y_vv, yxx); + BEGD(d0); + BEGD(d1); + d0 = XREG(PREG->y_u.yxx.x1); + /* first check pt1 */ + deref_head(d0, plus_y_vv_unk); + plus_y_vv_nvar: + d1 = XREG(PREG->y_u.xxx.x2); + /* next check A2 */ + deref_head(d1, plus_y_vv_nvar_unk); + plus_y_vv_nvar_nvar: + /* d0 and d1 are where I want them */ + if (IsIntTerm(d0) && IsIntTerm(d1)) { + d0 = MkIntegerTerm(IntOfTerm(d0) + IntOfTerm(d1)); + } + else { + saveregs(); + d0 = p_plus(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + BEGP(pt0); + pt0 = YREG + PREG->y_u.yxx.y; + PREG = NEXTOP(PREG, yxx); + INITIALIZE_PERMVAR(pt0,d0); + ENDP(pt0); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, plus_y_vv_unk, plus_y_vv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A+B"); + setregs(); + FAIL(); + ENDP(pt0); + + BEGP(pt0); + deref_body(d1, pt0, plus_y_vv_nvar_unk, plus_y_vv_nvar_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A+B"); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(p_plus_y_vc, yxn); + BEGD(d0); + d0 = XREG(PREG->y_u.yxn.xi); + /* first check pt1 */ + deref_head(d0, plus_y_vc_unk); + plus_y_vc_nvar: + { + Int d1 = PREG->y_u.yxn.c; + if (IsIntTerm(d0)) { + d0 = MkIntegerTerm(IntOfTerm(d0) + d1); + } + else { + saveregs(); + d0 = p_plus(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + } + BEGP(pt0); + pt0 = YREG + PREG->y_u.yxn.y; + PREG = NEXTOP(PREG, yxn); + INITIALIZE_PERMVAR(pt0,d0); + ENDP(pt0); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, plus_y_vc_unk, plus_y_vc_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A + " Int_FORMAT, PREG->y_u.yxn.c); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_minus_vv, xxx); + BEGD(d0); + BEGD(d1); + d0 = XREG(PREG->y_u.xxx.x1); + /* first check pt1 */ + deref_head(d0, minus_vv_unk); + minus_vv_nvar: + d1 = XREG(PREG->y_u.xxx.x2); + /* next check A2 */ + deref_head(d1, minus_vv_nvar_unk); + minus_vv_nvar_nvar: + /* d0 and d1 are where I want them */ + if (IsIntTerm(d0) && IsIntTerm(d1)) { + d0 = MkIntegerTerm(IntOfTerm(d0) - IntOfTerm(d1)); + } + else { + saveregs(); + d0 = p_minus(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + XREG(PREG->y_u.xxx.x) = d0; + PREG = NEXTOP(PREG, xxx); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, minus_vv_unk, minus_vv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A-B"); + setregs(); + FAIL(); + ENDP(pt0); + + BEGP(pt0); + deref_body(d1, pt0, minus_vv_nvar_unk, minus_vv_nvar_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A-B"); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(p_minus_cv, xxn); + BEGD(d0); + d0 = XREG(PREG->y_u.xxn.xi); + /* first check pt1 */ + deref_head(d0, minus_cv_unk); + minus_cv_nvar: + { + Int d1 = PREG->y_u.xxn.c; + if (IsIntTerm(d0)) { + d0 = MkIntegerTerm(d1 - IntOfTerm(d0)); + } + else { + saveregs(); + d0 = p_minus(MkIntegerTerm(d1),Yap_Eval(d0) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + } + XREG(PREG->y_u.xxn.x) = d0; + PREG = NEXTOP(PREG, xxn); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, minus_cv_unk, minus_cv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "-A", PREG->y_u.xxn.c); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_minus_y_vv, yxx); + BEGD(d0); + BEGD(d1); + d0 = XREG(PREG->y_u.yxx.x1); + /* first check pt1 */ + deref_head(d0, minus_y_vv_unk); + minus_y_vv_nvar: + d1 = XREG(PREG->y_u.xxx.x2); + /* next check A2 */ + deref_head(d1, minus_y_vv_nvar_unk); + minus_y_vv_nvar_nvar: + /* d0 and d1 are where I want them */ + if (IsIntTerm(d0) && IsIntTerm(d1)) { + d0 = MkIntegerTerm(IntOfTerm(d0) - IntOfTerm(d1)); + } + else { + saveregs(); + d0 = p_minus(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + BEGP(pt0); + pt0 = YREG + PREG->y_u.yxx.y; + PREG = NEXTOP(PREG, yxx); + INITIALIZE_PERMVAR(pt0,d0); + ENDP(pt0); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, minus_y_vv_unk, minus_y_vv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A-B"); + setregs(); + FAIL(); + ENDP(pt0); + + BEGP(pt0); + deref_body(d1, pt0, minus_y_vv_nvar_unk, minus_y_vv_nvar_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A-B"); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(p_minus_y_cv, yxn); + BEGD(d0); + d0 = XREG(PREG->y_u.yxn.xi); + /* first check pt1 */ + deref_head(d0, minus_y_cv_unk); + minus_y_cv_nvar: + { + Int d1 = PREG->y_u.yxn.c; + if (IsIntTerm(d0)) { + d0 = MkIntegerTerm(d1 - IntOfTerm(d0)); + } + else { + saveregs(); + d0 = p_minus(MkIntegerTerm(d1), Yap_Eval(d0) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + } + BEGP(pt0); + pt0 = YREG + PREG->y_u.yxn.y; + PREG = NEXTOP(PREG, yxn); + INITIALIZE_PERMVAR(pt0,d0); + ENDP(pt0); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, minus_y_cv_unk, minus_y_cv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "-A", PREG->y_u.yxn.c); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_times_vv, xxx); + BEGD(d0); + BEGD(d1); + d0 = XREG(PREG->y_u.xxx.x1); + /* first check pt1 */ + deref_head(d0, times_vv_unk); + times_vv_nvar: + d1 = XREG(PREG->y_u.xxx.x2); + /* next check A2 */ + deref_head(d1, times_vv_nvar_unk); + times_vv_nvar_nvar: + /* d0 and d1 are where I want them */ + if (IsIntTerm(d0) && IsIntTerm(d1)) { + d0 = times_int(IntOfTerm(d0), IntOfTerm(d1) PASS_REGS); + } + else { + saveregs(); + d0 = p_times(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + XREG(PREG->y_u.xxx.x) = d0; + PREG = NEXTOP(PREG, xxx); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, times_vv_unk, times_vv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A*B"); + setregs(); + FAIL(); + ENDP(pt0); + + BEGP(pt0); + deref_body(d1, pt0, times_vv_nvar_unk, times_vv_nvar_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A*B"); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(p_times_vc, xxn); + BEGD(d0); + d0 = XREG(PREG->y_u.xxn.xi); + /* first check pt1 */ + deref_head(d0, times_vc_unk); + times_vc_nvar: + { + Int d1 = PREG->y_u.xxn.c; + if (IsIntTerm(d0)) { + d0 = times_int(IntOfTerm(d0), d1 PASS_REGS); + } + else { + saveregs(); + d0 = p_times(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + } + XREG(PREG->y_u.xxn.x) = d0; + PREG = NEXTOP(PREG, xxn); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, times_vc_unk, times_vc_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A* " Int_FORMAT, PREG->y_u.xxn.c); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_times_y_vv, yxx); + BEGD(d0); + BEGD(d1); + d0 = XREG(PREG->y_u.yxx.x1); + /* first check pt1 */ + deref_head(d0, times_y_vv_unk); + times_y_vv_nvar: + d1 = XREG(PREG->y_u.xxx.x2); + /* next check A2 */ + deref_head(d1, times_y_vv_nvar_unk); + times_y_vv_nvar_nvar: + /* d0 and d1 are where I want them */ + if (IsIntTerm(d0) && IsIntTerm(d1)) { + d0 = times_int(IntOfTerm(d0), IntOfTerm(d1) PASS_REGS); + } + else { + saveregs(); + d0 = p_times(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + BEGP(pt0); + pt0 = YREG + PREG->y_u.yxx.y; + PREG = NEXTOP(PREG, yxx); + INITIALIZE_PERMVAR(pt0,d0); + ENDP(pt0); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, times_y_vv_unk, times_y_vv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A*B"); + setregs(); + FAIL(); + ENDP(pt0); + + BEGP(pt0); + deref_body(d1, pt0, times_y_vv_nvar_unk, times_y_vv_nvar_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A*B"); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(p_times_y_vc, yxn); + BEGD(d0); + d0 = XREG(PREG->y_u.yxn.xi); + /* first check pt1 */ + deref_head(d0, times_y_vc_unk); + times_y_vc_nvar: + { + Int d1 = PREG->y_u.yxn.c; + if (IsIntTerm(d0)) { + d0 = times_int(IntOfTerm(d0), d1 PASS_REGS); + } + else { + saveregs(); + d0 = p_times(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + } + BEGP(pt0); + pt0 = YREG + PREG->y_u.yxn.y; + PREG = NEXTOP(PREG, yxn); + INITIALIZE_PERMVAR(pt0,d0); + ENDP(pt0); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, times_y_vc_unk, times_y_vc_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A* " Int_FORMAT, PREG->y_u.yxn.c); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_div_vv, xxx); + BEGD(d0); + BEGD(d1); + d0 = XREG(PREG->y_u.xxx.x1); + /* first check pt1 */ + deref_head(d0, div_vv_unk); + div_vv_nvar: + d1 = XREG(PREG->y_u.xxx.x2); + /* next check A2 */ + deref_head(d1, div_vv_nvar_unk); + div_vv_nvar_nvar: + /* d0 and d1 are where I want them */ + if (IsIntTerm(d0) && IsIntTerm(d1)) { + Int div = IntOfTerm(d1); + if (div == 0) { + saveregs(); + Yap_NilError(EVALUATION_ERROR_ZERO_DIVISOR,"// /2"); + setregs(); + FAIL(); + } + d0 = MkIntTerm(IntOfTerm(d0) / div); + } + else { + saveregs(); + d0 = p_div(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + XREG(PREG->y_u.xxx.x) = d0; + PREG = NEXTOP(PREG, xxx); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, div_vv_unk, div_vv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A//B"); + setregs(); + FAIL(); + ENDP(pt0); + + BEGP(pt0); + deref_body(d1, pt0, div_vv_nvar_unk, div_vv_nvar_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A//B"); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(p_div_vc, xxn); + BEGD(d0); + d0 = XREG(PREG->y_u.xxn.xi); + /* first check pt1 */ + deref_head(d0, div_vc_unk); + div_vc_nvar: + { + Int d1 = PREG->y_u.xxn.c; + if (IsIntTerm(d0)) { + d0 = MkIntTerm(IntOfTerm(d0) / d1); + } + else { + saveregs(); + d0 = p_div(Yap_Eval(d0),MkIntegerTerm(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + } + XREG(PREG->y_u.xxn.x) = d0; + PREG = NEXTOP(PREG, xxn); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, div_vc_unk, div_vc_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A//B"); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_div_cv, xxn); + BEGD(d0); + d0 = XREG(PREG->y_u.xxn.xi); + /* first check pt1 */ + deref_head(d0, div_cv_unk); + div_cv_nvar: + { + Int d1 = PREG->y_u.xxn.c; + if (IsIntTerm(d0)) { + Int div = IntOfTerm(d0); + if (div == 0){ + saveregs(); + Yap_NilError(EVALUATION_ERROR_ZERO_DIVISOR,"// /2"); + setregs(); + FAIL(); + } + d0 = MkIntegerTerm(d1 / div); + } + else { + saveregs(); + d0 = p_div(MkIntegerTerm(d1),Yap_Eval(d0) PASS_REGS); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + } + XREG(PREG->y_u.xxn.x) = d0; + PREG = NEXTOP(PREG, xxn); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, div_cv_unk, div_cv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "// A", PREG->y_u.xxn.c); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_div_y_vv, yxx); + BEGD(d0); + BEGD(d1); + d0 = XREG(PREG->y_u.yxx.x1); + /* first check pt1 */ + deref_head(d0, div_y_vv_unk); + div_y_vv_nvar: + d1 = XREG(PREG->y_u.xxx.x2); + /* next check A2 */ + deref_head(d1, div_y_vv_nvar_unk); + div_y_vv_nvar_nvar: + /* d0 and d1 are where I want them */ + if (IsIntTerm(d0) && IsIntTerm(d1)) { + Int div = IntOfTerm(d1); + if (div == 0) { + saveregs(); + Yap_NilError(EVALUATION_ERROR_ZERO_DIVISOR,"// /2"); + setregs(); + FAIL(); + } + d0 = MkIntTerm(IntOfTerm(d0) / div); + } + else { + saveregs(); + d0 = p_div(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + BEGP(pt0); + pt0 = YREG + PREG->y_u.yxx.y; + PREG = NEXTOP(PREG, yxx); + INITIALIZE_PERMVAR(pt0,d0); + ENDP(pt0); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, div_y_vv_unk, div_y_vv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A//B"); + setregs(); + FAIL(); + ENDP(pt0); + + BEGP(pt0); + deref_body(d1, pt0, div_y_vv_nvar_unk, div_y_vv_nvar_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A//B"); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(p_div_y_vc, yxn); + BEGD(d0); + d0 = XREG(PREG->y_u.yxn.xi); + /* first check pt1 */ + deref_head(d0, div_y_vc_unk); + div_y_vc_nvar: + { + Int d1 = PREG->y_u.yxn.c; + if (IsIntTerm(d0)) { + d0 = MkIntTerm(IntOfTerm(d0)/d1); + } + else { + saveregs(); + d0 = p_div(Yap_Eval(d0),MkIntegerTerm(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + } + BEGP(pt0); + pt0 = YREG + PREG->y_u.yxn.y; + PREG = NEXTOP(PREG, yxn); + INITIALIZE_PERMVAR(pt0,d0); + ENDP(pt0); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, div_y_vc_unk, div_y_vc_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A//B"); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_div_y_cv, yxn); + BEGD(d0); + d0 = XREG(PREG->y_u.yxn.xi); + /* first check pt1 */ + deref_head(d0, div_y_cv_unk); + div_y_cv_nvar: + { + Int d1 = PREG->y_u.yxn.c; + if (IsIntTerm(d0)) { + Int div = IntOfTerm(d0); + if (div == 0) { + saveregs(); + Yap_NilError(EVALUATION_ERROR_ZERO_DIVISOR,"// /2"); + setregs(); + FAIL(); + } + d0 = MkIntegerTerm(d1 / div); + } + else { + saveregs(); + d0 = p_div(MkIntegerTerm(d1), Yap_Eval(d0) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + } + BEGP(pt0); + pt0 = YREG + PREG->y_u.yxn.y; + PREG = NEXTOP(PREG, yxn); + INITIALIZE_PERMVAR(pt0,d0); + ENDP(pt0); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, div_y_cv_unk, div_y_cv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "// A", PREG->y_u.yxn.c); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + + Op(p_and_vv, xxx); + BEGD(d0); + BEGD(d1); + d0 = XREG(PREG->y_u.xxx.x1); + /* first check pt1 */ + deref_head(d0, and_vv_unk); + and_vv_nvar: + d1 = XREG(PREG->y_u.xxx.x2); + /* next check A2 */ + deref_head(d1, and_vv_nvar_unk); + and_vv_nvar_nvar: + /* d0 and d1 are where I want them */ + if (IsIntTerm(d0) && IsIntTerm(d1)) { + d0 = MkIntegerTerm(IntOfTerm(d0) & IntOfTerm(d1)); + } + else { + saveregs(); + d0 = p_and(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + XREG(PREG->y_u.xxx.x) = d0; + PREG = NEXTOP(PREG, xxx); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, and_vv_unk, and_vv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A/\\B"); + setregs(); + FAIL(); + ENDP(pt0); + + BEGP(pt0); + deref_body(d1, pt0, and_vv_nvar_unk, and_vv_nvar_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A/\\B"); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(p_and_vc, xxn); + BEGD(d0); + d0 = XREG(PREG->y_u.xxn.xi); + /* first check pt1 */ + deref_head(d0, and_vc_unk); + and_vc_nvar: + { + Int d1 = PREG->y_u.xxn.c; + if (IsIntTerm(d0)) { + d0 = MkIntegerTerm(IntOfTerm(d0) & d1); + } + else { + saveregs(); + d0 = p_and(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + } + XREG(PREG->y_u.xxn.x) = d0; + PREG = NEXTOP(PREG, xxn); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, and_vc_unk, and_vc_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A /\\ " Int_FORMAT , PREG->y_u.xxn.c); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_and_y_vv, yxx); + BEGD(d0); + BEGD(d1); + d0 = XREG(PREG->y_u.yxx.x1); + /* first check pt1 */ + deref_head(d0, and_y_vv_unk); + and_y_vv_nvar: + d1 = XREG(PREG->y_u.xxx.x2); + /* next check A2 */ + deref_head(d1, and_y_vv_nvar_unk); + and_y_vv_nvar_nvar: + /* d0 and d1 are where I want them */ + if (IsIntTerm(d0) && IsIntTerm(d1)) { + d0 = MkIntegerTerm(IntOfTerm(d0) & IntOfTerm(d1)); + } + else { + saveregs(); + d0 = p_and(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + BEGP(pt0); + pt0 = YREG + PREG->y_u.yxx.y; + PREG = NEXTOP(PREG, yxx); + INITIALIZE_PERMVAR(pt0,d0); + ENDP(pt0); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, and_y_vv_unk, and_y_vv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A/\\B"); + setregs(); + FAIL(); + ENDP(pt0); + + BEGP(pt0); + deref_body(d1, pt0, and_y_vv_nvar_unk, and_y_vv_nvar_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A/\\B"); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(p_and_y_vc, yxn); + BEGD(d0); + d0 = XREG(PREG->y_u.yxn.xi); + /* first check pt1 */ + deref_head(d0, and_y_vc_unk); + and_y_vc_nvar: + { + Int d1 = PREG->y_u.yxn.c; + if (IsIntTerm(d0)) { + d0 = MkIntegerTerm(IntOfTerm(d0) & d1); + } + else { + saveregs(); + d0 = p_and(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + } + BEGP(pt0); + pt0 = YREG + PREG->y_u.yxn.y; + PREG = NEXTOP(PREG, yxn); + INITIALIZE_PERMVAR(pt0,d0); + ENDP(pt0); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, and_y_vc_unk, and_y_vc_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A /\\ " Int_FORMAT , PREG->y_u.yxn.c); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + + Op(p_or_vv, xxx); + BEGD(d0); + BEGD(d1); + d0 = XREG(PREG->y_u.xxx.x1); + /* first check pt1 */ + deref_head(d0, or_vv_unk); + or_vv_nvar: + d1 = XREG(PREG->y_u.xxx.x2); + /* next check A2 */ + deref_head(d1, or_vv_nvar_unk); + or_vv_nvar_nvar: + /* d0 and d1 are where I want them */ + if (IsIntTerm(d0) && IsIntTerm(d1)) { + d0 = MkIntegerTerm(IntOfTerm(d0) | IntOfTerm(d1)); + } + else { + saveregs(); + d0 = p_or(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + XREG(PREG->y_u.xxx.x) = d0; + PREG = NEXTOP(PREG, xxx); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, or_vv_unk, or_vv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A\\/B"); + setregs(); + FAIL(); + ENDP(pt0); + + BEGP(pt0); + deref_body(d1, pt0, or_vv_nvar_unk, or_vv_nvar_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A\\/B"); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(p_or_vc, xxn); + BEGD(d0); + d0 = XREG(PREG->y_u.xxn.xi); + /* first check pt1 */ + deref_head(d0, or_vc_unk); + or_vc_nvar: + { + Int d1 = PREG->y_u.xxn.c; + if (IsIntTerm(d0)) { + d0 = MkIntegerTerm(IntOfTerm(d0) | d1); + } + else { + saveregs(); + d0 = p_or(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + } + XREG(PREG->y_u.xxn.x) = d0; + PREG = NEXTOP(PREG, xxn); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, or_vc_unk, or_vc_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A \\/ " Int_FORMAT , PREG->y_u.xxn.c); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_or_y_vv, yxx); + BEGD(d0); + BEGD(d1); + d0 = XREG(PREG->y_u.yxx.x1); + /* first check pt1 */ + deref_head(d0, or_y_vv_unk); + or_y_vv_nvar: + d1 = XREG(PREG->y_u.xxx.x2); + /* next check A2 */ + deref_head(d1, or_y_vv_nvar_unk); + or_y_vv_nvar_nvar: + /* d0 and d1 are where I want them */ + if (IsIntTerm(d0) && IsIntTerm(d1)) { + d0 = MkIntegerTerm(IntOfTerm(d0) | IntOfTerm(d1)); + } + else { + saveregs(); + d0 = p_or(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + BEGP(pt0); + pt0 = YREG + PREG->y_u.yxx.y; + PREG = NEXTOP(PREG, yxx); + INITIALIZE_PERMVAR(pt0,d0); + ENDP(pt0); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, or_y_vv_unk, or_y_vv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A\\/B"); + setregs(); + FAIL(); + ENDP(pt0); + + BEGP(pt0); + deref_body(d1, pt0, or_y_vv_nvar_unk, or_y_vv_nvar_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A\\/B"); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(p_or_y_vc, yxn); + BEGD(d0); + d0 = XREG(PREG->y_u.yxn.xi); + /* first check pt1 */ + deref_head(d0, or_y_vc_unk); + or_y_vc_nvar: + { + Int d1 = PREG->y_u.yxn.c; + if (IsIntTerm(d0)) { + d0 = MkIntegerTerm(IntOfTerm(d0) | d1); + } + else { + saveregs(); + d0 = p_or(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + } + BEGP(pt0); + pt0 = YREG + PREG->y_u.yxn.y; + PREG = NEXTOP(PREG, yxn); + INITIALIZE_PERMVAR(pt0,d0); + ENDP(pt0); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, or_y_vc_unk, or_y_vc_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A \\/ " Int_FORMAT , PREG->y_u.yxn.c); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_sll_vv, xxx); + BEGD(d0); + BEGD(d1); + d0 = XREG(PREG->y_u.xxx.x1); + /* first check pt1 */ + deref_head(d0, sll_vv_unk); + sll_vv_nvar: + d1 = XREG(PREG->y_u.xxx.x2); + /* next check A2 */ + deref_head(d1, sll_vv_nvar_unk); + sll_vv_nvar_nvar: + /* d0 and d1 are where I want them */ + if (IsIntTerm(d0) && IsIntTerm(d1)) { + Int i2 = IntOfTerm(d1); + if (i2 < 0) + d0 = MkIntegerTerm(SLR(IntOfTerm(d0), -i2)); + else + d0 = do_sll(IntOfTerm(d0),i2 PASS_REGS); + } + else { + saveregs(); + d0 = p_sll(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); + setregs(); + } + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + XREG(PREG->y_u.xxx.x) = d0; + PREG = NEXTOP(PREG, xxx); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, sll_vv_unk, sll_vv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A<y_u.xxn.xi); + /* first check pt1 */ + deref_head(d0, sll_vc_unk); + sll_vc_nvar: + { + Int d1 = PREG->y_u.xxn.c; + if (IsIntTerm(d0)) { + d0 = do_sll(IntOfTerm(d0), (Int)d1 PASS_REGS); + } + else { + saveregs(); + d0 = p_sll(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); + setregs(); + } + } + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + XREG(PREG->y_u.xxn.x) = d0; + PREG = NEXTOP(PREG, xxn); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, sll_vc_unk, sll_vc_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A<y_u.xxn.xi); + /* first check pt1 */ + deref_head(d0, sll_cv_unk); + sll_cv_nvar: + { + Int d1 = PREG->y_u.xxn.c; + if (IsIntTerm(d0)) { + Int i2 = IntOfTerm(d0); + if (i2 < 0) + d0 = MkIntegerTerm(SLR(d1, -i2)); + else + d0 = do_sll(d1,i2 PASS_REGS); + } + else { + saveregs(); + d0 = p_sll(MkIntegerTerm(d1), Yap_Eval(d0) PASS_REGS); + setregs(); + } + } + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + XREG(PREG->y_u.xxn.x) = d0; + PREG = NEXTOP(PREG, xxn); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, sll_cv_unk, sll_cv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A<y_u.yxx.x1); + /* first check pt1 */ + deref_head(d0, sll_y_vv_unk); + sll_y_vv_nvar: + d1 = XREG(PREG->y_u.xxx.x2); + /* next check A2 */ + deref_head(d1, sll_y_vv_nvar_unk); + sll_y_vv_nvar_nvar: + /* d0 and d1 are where I want them */ + if (IsIntTerm(d0) && IsIntTerm(d1)) { + Int i2 = IntOfTerm(d1); + if (i2 < 0) + d0 = MkIntegerTerm(SLR(IntOfTerm(d0), -i2)); + else + d0 = do_sll(IntOfTerm(d0),i2 PASS_REGS); + } + else { + saveregs(); + d0 = p_sll(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); + setregs(); + } + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + BEGP(pt0); + pt0 = YREG + PREG->y_u.yxx.y; + PREG = NEXTOP(PREG, yxx); + INITIALIZE_PERMVAR(pt0,d0); + ENDP(pt0); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, sll_y_vv_unk, sll_y_vv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A<y_u.yxn.xi); + /* first check pt1 */ + deref_head(d0, sll_y_vc_unk); + sll_y_vc_nvar: + { + Int d1 = PREG->y_u.yxn.c; + if (IsIntTerm(d0)) { + d0 = do_sll(IntOfTerm(d0), Yap_Eval(d1) PASS_REGS); + } + else { + saveregs(); + d0 = p_sll(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); + setregs(); + } + } + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + BEGP(pt0); + pt0 = YREG + PREG->y_u.yxn.y; + PREG = NEXTOP(PREG, yxn); + INITIALIZE_PERMVAR(pt0,d0); + ENDP(pt0); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, sll_y_vc_unk, sll_y_vc_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A<y_u.yxn.xi); + /* first check pt1 */ + deref_head(d0, sll_y_cv_unk); + sll_y_cv_nvar: + { + Int d1 = PREG->y_u.yxn.c; + if (IsIntTerm(d0)) { + Int i2 = IntOfTerm(d0); + if (i2 < 0) + d0 = MkIntegerTerm(SLR(d1, -i2)); + else + d0 = do_sll(d1,i2 PASS_REGS); + } + else { + saveregs(); + d0 = p_sll(MkIntegerTerm(d1), Yap_Eval(0) PASS_REGS); + setregs(); + } + } + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + BEGP(pt0); + pt0 = YREG + PREG->y_u.yxn.y; + PREG = NEXTOP(PREG, yxn); + INITIALIZE_PERMVAR(pt0,d0); + ENDP(pt0); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, sll_y_cv_unk, sll_y_cv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A<y_u.xxx.x1); + /* first check pt1 */ + deref_head(d0, slr_vv_unk); + slr_vv_nvar: + d1 = XREG(PREG->y_u.xxx.x2); + /* next check A2 */ + deref_head(d1, slr_vv_nvar_unk); + slr_vv_nvar_nvar: + /* d0 and d1 are where I want them */ + if (IsIntTerm(d0) && IsIntTerm(d1)) { + Int i2 = IntOfTerm(d1); + if (i2 < 0) + d0 = do_sll(IntOfTerm(d0), -i2 PASS_REGS); + else + d0 = MkIntTerm(SLR(IntOfTerm(d0), i2)); + } + else { + saveregs(); + d0 = p_slr(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); + setregs(); + } + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + XREG(PREG->y_u.xxx.x) = d0; + PREG = NEXTOP(PREG, xxx); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, slr_vv_unk, slr_vv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A>>B"); + setregs(); + FAIL(); + ENDP(pt0); + + BEGP(pt0); + deref_body(d1, pt0, slr_vv_nvar_unk, slr_vv_nvar_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A>>B"); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(p_slr_vc, xxn); + BEGD(d0); + d0 = XREG(PREG->y_u.xxn.xi); + /* first check pt1 */ + deref_head(d0, slr_vc_unk); + slr_vc_nvar: + { + Int d1 = PREG->y_u.xxn.c; + if (IsIntTerm(d0)) { + d0 = MkIntTerm(SLR(IntOfTerm(d0), d1)); + } + else { + saveregs(); + d0 = p_slr(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + } + XREG(PREG->y_u.xxn.x) = d0; + PREG = NEXTOP(PREG, xxn); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, slr_vc_unk, slr_vc_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A>>B"); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_slr_cv, xxn); + BEGD(d0); + d0 = XREG(PREG->y_u.xxn.xi); + /* first check pt1 */ + deref_head(d0, slr_cv_unk); + slr_cv_nvar: + { + Int d1 = PREG->y_u.xxn.c; + if (IsIntTerm(d0)) { + Int i2 = IntOfTerm(d0); + if (i2 < 0) + d0 = do_sll(d1, -i2 PASS_REGS); + else + d0 = MkIntegerTerm(SLR(d1, i2)); + } + else { + saveregs(); + d0 = p_slr(MkIntegerTerm(d1), Yap_Eval(d0) PASS_REGS); + setregs(); + } + } + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + XREG(PREG->y_u.xxn.x) = d0; + PREG = NEXTOP(PREG, xxn); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, slr_cv_unk, slr_cv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A>>B"); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_slr_y_vv, yxx); + BEGD(d0); + BEGD(d1); + d0 = XREG(PREG->y_u.yxx.x1); + /* first check pt1 */ + deref_head(d0, slr_y_vv_unk); + slr_y_vv_nvar: + d1 = XREG(PREG->y_u.xxx.x2); + /* next check A2 */ + deref_head(d1, slr_y_vv_nvar_unk); + slr_y_vv_nvar_nvar: + /* d0 and d1 are where I want them */ + if (IsIntTerm(d0) && IsIntTerm(d1)) { + Int i2 = IntOfTerm(d1); + if (i2 < 0) + d0 = do_sll(IntOfTerm(d0), -i2 PASS_REGS); + else + d0 = MkIntTerm(SLR(IntOfTerm(d0), i2)); + } + else { + saveregs(); + d0 = p_slr(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); + setregs(); + } + BEGP(pt0); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + pt0 = YREG + PREG->y_u.yxx.y; + PREG = NEXTOP(PREG, yxx); + INITIALIZE_PERMVAR(pt0,d0); + ENDP(pt0); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, slr_y_vv_unk, slr_y_vv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A>>B"); + setregs(); + FAIL(); + ENDP(pt0); + + BEGP(pt0); + deref_body(d1, pt0, slr_y_vv_nvar_unk, slr_y_vv_nvar_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A>>B"); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(p_slr_y_vc, yxn); + BEGD(d0); + d0 = XREG(PREG->y_u.yxn.xi); + /* first check pt1 */ + deref_head(d0, slr_y_vc_unk); + slr_y_vc_nvar: + { + Int d1 = PREG->y_u.yxn.c; + if (IsIntTerm(d0)) { + d0 = MkIntTerm(SLR(IntOfTerm(d0), d1)); + } + else { + saveregs(); + d0 = p_slr(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); + setregs(); + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + } + } + BEGP(pt0); + pt0 = YREG + PREG->y_u.yxn.y; + PREG = NEXTOP(PREG, yxn); + INITIALIZE_PERMVAR(pt0,d0); + ENDP(pt0); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, slr_y_vc_unk, slr_y_vc_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A>>B"); + setregs(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + Op(p_slr_y_cv, yxn); + BEGD(d0); + d0 = XREG(PREG->y_u.yxn.xi); + /* first check pt1 */ + deref_head(d0, slr_y_cv_unk); + slr_y_cv_nvar: + { + Int d1 = PREG->y_u.yxn.c; + if (IsIntTerm(d0)) { + Int i2 = IntOfTerm(d0); + if (i2 < 0) + d0 = do_sll(d1, -i2 PASS_REGS); + else + d0 = MkIntegerTerm(SLR(d1, i2)); + } + else { + saveregs(); + d0 = p_slr(MkIntegerTerm(d1), Yap_Eval(d0) PASS_REGS); + setregs(); + } + } + if (d0 == 0L) { + saveregs(); + Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); + setregs(); + FAIL(); + } + BEGP(pt0); + pt0 = YREG + PREG->y_u.yxn.y; + PREG = NEXTOP(PREG, yxn); + INITIALIZE_PERMVAR(pt0,d0); + ENDP(pt0); + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, slr_y_cv_unk, slr_y_cv_nvar); + saveregs(); + Yap_NilError(INSTANTIATION_ERROR, "X is A>>B"); + setregs(); + FAIL(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + BOp(call_bfunc_xx, plxxs); + BEGD(d0); + BEGD(d1); + d0 = XREG(PREG->y_u.plxxs.x1); + call_bfunc_xx_nvar: + d1 = XREG(PREG->y_u.plxxs.x2); + call_bfunc_xx2_nvar: + deref_head(d0, call_bfunc_xx_unk); + deref_head(d1, call_bfunc_xx2_unk); + if (IsIntTerm(d0) && IsIntTerm(d1)) { + COUNT flags; + + Int v = IntOfTerm(d0) - IntOfTerm(d1); + flags = PREG->y_u.plxxs.flags; + if (v > 0) { + if (flags & GT_OK_IN_CMP) { + yamop *nextp = NEXTOP(PREG, plxxs); + ALWAYS_LOOKAHEAD(nextp->opc); + PREG = nextp; + ALWAYS_GONext(); + ALWAYS_END_PREFETCH(); + } else { + yamop *nextp = PREG->y_u.plxxs.f; + ALWAYS_LOOKAHEAD(nextp->opc); + PREG = nextp; + ALWAYS_GONext(); + ALWAYS_END_PREFETCH(); + } + } else if (v < 0) { + if (flags & LT_OK_IN_CMP) { + yamop *nextp = NEXTOP(PREG, plxxs); + ALWAYS_LOOKAHEAD(nextp->opc); + PREG = nextp; + ALWAYS_GONext(); + ALWAYS_END_PREFETCH(); + } else { + yamop *nextp = PREG->y_u.plxxs.f; + ALWAYS_LOOKAHEAD(nextp->opc); + PREG = nextp; + ALWAYS_GONext(); + ALWAYS_END_PREFETCH(); + } + } else /* if (v == 0) */ { + if (flags & EQ_OK_IN_CMP) { + yamop *nextp = NEXTOP(PREG, plxxs); + ALWAYS_LOOKAHEAD(nextp->opc); + PREG = nextp; + ALWAYS_GONext(); + ALWAYS_END_PREFETCH(); + } else { + yamop *nextp = PREG->y_u.plxxs.f; + ALWAYS_LOOKAHEAD(nextp->opc); + PREG = nextp; + ALWAYS_GONext(); + ALWAYS_END_PREFETCH(); + } + } + } + exec_bin_cmp_xx: + { + CmpPredicate f = PREG->y_u.plxxs.p->cs.d_code; + saveregs(); + d0 = (CELL) (f) (d0,d1); + setregs(); + } + if (PREG == FAILCODE) { + JMPNext(); + } + if (!d0) { + PREG = PREG->y_u.plxxs.f; + JMPNext(); + } + PREG = NEXTOP(PREG, plxxs); + JMPNext(); + + BEGP(pt0); + deref_body(d0, pt0, call_bfunc_xx_unk, call_bfunc_xx_nvar); + d1 = Deref(d1); + goto exec_bin_cmp_xx; + ENDP(pt0); + + BEGP(pt0); + deref_body(d1, pt0, call_bfunc_xx2_unk, call_bfunc_xx2_nvar); + goto exec_bin_cmp_xx; + ENDP(pt0); + + ENDD(d1); + ENDD(d0); + ENDBOp(); + + BOp(call_bfunc_yx, plxys); + BEGD(d0); + BEGD(d1); + BEGP(pt0); + pt0 = YREG + PREG->y_u.plxys.y; + d1 = XREG(PREG->y_u.plxys.x); + d0 = *pt0; + ENDP(pt0); + deref_head(d0, call_bfunc_yx_unk); + call_bfunc_yx_nvar: + deref_head(d1, call_bfunc_yx2_unk); + call_bfunc_yx2_nvar: + if (IsIntTerm(d0) && IsIntTerm(d1)) { + int flags; + + Int v = IntOfTerm(d0) - IntOfTerm(d1); + flags = PREG->y_u.plxys.flags; + if (v > 0) { + if (flags & GT_OK_IN_CMP) { + PREG = NEXTOP(PREG, plxys); + JMPNext(); + } else { + PREG = PREG->y_u.plxys.f; + JMPNext(); + } + } else if (v < 0) { + if (flags & LT_OK_IN_CMP) { + PREG = NEXTOP(PREG, plxys); + JMPNext(); + } else { + PREG = PREG->y_u.plxys.f; + JMPNext(); + } + } else /* if (v == 0) */ { + if (flags & EQ_OK_IN_CMP) { + PREG = NEXTOP(PREG, plxys); + JMPNext(); + } else { + PREG = PREG->y_u.plxys.f; + JMPNext(); + } + } + } + exec_bin_cmp_yx: + { + CmpPredicate f = PREG->y_u.plxys.p->cs.d_code; + saveregs(); + d0 = (CELL) (f) (d0,d1); + setregs(); + } + if (!d0 || PREG == FAILCODE) { + if (PREG != FAILCODE) + PREG = PREG->y_u.plxys.f; + JMPNext(); + } + PREG = NEXTOP(PREG, plxys); + JMPNext(); + + BEGP(pt0); + deref_body(d0, pt0, call_bfunc_yx_unk, call_bfunc_yx_nvar); + d1 = Deref(d1); + goto exec_bin_cmp_yx; + ENDP(pt0); + + BEGP(pt0); + deref_body(d1, pt0, call_bfunc_yx2_unk, call_bfunc_yx2_nvar); + goto exec_bin_cmp_yx; + ENDP(pt0); + + ENDD(d1); + ENDD(d0); + ENDBOp(); + + BOp(call_bfunc_xy, plxys); + BEGD(d0); + BEGD(d1); + BEGP(pt0); + pt0 = YREG + PREG->y_u.plxys.y; + d0 = XREG(PREG->y_u.plxys.x); + d1 = *pt0; + ENDP(pt0); + deref_head(d0, call_bfunc_xy_unk); + call_bfunc_xy_nvar: + deref_head(d1, call_bfunc_xy2_unk); + call_bfunc_xy2_nvar: + if (IsIntTerm(d0) && IsIntTerm(d1)) { + int flags; + + Int v = IntOfTerm(d0) - IntOfTerm(d1); + flags = PREG->y_u.plxys.flags; + if (v > 0) { + if (flags & GT_OK_IN_CMP) { + PREG = NEXTOP(PREG, plxys); + JMPNext(); + } else { + PREG = PREG->y_u.plxys.f; + JMPNext(); + } + } else if (v < 0) { + if (flags & LT_OK_IN_CMP) { + PREG = NEXTOP(PREG, plxys); + JMPNext(); + } else { + PREG = PREG->y_u.plxys.f; + JMPNext(); + } + } else /* if (v == 0) */ { + if (flags & EQ_OK_IN_CMP) { + PREG = NEXTOP(PREG, plxys); + JMPNext(); + } else { + PREG = PREG->y_u.plxys.f; + JMPNext(); + } + } + } + exec_bin_cmp_xy: + { + CmpPredicate f = PREG->y_u.plxys.p->cs.d_code; + saveregs(); + d0 = (CELL) (f) (d0,d1); + setregs(); + } + if (!d0 || PREG == FAILCODE) { + if (PREG != FAILCODE) + PREG = PREG->y_u.plxys.f; + JMPNext(); + } + PREG = NEXTOP(PREG, plxys); + JMPNext(); + + BEGP(pt0); + deref_body(d0, pt0, call_bfunc_xy_unk, call_bfunc_xy_nvar); + d1 = Deref(d1); + goto exec_bin_cmp_xy; + ENDP(pt0); + + BEGP(pt0); + deref_body(d1, pt0, call_bfunc_xy2_unk, call_bfunc_xy2_nvar); + goto exec_bin_cmp_xy; + ENDP(pt0); + + ENDD(d1); + ENDD(d0); + ENDBOp(); + + BOp(call_bfunc_yy, plyys); + BEGD(d0); + BEGD(d1); + BEGP(pt0); + pt0 = YREG + PREG->y_u.plyys.y1; + BEGP(pt1); + pt1 = YREG + PREG->y_u.plyys.y2; + d0 = *pt0; + d1 = *pt1; + ENDP(pt1); + ENDP(pt0); + deref_head(d0, call_bfunc_yy_unk); + call_bfunc_yy_nvar: + deref_head(d1, call_bfunc_yy2_unk); + call_bfunc_yy2_nvar: + if (IsIntTerm(d0) && IsIntTerm(d1)) { + int flags; + + Int v = IntOfTerm(d0) - IntOfTerm(d1); + flags = PREG->y_u.plyys.flags; + if (v > 0) { + if (flags & GT_OK_IN_CMP) { + PREG = NEXTOP(PREG, plyys); + JMPNext(); + } else { + PREG = PREG->y_u.plyys.f; + JMPNext(); + } + } else if (v < 0) { + if (flags & LT_OK_IN_CMP) { + PREG = NEXTOP(PREG, plyys); + JMPNext(); + } else { + PREG = PREG->y_u.plyys.f; + JMPNext(); + } + } else /* if (v == 0) */ { + if (flags & EQ_OK_IN_CMP) { + PREG = NEXTOP(PREG, plyys); + JMPNext(); + } else { + PREG = PREG->y_u.plyys.f; + JMPNext(); + } + } + } + exec_bin_cmp_yy: + { + CmpPredicate f = PREG->y_u.plyys.p->cs.d_code; + saveregs(); + d0 = (CELL) (f) (d0,d1); + setregs(); + } + if (!d0 || PREG == FAILCODE) { + if (PREG != FAILCODE) + PREG = PREG->y_u.plyys.f; + JMPNext(); + } + PREG = NEXTOP(PREG, plyys); + JMPNext(); + + BEGP(pt0); + deref_body(d0, pt0, call_bfunc_yy_unk, call_bfunc_yy_nvar); + d1 = Deref(d1); + goto exec_bin_cmp_yy; + ENDP(pt0); + + BEGP(pt0); + deref_body(d1, pt0, call_bfunc_yy2_unk, call_bfunc_yy2_nvar); + goto exec_bin_cmp_yy; + ENDP(pt0); + + ENDD(d1); + ENDD(d0); + ENDBOp(); + + Op(p_equal, e); + save_hb(); + if (Yap_IUnify(ARG1, ARG2) == false) { + FAIL(); + } + PREG = NEXTOP(PREG, e); + GONext(); + ENDOp(); + + Op(p_dif, l); +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorDiff,0)),XREGS+1); +#endif /* LOW_LEVEL_TRACE */ + BEGD(d0); + BEGD(d1); + d0 = ARG1; + deref_head(d0, dif_unk1); + dif_nvar1: + /* first argument is bound */ + d1 = ARG2; + deref_head(d1, dif_nvar1_unk2); + dif_nvar1_nvar2: + /* both arguments are bound */ + if (d0 == d1) { + PREG = PREG->y_u.l.l; + GONext(); + } + if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { + PREG = NEXTOP(PREG, l); + GONext(); + } + { + Int opresult; +#ifdef COROUTINING + /* + * We may wake up goals during our attempt to unify the + * two terms. If we are adding to the tail of a list of + * woken goals that should be ok, but otherwise we need + * to restore LOCAL_WokenGoals to its previous value. + */ + CELL OldWokenGoals = Yap_ReadTimedVar(LOCAL_WokenGoals); + +#endif + /* We will have to look inside compound terms */ + register tr_fr_ptr pt0; + /* store the old value of TR for clearing bindings */ + pt0 = TR; + BEGCHO(pt1); + pt1 = B; + /* make B and HB point to H to guarantee all bindings will + * be trailed + */ + HBREG = HR; + B = (choiceptr) HR; + B->cp_h = HR; + SET_BB(B); + save_hb(); + opresult = Yap_IUnify(d0, d1); +#ifdef COROUTINING + /* now restore Woken Goals to its old value */ + Yap_UpdateTimedVar(LOCAL_WokenGoals, OldWokenGoals); + if (OldWokenGoals == TermNil) { + Yap_get_signal(YAP_WAKEUP_SIGNAL); + } +#endif + /* restore B */ + B = pt1; + SET_BB(PROTECT_FROZEN_B(pt1)); +#ifdef COROUTINING + HR = HBREG; +#endif + HBREG = B->cp_h; + /* untrail all bindings made by Yap_IUnify */ + while (TR != pt0) { + BEGD(d1); + d1 = TrailTerm(--TR); + if (IsVarTerm(d1)) { +#if defined(YAPOR_SBA) && defined(YAPOR) + /* clean up the trail when we backtrack */ + if (Unsigned((Int)(d1)-(Int)(H_FZ)) > + Unsigned((Int)(B_FZ)-(Int)(H_FZ))) { + RESET_VARIABLE(STACK_TO_SBA(d1)); + } else +#endif + /* normal variable */ + RESET_VARIABLE(d1); +#ifdef MULTI_ASSIGNMENT_VARIABLES + } else /* if (IsApplTerm(d1)) */ { + CELL *pt = RepAppl(d1); + /* AbsAppl means */ + /* multi-assignment variable */ + /* so the next cell is the old value */ +#ifdef FROZEN_STACKS + pt[0] = TrailVal(--TR); +#else + pt[0] = TrailTerm(--TR); + TR--; +#endif /* FROZEN_STACKS */ +#endif /* MULTI_ASSIGNMENT_VARIABLES */ + } + ENDD(d1); + } + if (opresult) { + /* restore B, no need to restore HB */ + PREG = PREG->y_u.l.l; + GONext(); + } + /* restore B, and later HB */ + PREG = NEXTOP(PREG, l); + ENDCHO(pt1); + } + GONext(); + + BEGP(pt0); + deref_body(d0, pt0, dif_unk1, dif_nvar1); + ENDP(pt0); + /* first argument is unbound */ + PREG = PREG->y_u.l.l; + GONext(); + + BEGP(pt0); + deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); + ENDP(pt0); + /* second argument is unbound */ + PREG = PREG->y_u.l.l; + GONext(); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(p_eq, l); +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorSame,0)),XREGS+1); +#endif /* LOW_LEVEL_TRACE */ + BEGD(d0); + BEGD(d1); + d0 = ARG1; + deref_head(d0, p_eq_unk1); + p_eq_nvar1: + /* first argument is bound */ + d1 = ARG2; + deref_head(d1, p_eq_nvar1_unk2); + p_eq_nvar1_nvar2: + /* both arguments are bound */ + if (d0 == d1) { + PREG = NEXTOP(PREG, l); + GONext(); + } + if (IsPairTerm(d0)) { + if (!IsPairTerm(d1)) { + PREG = PREG->y_u.l.l; + GONext(); + } + BEGD(d2); + always_save_pc(); + d2 = iequ_complex(RepPair(d0)-1, RepPair(d0)+1,RepPair(d1)-1); + if (d2 == false) { + PREG = PREG->y_u.l.l; + GONext(); + } + ENDD(d2); + always_set_pc(); + PREG = NEXTOP(PREG, l); + GONext(); + } + if (IsApplTerm(d0)) { + Functor f0 = FunctorOfTerm(d0); + Functor f1; + + /* f1 must be a compound term, even if it is a suspension */ + if (!IsApplTerm(d1)) { + PREG = PREG->y_u.l.l; + GONext(); + } + f1 = FunctorOfTerm(d1); + + /* we now know f1 is true */ + /* deref if a compound term */ + if (IsExtensionFunctor(f0)) { + switch ((CELL)f0) { + case (CELL)FunctorDBRef: + if (d0 == d1) { + PREG = NEXTOP(PREG, l); + GONext(); + } + PREG = PREG->y_u.l.l; + GONext(); + case (CELL)FunctorLongInt: + if (f1 != FunctorLongInt) { + PREG = PREG->y_u.l.l; + GONext(); + } + if (LongIntOfTerm(d0) == LongIntOfTerm(d1)) { + PREG = NEXTOP(PREG, l); + GONext(); + } + PREG = PREG->y_u.l.l; + GONext(); + case (CELL)FunctorString: + if (f1 != FunctorString) { + PREG = PREG->y_u.l.l; + GONext(); + } + if (strcmp((char *)(RepAppl(d0)+2),(char *)(RepAppl(d1)+2)) == 0) { + PREG = NEXTOP(PREG, l); + GONext(); + } + PREG = PREG->y_u.l.l; + GONext(); + break; +#ifdef USE_GMP + case (CELL)FunctorBigInt: + if (f1 != FunctorBigInt) { + PREG = PREG->y_u.l.l; + GONext(); + } + if (Yap_gmp_tcmp_big_big(d0,d1) == 0) { + PREG = NEXTOP(PREG, l); + GONext(); + } + PREG = PREG->y_u.l.l; + GONext(); +#endif + case (CELL)FunctorDouble: + if (f1 != FunctorDouble) { + PREG = PREG->y_u.l.l; + GONext(); + } + if (FloatOfTerm(d0) == FloatOfTerm(d1)) { + PREG = NEXTOP(PREG, l); + GONext(); + } + PREG = PREG->y_u.l.l; + GONext(); + break; + default: + PREG = PREG->y_u.l.l; + GONext(); + } + } + if (f0 != f1) { + PREG = PREG->y_u.l.l; + GONext(); + } + always_save_pc(); + BEGD(d2); + d2 = iequ_complex(RepAppl(d0), RepAppl(d0)+ArityOfFunctor(f0), RepAppl(d1)); + if (d2 == false) { + PREG = PREG->y_u.l.l; + GONext(); + } + ENDD(d2); + always_set_pc(); + PREG = NEXTOP(PREG, l); + GONext(); + } + PREG = PREG->y_u.l.l; + GONext(); + + BEGP(pt0); + deref_body(d1, pt0, p_eq_nvar1_unk2, p_eq_nvar1_nvar2); + ENDP(pt0); + /* first argument is bound */ + /* second argument is unbound */ + /* I don't need to worry about co-routining because an + unbound variable may never be == to a constrained variable!! */ + PREG = PREG->y_u.l.l; + GONext(); + ENDD(d1); + + BEGP(pt0); + deref_body(d0, pt0, p_eq_unk1, p_eq_nvar1); + BEGD(d1); + d1 = ARG2; + deref_head(d1, p_eq_var1_unk2); + p_eq_var1_nvar2: + /* I don't need to worry about co-routining because an + unbound variable may never be == to a constrained variable!! */ + PREG = PREG->y_u.l.l; + GONext(); + + BEGP(pt1); + deref_body(d1, pt1, p_eq_var1_unk2, p_eq_var1_nvar2); + /* first argument is unbound */ + /* second argument is unbound */ + if (pt1 != pt0) { + PREG = PREG->y_u.l.l; + GONext(); + } + PREG = NEXTOP(PREG, l); + GONext(); + ENDP(pt1); + ENDD(d1); + ENDP(pt0); + + ENDD(d0); + ENDOp(); + + Op(p_arg_vv, xxx); +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) { + HR[0] = XREG(PREG->y_u.xxx.x1); + HR[1] = XREG(PREG->y_u.xxx.x2); + RESET_VARIABLE(HR+2); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); + } +#endif /* LOW_LEVEL_TRACE */ + BEGD(d0); + d0 = XREG(PREG->y_u.xxx.x1); + deref_head(d0, arg_arg1_unk); + arg_arg1_nvar: + /* ARG1 is ok! */ + if (IsIntTerm(d0)) + d0 = IntOfTerm(d0); + else if (IsLongIntTerm(d0)) { + d0 = LongIntOfTerm(d0); + } else { + if (IsBigIntTerm( d0 )) + FAIL(); + saveregs(); + Yap_Error(TYPE_ERROR_INTEGER,d0,"arg 1 of arg/3"); + setregs(); + FAIL(); + } + + /* d0 now got the argument we want */ + BEGD(d1); + d1 = XREG(PREG->y_u.xxx.x2); + deref_head(d1, arg_arg2_unk); + arg_arg2_nvar: + /* d1 now got the structure we want to fetch the argument + * from */ + if (IsApplTerm(d1)) { + BEGP(pt0); + pt0 = RepAppl(d1); + d1 = *pt0; + if (IsExtensionFunctor((Functor) d1)) { + FAIL(); + } + if ((Int)d0 <= 0 || + (Int)d0 > ArityOfFunctor((Functor) d1)) { + /* don't complain here for Prolog compatibility + if ((Int)d0 <= 0) { + saveregs(); + Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, + MkIntegerTerm(d0),"arg 1 of arg/3"); + setregs(); + } + */ + FAIL(); + } + XREG(PREG->y_u.xxx.x) = pt0[d0]; + PREG = NEXTOP(PREG, xxx); + GONext(); + ENDP(pt0); + } + else if (IsPairTerm(d1)) { + BEGP(pt0); + pt0 = RepPair(d1); + if (d0 != 1 && d0 != 2) { + if ((Int)d0 < 0) { + saveregs(); + Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, + MkIntegerTerm(d0),"arg 1 of arg/3"); + setregs(); + } + FAIL(); + } + XREG(PREG->y_u.xxx.x) = pt0[d0-1]; + PREG = NEXTOP(PREG, xxx); + GONext(); + ENDP(pt0); + } + else { + /* + don't complain here for SWI Prolog compatibility + saveregs(); + Yap_Error(TYPE_ERROR_COMPOUND, d1, "arg 2 of arg/3"); + setregs(); + */ + FAIL(); + } + + BEGP(pt0); + deref_body(d1, pt0, arg_arg2_unk, arg_arg2_nvar); + saveregs(); + Yap_Error(INSTANTIATION_ERROR, d1,"arg 2 of arg/3");; + setregs(); + ENDP(pt0); + FAIL(); + ENDD(d1); + + BEGP(pt0); + deref_body(d0, pt0, arg_arg1_unk, arg_arg1_nvar); + saveregs(); + Yap_Error(INSTANTIATION_ERROR, d0, "arg 1 of arg/3");; + setregs(); + ENDP(pt0); + FAIL(); + ENDD(d0); + ENDOp(); + + Op(p_arg_cv, xxn); +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) { + CELL *Ho = HR; + Term t = MkIntegerTerm(PREG->y_u.xxn.c); + HR[0] = t; + HR[1] = XREG(PREG->y_u.xxn.xi); + RESET_VARIABLE(HR+2); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); + HR = Ho; + } +#endif /* LOW_LEVEL_TRACE */ + BEGD(d0); + d0 = PREG->y_u.xxn.c; + /* d0 now got the argument we want */ + BEGD(d1); + d1 = XREG(PREG->y_u.xxn.xi); + deref_head(d1, arg_arg2_vc_unk); + arg_arg2_vc_nvar: + /* d1 now got the structure we want to fetch the argument + * from */ + if (IsApplTerm(d1)) { + BEGP(pt0); + pt0 = RepAppl(d1); + d1 = *pt0; + if (IsExtensionFunctor((Functor) d1)) { + FAIL(); + } + if ((Int)d0 <= 0 || + (Int)d0 > ArityOfFunctor((Functor) d1)) { + /* don't complain here for Prolog compatibility + if ((Int)d0 <= 0) { + saveregs(); + Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, + MkIntegerTerm(d0),"arg 1 of arg/3"); + setregs(); + } + */ + FAIL(); + } + XREG(PREG->y_u.xxn.x) = pt0[d0]; + PREG = NEXTOP(PREG, xxn); + GONext(); + ENDP(pt0); + } + else if (IsPairTerm(d1)) { + BEGP(pt0); + pt0 = RepPair(d1); + if (d0 != 1 && d0 != 2) { + if ((Int)d0 < 0) { + saveregs(); + Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, + MkIntegerTerm(d0),"arg 1 of arg/3"); + setregs(); + } + FAIL(); + } + XREG(PREG->y_u.xxn.x) = pt0[d0-1]; + PREG = NEXTOP(PREG, xxn); + GONext(); + ENDP(pt0); + } + else { + /* + keep SWI Prolog compatibility, just fail on trying to obtain an argument of a compound term. + saveregs(); + Yap_Error(TYPE_ERROR_COMPOUND, d1, "arg 2 of arg/3"); + setregs(); + */ + FAIL(); + } + + BEGP(pt0); + deref_body(d1, pt0, arg_arg2_vc_unk, arg_arg2_vc_nvar); + saveregs(); + Yap_Error(INSTANTIATION_ERROR, d1,"arg 2 of arg/3");; + setregs(); + ENDP(pt0); + FAIL(); + ENDD(d1); + + ENDD(d0); + ENDOp(); + + Op(p_arg_y_vv, yxx); +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) { + HR[0] = XREG(PREG->y_u.yxx.x1); + HR[1] = XREG(PREG->y_u.yxx.x2); + HR[2] = YREG[PREG->y_u.yxx.y]; + RESET_VARIABLE(HR+2); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); + } +#endif /* LOW_LEVEL_TRACE */ + BEGD(d0); + d0 = XREG(PREG->y_u.yxx.x1); + deref_head(d0, arg_y_arg1_unk); + arg_y_arg1_nvar: + /* ARG1 is ok! */ + if (IsIntTerm(d0)) + d0 = IntOfTerm(d0); + else if (IsLongIntTerm(d0)) { + d0 = LongIntOfTerm(d0); + } else { + if (IsBigIntTerm( d0 )) + FAIL(); + saveregs(); + Yap_Error(TYPE_ERROR_INTEGER,d0,"arg 1 of arg/3"); + setregs(); + FAIL(); + } + + /* d0 now got the argument we want */ + BEGD(d1); + d1 = XREG(PREG->y_u.yxx.x2); + deref_head(d1, arg_y_arg2_unk); + arg_y_arg2_nvar: + /* d1 now got the structure we want to fetch the argument + * from */ + if (IsApplTerm(d1)) { + BEGP(pt0); + pt0 = RepAppl(d1); + d1 = *pt0; + if (IsExtensionFunctor((Functor) d1)) { + FAIL(); + } + if ((Int)d0 <= 0 || + (Int)d0 > ArityOfFunctor((Functor) d1)) { + /* don't complain here for Prolog compatibility + if ((Int)d0 <= 0) { + saveregs(); + Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, + MkIntegerTerm(d0),"arg 1 of arg/3"); + saveregs(); + } + */ + FAIL(); + } + BEGP(pt1); + pt1 = YREG + PREG->y_u.yxx.y; + PREG = NEXTOP(PREG, yxx); + INITIALIZE_PERMVAR(pt1,pt0[d0]); + ENDP(pt1); + GONext(); + ENDP(pt0); + } + else if (IsPairTerm(d1)) { + BEGP(pt0); + pt0 = RepPair(d1); + if (d0 != 1 && d0 != 2) { + if ((Int)d0 < 0) { + saveregs(); + Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, + MkIntegerTerm(d0),"arg 1 of arg/3"); + setregs(); + } + FAIL(); + } + BEGP(pt1); + pt1 = YREG + PREG->y_u.yxx.y; + PREG = NEXTOP(PREG, yxx); + INITIALIZE_PERMVAR(pt1,pt0[d0-1]); + GONext(); + ENDP(pt1); + ENDP(pt0); + } + else { + /* + don't complain here for SWI Prolog compatibility + saveregs(); + Yap_Error(TYPE_ERROR_COMPOUND, d1, "arg 2 of arg/3"); + setregs(); + */ + FAIL(); + } + + BEGP(pt0); + deref_body(d1, pt0, arg_y_arg2_unk, arg_y_arg2_nvar); + saveregs(); + Yap_Error(INSTANTIATION_ERROR, d1,"arg 2 of arg/3");; + setregs(); + ENDP(pt0); + FAIL(); + ENDD(d1); + + BEGP(pt0); + deref_body(d0, pt0, arg_y_arg1_unk, arg_y_arg1_nvar); + saveregs(); + Yap_Error(INSTANTIATION_ERROR, d0, "arg 1 of arg/3");; + setregs(); + ENDP(pt0); + FAIL(); + ENDD(d0); + ENDOp(); + + Op(p_arg_y_cv, yxn); +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) { + CELL *Ho = HR; + Term t = MkIntegerTerm(PREG->y_u.yxn.c); + HR[0] = t; + HR[1] = XREG(PREG->y_u.yxn.xi); + HR[2] = YREG[PREG->y_u.yxn.y]; + RESET_VARIABLE(HR+2); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); + HR = Ho; + } +#endif /* LOW_LEVEL_TRACE */ + BEGD(d0); + d0 = PREG->y_u.yxn.c; + /* d0 now got the argument we want */ + BEGD(d1); + d1 = XREG(PREG->y_u.yxn.xi); + deref_head(d1, arg_y_arg2_vc_unk); + arg_y_arg2_vc_nvar: + /* d1 now got the structure we want to fetch the argument + * from */ + if (IsApplTerm(d1)) { + BEGP(pt0); + pt0 = RepAppl(d1); + d1 = *pt0; + if (IsExtensionFunctor((Functor) d1)) { + FAIL(); + } + if ((Int)d0 <= 0 || + (Int)d0 > ArityOfFunctor((Functor) d1)) { + /* don't complain here for Prolog compatibility + if ((Int)d0 <= 0) { + saveregs(); + Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, + MkIntegerTerm(d0),"arg 1 of arg/3"); + setregs(); + } + */ + FAIL(); + } + BEGP(pt1); + pt1 = YREG + PREG->y_u.yxn.y; + PREG = NEXTOP(PREG, yxn); + INITIALIZE_PERMVAR(pt1,pt0[d0]); + ENDP(pt1); + GONext(); + ENDP(pt0); + } + else if (IsPairTerm(d1)) { + BEGP(pt0); + pt0 = RepPair(d1); + if (d0 != 1 && d0 != 2) { + if ((Int)d0 < 0) { + saveregs(); + Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, + MkIntegerTerm(d0),"arg 1 of arg/3"); + setregs(); + } + FAIL(); + } + BEGP(pt1); + pt1 = YREG + PREG->y_u.yxn.y; + PREG = NEXTOP(PREG, yxn); + INITIALIZE_PERMVAR(pt1,pt0[d0-1]); + ENDP(pt1); + GONext(); + ENDP(pt0); + } + else { + /* + don't complain here for SWI Prolog compatibility + saveregs(); + Yap_Error(TYPE_ERROR_COMPOUND, d1, "arg 2 of arg/3"); + setregs(); + */ + FAIL(); + } + + BEGP(pt0); + deref_body(d1, pt0, arg_y_arg2_vc_unk, arg_y_arg2_vc_nvar); + saveregs(); + Yap_Error(INSTANTIATION_ERROR, d1,"arg 2 of arg/3");; + setregs(); + ENDP(pt0); + FAIL(); + ENDD(d1); + + ENDD(d0); + ENDOp(); + + Op(p_func2s_vv, xxx); + /* A1 is a variable */ + restart_func2s: +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) { + RESET_VARIABLE(HR); + HR[1] = XREG(PREG->y_u.xxx.x1); + HR[2] = XREG(PREG->y_u.xxx.x2); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + } +#endif /* LOW_LEVEL_TRACE */ + /* We have to build the structure */ + BEGD(d0); + d0 = XREG(PREG->y_u.xxx.x1); + deref_head(d0, func2s_unk); + func2s_nvar: + /* we do, let's get the third argument */ + BEGD(d1); + d1 = XREG(PREG->y_u.xxx.x2); + deref_head(d1, func2s_unk2); + func2s_nvar2: + /* Uuuff, the second and third argument are bound */ + if (IsIntegerTerm(d1)) + d1 = IntegerOfTerm(d1); + else { + saveregs(); + if (IsBigIntTerm(d1)) { + Yap_Error(RESOURCE_ERROR_STACK, d1, "functor/3"); + } else { + Yap_Error(TYPE_ERROR_INTEGER, d1, "functor/3"); + } + setregs(); + FAIL(); + } + if (!IsAtomicTerm(d0)) { + saveregs(); + Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); + setregs(); + FAIL(); + } + /* We made it!!!!! we got in d0 the name, in d1 the arity and + * in pt0 the variable to bind it to. */ + if (d0 == TermDot && d1 == 2) { + RESET_VARIABLE(HR); + RESET_VARIABLE(HR+1); + d0 = AbsPair(HR); + HR += 2; + /* else if arity is 0 just pass d0 through */ + /* Ding, ding, we made it */ + XREG(PREG->y_u.xxx.x) = d0; + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxx),Osbpp),l); + GONext(); + } + else if ((Int)d1 > 0) { + /* now let's build a compound term */ + if (!IsAtomTerm(d0)) { + saveregs(); + Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); + setregs(); + FAIL(); + } + BEGP(pt1); + if (!IsAtomTerm(d0)) { + FAIL(); + } + else + d0 = (CELL) Yap_MkFunctor(AtomOfTerm(d0), (Int) d1); + pt1 = HR; + *pt1++ = d0; + d0 = AbsAppl(HR); + if (pt1+d1 > ENV || pt1+d1 > (CELL *)B) { + /* make sure we have something to show for our trouble */ + saveregs(); + if (!Yap_gcl((1+d1)*sizeof(CELL), 0, YREG, NEXTOP(NEXTOP(PREG,xxx),Osbpp))) { + Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); + setregs(); + JMPNext(); + } else { + setregs(); + } + goto restart_func2s; + } + while ((Int)d1--) { + RESET_VARIABLE(pt1); + pt1++; + } + HR = pt1; + /* done building the term */ + ENDP(pt1); + /* else if arity is 0 just pass d0 through */ + /* Ding, ding, we made it */ + XREG(PREG->y_u.xxx.x) = d0; + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxx),Osbpp),l); + GONext(); + } else if ((Int)d1 == 0) { + XREG(PREG->y_u.xxx.x) = d0; + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxx),Osbpp),l); + GONext(); + } else { + saveregs(); + Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO,MkIntegerTerm(d1),"functor/3"); + setregs(); + FAIL(); + } + + BEGP(pt1); + deref_body(d1, pt1, func2s_unk2, func2s_nvar2); + saveregs(); + Yap_Error(INSTANTIATION_ERROR, d1, "functor/3"); + setregs(); + ENDP(pt1); + /* Oops, third argument was unbound */ + FAIL(); + ENDD(d1); + + BEGP(pt1); + deref_body(d0, pt1, func2s_unk, func2s_nvar); + saveregs(); + Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); + setregs(); + ENDP(pt1); + /* Oops, second argument was unbound too */ + FAIL(); + ENDD(d0); + ENDOp(); + + Op(p_func2s_cv, xxc); + /* A1 is a variable */ + restart_func2s_cv: +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) { + RESET_VARIABLE(HR); + HR[1] = PREG->y_u.xxc.c; + HR[2] = XREG(PREG->y_u.xxc.xi); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + } +#endif /* LOW_LEVEL_TRACE */ + BEGD(d0); + /* We have to build the structure */ + d0 = PREG->y_u.xxc.c; + /* we do, let's get the third argument */ + BEGD(d1); + d1 = XREG(PREG->y_u.xxc.xi); + deref_head(d1, func2s_unk2_cv); + func2s_nvar2_cv: + /* Uuuff, the second and third argument are bound */ + if (IsIntegerTerm(d1)) + d1 = IntegerOfTerm(d1); + else { + saveregs(); + if (IsBigIntTerm(d1)) { + Yap_Error(RESOURCE_ERROR_STACK, d1, "functor/3"); + } else { + Yap_Error(TYPE_ERROR_INTEGER,d1,"functor/3"); + } + setregs(); + FAIL(); + } + /* We made it!!!!! we got in d0 the name, in d1 the arity and + * in pt0 the variable to bind it to. */ + if (d0 == TermDot && d1 == 2) { + RESET_VARIABLE(HR); + RESET_VARIABLE(HR+1); + d0 = AbsPair(HR); + HR += 2; + /* else if arity is 0 just pass d0 through */ + /* Ding, ding, we made it */ + XREG(PREG->y_u.xxc.x) = d0; + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxc),Osbpp),l); + GONext(); + } else if ((Int)d1 > 0) { + /* now let's build a compound term */ + if (!IsAtomTerm(d0)) { + saveregs(); + Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); + setregs(); + FAIL(); + } + BEGP(pt1); + if (!IsAtomTerm(d0)) { + FAIL(); + } + else + d0 = (CELL) Yap_MkFunctor(AtomOfTerm(d0), (Int) d1); + pt1 = HR; + *pt1++ = d0; + d0 = AbsAppl(HR); + if (pt1+d1 > ENV || pt1+d1 > (CELL *)B) { + /* make sure we have something to show for our trouble */ + saveregs(); + if (!Yap_gcl((1+d1)*sizeof(CELL), 0, YREG, NEXTOP(NEXTOP(PREG,xxc),Osbpp))) { + Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); + setregs(); + JMPNext(); + } else { + setregs(); + } + goto restart_func2s_cv; + } + while ((Int)d1--) { + RESET_VARIABLE(pt1); + pt1++; + } + /* done building the term */ + HR = pt1; + ENDP(pt1); + /* else if arity is 0 just pass d0 through */ + /* Ding, ding, we made it */ + XREG(PREG->y_u.xxc.x) = d0; + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxc),Osbpp),l); + GONext(); + } else if (d1 == 0) { + XREG(PREG->y_u.xxc.x) = d0; + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxc),Osbpp),l); + GONext(); + } else { + saveregs(); + Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO,MkIntegerTerm(d1),"functor/3"); + setregs(); + FAIL(); + } + + BEGP(pt1); + deref_body(d1, pt1, func2s_unk2_cv, func2s_nvar2_cv); + saveregs(); + Yap_Error(INSTANTIATION_ERROR, d1, "functor/3"); + setregs(); + ENDP(pt1); + /* Oops, third argument was unbound */ + FAIL(); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(p_func2s_vc, xxn); + /* A1 is a variable */ + restart_func2s_vc: +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) { + Term ti; + CELL *hi = HR; + + ti = MkIntegerTerm(PREG->y_u.xxn.c); + RESET_VARIABLE(HR); + HR[1] = XREG(PREG->y_u.xxn.xi); + HR[2] = ti; + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + HR = hi; + } +#endif /* LOW_LEVEL_TRACE */ + /* We have to build the structure */ + BEGD(d0); + d0 = XREG(PREG->y_u.xxn.xi); + deref_head(d0, func2s_unk_vc); + func2s_nvar_vc: + BEGD(d1); + d1 = PREG->y_u.xxn.c; + if (!IsAtomicTerm(d0)) { + saveregs(); + Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); + setregs(); + FAIL(); + } + /* We made it!!!!! we got in d0 the name, in d1 the arity and + * in pt0 the variable to bind it to. */ + if (d0 == TermDot && d1 == 2) { + RESET_VARIABLE(HR); + RESET_VARIABLE(HR+1); + d0 = AbsPair(HR); + HR += 2; + /* else if arity is 0 just pass d0 through */ + /* Ding, ding, we made it */ + XREG(PREG->y_u.xxn.x) = d0; + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxn),Osbpp),l); + GONext(); + } + /* now let's build a compound term */ + if (d1 == 0) { + XREG(PREG->y_u.xxn.x) = d0; + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxn),Osbpp),l); + GONext(); + } + if (!IsAtomTerm(d0)) { + saveregs(); + Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); + setregs(); + FAIL(); + } + BEGP(pt1); + if (!IsAtomTerm(d0)) { + FAIL(); + } + else + d0 = (CELL) Yap_MkFunctor(AtomOfTerm(d0), (Int) d1); + pt1 = HR; + *pt1++ = d0; + d0 = AbsAppl(HR); + if (pt1+d1 > ENV || pt1+d1 > (CELL *)B) { + /* make sure we have something to show for our trouble */ + saveregs(); + if (!Yap_gc(0, YREG, NEXTOP(NEXTOP(PREG,xxn),Osbpp))) { + Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); + setregs(); + JMPNext(); + } else { + setregs(); + } + goto restart_func2s_vc; + } + while ((Int)d1--) { + RESET_VARIABLE(pt1); + pt1++; + } + /* done building the term */ + HR = pt1; + ENDP(pt1); + ENDD(d1); + /* else if arity is 0 just pass d0 through */ + /* Ding, ding, we made it */ + XREG(PREG->y_u.xxn.x) = d0; + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxn),Osbpp),l); + GONext(); + + BEGP(pt1); + deref_body(d0, pt1, func2s_unk_vc, func2s_nvar_vc); + saveregs(); + Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); + setregs(); + ENDP(pt1); + /* Oops, second argument was unbound too */ + FAIL(); + ENDD(d0); + ENDOp(); + + Op(p_func2s_y_vv, yxx); + /* A1 is a variable */ + restart_func2s_y: +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) { + RESET_VARIABLE(HR); + HR[1] = XREG(PREG->y_u.yxx.x1); + HR[2] = XREG(PREG->y_u.yxx.x2); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + } +#endif /* LOW_LEVEL_TRACE */ + /* We have to build the structure */ + BEGD(d0); + d0 = XREG(PREG->y_u.yxx.x1); + deref_head(d0, func2s_y_unk); + func2s_y_nvar: + /* we do, let's get the third argument */ + BEGD(d1); + d1 = XREG(PREG->y_u.yxx.x2); + deref_head(d1, func2s_y_unk2); + func2s_y_nvar2: + /* Uuuff, the second and third argument are bound */ + if (IsIntegerTerm(d1)) + d1 = IntegerOfTerm(d1); + else { + saveregs(); + if (IsBigIntTerm(d1)) { + Yap_Error(RESOURCE_ERROR_STACK, d1, "functor/3"); + } else { + Yap_Error(TYPE_ERROR_INTEGER,d1,"functor/3"); + } + setregs(); + FAIL(); + } + if (!IsAtomicTerm(d0)) { + saveregs(); + Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); + setregs(); + FAIL(); + } + /* We made it!!!!! we got in d0 the name, in d1 the arity and + * in pt0 the variable to bind it to. */ + if (d0 == TermDot && d1 == 2) { + RESET_VARIABLE(HR); + RESET_VARIABLE(HR+1); + d0 = AbsPair(HR); + HR += 2; + BEGP(pt1); + pt1 = YREG + PREG->y_u.yxx.y; + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxx),Osbpp),l); + INITIALIZE_PERMVAR(pt1,d0); + ENDP(pt1); + GONext(); + } else if ((Int)d1 > 0) { + /* now let's build a compound term */ + if (!IsAtomTerm(d0)) { + saveregs(); + Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); + setregs(); + FAIL(); + } + BEGP(pt1); + if (!IsAtomTerm(d0)) { + FAIL(); + } + else + d0 = (CELL) Yap_MkFunctor(AtomOfTerm(d0), (Int) d1); + pt1 = HR; + *pt1++ = d0; + d0 = AbsAppl(HR); + if (pt1+d1 > ENV || pt1+d1 > (CELL *)B) { + /* make sure we have something to show for our trouble */ + saveregs(); + if (!Yap_gcl((1+d1)*sizeof(CELL), 0, YREG, NEXTOP(NEXTOP(PREG,yxx),Osbpp))) { + Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); + setregs(); + JMPNext(); + } else { + setregs(); + } + goto restart_func2s_y; + } + while ((Int)d1--) { + RESET_VARIABLE(pt1); + pt1++; + } + /* done building the term */ + HR = pt1; + ENDP(pt1); + /* else if arity is 0 just pass d0 through */ + /* Ding, ding, we made it */ + BEGP(pt1); + pt1 = YREG + PREG->y_u.yxx.y; + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxx),Osbpp),l); + INITIALIZE_PERMVAR(pt1,d0); + ENDP(pt1); + GONext(); + } else if (d1 == 0) { + BEGP(pt1); + pt1 = YREG + PREG->y_u.yxx.y; + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxx),Osbpp),l); + INITIALIZE_PERMVAR(pt1,d0); + ENDP(pt1); + GONext(); + } else { + saveregs(); + Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO,MkIntegerTerm(d1),"functor/3"); + setregs(); + FAIL(); + } + + BEGP(pt1); + deref_body(d1, pt1, func2s_y_unk2, func2s_y_nvar2); + saveregs(); + Yap_Error(INSTANTIATION_ERROR, d1, "functor/3"); + setregs(); + ENDP(pt1); + /* Oops, third argument was unbound */ + FAIL(); + ENDD(d1); + + BEGP(pt1); + deref_body(d0, pt1, func2s_y_unk, func2s_y_nvar); + saveregs(); + Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); + setregs(); + ENDP(pt1); + /* Oops, second argument was unbound too */ + FAIL(); + ENDD(d0); + ENDOp(); + + Op(p_func2s_y_cv, yxc); + /* A1 is a variable */ + restart_func2s_y_cv: +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) { + RESET_VARIABLE(HR); + HR[1] = PREG->y_u.yxc.c; + HR[2] = XREG(PREG->y_u.yxc.xi); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + } +#endif /* LOW_LEVEL_TRACE */ + /* We have to build the structure */ + BEGD(d0); + d0 = PREG->y_u.yxc.c; + /* we do, let's get the third argument */ + BEGD(d1); + d1 = XREG(PREG->y_u.yxc.xi); + deref_head(d1, func2s_y_unk_cv); + func2s_y_nvar_cv: + /* Uuuff, the second and third argument are bound */ + if (IsIntegerTerm(d1)) { + d1 = IntegerOfTerm(d1); + } else { + saveregs(); + if (IsBigIntTerm(d1)) { + Yap_Error(RESOURCE_ERROR_STACK, d1, "functor/3"); + } else { + Yap_Error(TYPE_ERROR_INTEGER,d1,"functor/3"); + } + setregs(); + FAIL(); + } + /* We made it!!!!! we got in d0 the name, in d1 the arity and + * in pt0 the variable to bind it to. */ + if (d0 == TermDot && d1 == 2) { + RESET_VARIABLE(HR); + RESET_VARIABLE(HR+1); + d0 = AbsPair(HR); + HR += 2; + /* else if arity is 0 just pass d0 through */ + /* Ding, ding, we made it */ + BEGP(pt1); + pt1 = YREG + PREG->y_u.yxc.y; + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxc),Osbpp),l); + INITIALIZE_PERMVAR(pt1,d0); + ENDP(pt1); + GONext(); + } + else if ((Int)d1 > 0) { + /* now let's build a compound term */ + if (!IsAtomTerm(d0)) { + saveregs(); + Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); + setregs(); + FAIL(); + } + if (!IsAtomTerm(d0)) { + FAIL(); + } + else + d0 = (CELL) Yap_MkFunctor(AtomOfTerm(d0), (Int) d1); + BEGP(pt1); + pt1 = HR; + *pt1++ = d0; + d0 = AbsAppl(HR); + if (pt1+d1 > ENV || pt1+d1 > (CELL *)B) { + /* make sure we have something to show for our trouble */ + saveregs(); + if (!Yap_gcl((1+d1)*sizeof(CELL), 0, YREG, NEXTOP(NEXTOP(PREG,yxc),Osbpp))) { + Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); + setregs(); + JMPNext(); + } else { + setregs(); + } + goto restart_func2s_y_cv; + } + while ((Int)d1--) { + RESET_VARIABLE(pt1); + pt1++; + } + /* done building the term */ + HR = pt1; + ENDP(pt1); + /* else if arity is 0 just pass d0 through */ + /* Ding, ding, we made it */ + BEGP(pt1); + pt1 = YREG + PREG->y_u.yxc.y; + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxc),Osbpp),l); + INITIALIZE_PERMVAR(pt1,d0); + ENDP(pt1); + GONext(); + } else if (d1 == 0) { + BEGP(pt1); + pt1 = YREG + PREG->y_u.yxc.y; + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxc),Osbpp),l); + INITIALIZE_PERMVAR(pt1,d0); + ENDP(pt1); + GONext(); + } else { + saveregs(); + Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO,MkIntegerTerm(d1),"functor/3"); + setregs(); + FAIL(); + } + + BEGP(pt1); + deref_body(d1, pt1, func2s_y_unk_cv, func2s_y_nvar_cv); + saveregs(); + Yap_Error(INSTANTIATION_ERROR, d1, "functor/3"); + setregs(); + ENDP(pt1); + /* Oops, third argument was unbound */ + FAIL(); + ENDD(d1); + ENDD(d0); + ENDOp(); + + Op(p_func2s_y_vc, yxn); + /* A1 is a variable */ + restart_func2s_y_vc: +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) { + Term ti; + CELL *hi = HR; + + ti = MkIntegerTerm((Int)(PREG->y_u.yxn.c)); + RESET_VARIABLE(HR); + HR[1] = XREG(PREG->y_u.yxn.xi); + HR[2] = ti; + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + HR = hi; + } +#endif /* LOW_LEVEL_TRACE */ + /* We have to build the structure */ + BEGD(d0); + d0 = XREG(PREG->y_u.yxn.xi); + deref_head(d0, func2s_y_unk_vc); + func2s_y_nvar_vc: + BEGD(d1); + d1 = PREG->y_u.yxn.c; + if (!IsAtomicTerm(d0)) { + saveregs(); + Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); + setregs(); + FAIL(); + } + /* We made it!!!!! we got in d0 the name, in d1 the arity and + * in pt0 the variable to bind it to. */ + if (d0 == TermDot && d1 == 2) { + RESET_VARIABLE(HR); + RESET_VARIABLE(HR+1); + d0 = AbsPair(HR); + HR += 2; + /* else if arity is 0 just pass d0 through */ + /* Ding, ding, we made it */ + BEGP(pt1); + pt1 = YREG + PREG->y_u.yxn.y; + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxn),Osbpp),l); + INITIALIZE_PERMVAR(pt1,d0); + ENDP(pt1); + GONext(); + } + if (d1 == 0) { + BEGP(pt1); + pt1 = YREG + PREG->y_u.yxn.y; + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxn),Osbpp),l); + INITIALIZE_PERMVAR(pt1,d0); + ENDP(pt1); + GONext(); + } + if (!IsAtomTerm(d0)) { + saveregs(); + Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); + setregs(); + FAIL(); + } + /* now let's build a compound term */ + if (!IsAtomTerm(d0)) { + saveregs(); + Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); + setregs(); + FAIL(); + } + BEGP(pt1); + if (!IsAtomTerm(d0)) { + FAIL(); + } + else + d0 = (CELL) Yap_MkFunctor(AtomOfTerm(d0), (Int) d1); + pt1 = HR; + *pt1++ = d0; + d0 = AbsAppl(HR); + if (pt1+d1 > ENV || pt1+d1 > (CELL *)B) { + /* make sure we have something to show for our trouble */ + saveregs(); + if (!Yap_gcl((1+d1)*sizeof(CELL), 0, YREG, NEXTOP(NEXTOP(PREG,yxn),Osbpp))) { + Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); + setregs(); + JMPNext(); + } else { + setregs(); + } + goto restart_func2s_y_vc; + } + while ((Int)d1--) { + RESET_VARIABLE(pt1); + pt1++; + } + /* done building the term */ + HR = pt1; + ENDP(pt1); + /* else if arity is 0 just pass d0 through */ + /* Ding, ding, we made it */ + BEGP(pt1); + pt1 = YREG + PREG->y_u.yxn.y; + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxn),Osbpp),l); + INITIALIZE_PERMVAR(pt1,d0); + ENDP(pt1); + ENDD(d1); + GONext(); + + BEGP(pt1); + deref_body(d0, pt1, func2s_y_unk_vc, func2s_y_nvar_vc); + saveregs(); + Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); + setregs(); + ENDP(pt1); + /* Oops, second argument was unbound too */ + FAIL(); + ENDD(d0); + ENDOp(); + + Op(p_func2f_xx, xxx); +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) { + HR[0] = XREG(PREG->y_u.xxx.x); + RESET_VARIABLE(HR+1); + RESET_VARIABLE(HR+2); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + } +#endif /* LOW_LEVEL_TRACE */ + BEGD(d0); + d0 = XREG(PREG->y_u.xxx.x); + deref_head(d0, func2f_xx_unk); + func2f_xx_nvar: + if (IsApplTerm(d0)) { + Functor d1 = FunctorOfTerm(d0); + if (IsExtensionFunctor(d1)) { + XREG(PREG->y_u.xxx.x1) = d0; + XREG(PREG->y_u.xxx.x2) = MkIntTerm(0); + PREG = NEXTOP(PREG, xxx); + GONext(); + } + XREG(PREG->y_u.xxx.x1) = MkAtomTerm(NameOfFunctor(d1)); + XREG(PREG->y_u.xxx.x2) = MkIntegerTerm(ArityOfFunctor(d1)); + PREG = NEXTOP(PREG, xxx); + GONext(); + } else if (IsPairTerm(d0)) { + XREG(PREG->y_u.xxx.x1) = TermDot; + XREG(PREG->y_u.xxx.x2) = MkIntTerm(2); + PREG = NEXTOP(PREG, xxx); + GONext(); + } else { + XREG(PREG->y_u.xxx.x1) = d0; + XREG(PREG->y_u.xxx.x2) = MkIntTerm(0); + PREG = NEXTOP(PREG, xxx); + GONext(); + } + + BEGP(pt1); + deref_body(d0, pt1, func2f_xx_unk, func2f_xx_nvar); + saveregs(); + Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); + setregs(); + ENDP(pt1); + /* Oops, second argument was unbound too */ + FAIL(); + ENDD(d0); + ENDOp(); + + Op(p_func2f_xy, xxy); +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) { + HR[0] = XREG(PREG->y_u.xxy.x); + RESET_VARIABLE(HR+1); + RESET_VARIABLE(HR+2); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + } +#endif /* LOW_LEVEL_TRACE */ + BEGD(d0); + d0 = XREG(PREG->y_u.xxy.x); + deref_head(d0, func2f_xy_unk); + func2f_xy_nvar: + if (IsApplTerm(d0)) { + Functor d1 = FunctorOfTerm(d0); + CELL *pt0 = YREG+PREG->y_u.xxy.y2; + if (IsExtensionFunctor(d1)) { + XREG(PREG->y_u.xxy.x1) = d0; + PREG = NEXTOP(PREG, xxy); + INITIALIZE_PERMVAR(pt0, MkIntTerm(0)); + GONext(); + } + XREG(PREG->y_u.xxy.x1) = MkAtomTerm(NameOfFunctor(d1)); + PREG = NEXTOP(PREG, xxy); + INITIALIZE_PERMVAR(pt0, MkIntegerTerm(ArityOfFunctor(d1))); + GONext(); + } else if (IsPairTerm(d0)) { + CELL *pt0 = YREG+PREG->y_u.xxy.y2; + XREG(PREG->y_u.xxy.x1) = TermDot; + PREG = NEXTOP(PREG, xxy); + INITIALIZE_PERMVAR(pt0, MkIntTerm(2)); + GONext(); + } else { + CELL *pt0 = YREG+PREG->y_u.xxy.y2; + XREG(PREG->y_u.xxy.x1) = d0; + PREG = NEXTOP(PREG, xxy); + INITIALIZE_PERMVAR(pt0, MkIntTerm(0)); + GONext(); + } + + BEGP(pt1); + deref_body(d0, pt1, func2f_xy_unk, func2f_xy_nvar); + saveregs(); + Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); + setregs(); + ENDP(pt1); + /* Oops, second argument was unbound too */ + FAIL(); + ENDD(d0); + ENDOp(); + + Op(p_func2f_yx, yxx); +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) { + HR[0] = XREG(PREG->y_u.yxx.x2); + RESET_VARIABLE(HR+1); + RESET_VARIABLE(HR+2); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + } +#endif /* LOW_LEVEL_TRACE */ + BEGD(d0); + d0 = XREG(PREG->y_u.yxx.x2); + deref_head(d0, func2f_yx_unk); + func2f_yx_nvar: + if (IsApplTerm(d0)) { + Functor d1 = FunctorOfTerm(d0); + CELL *pt0 = YREG+PREG->y_u.yxx.y; + if (IsExtensionFunctor(d1)) { + XREG(PREG->y_u.yxx.x1) = MkIntTerm(0); + PREG = NEXTOP(PREG, yxx); + INITIALIZE_PERMVAR(pt0, d0); + GONext(); + } + XREG(PREG->y_u.yxx.x1) = MkIntegerTerm(ArityOfFunctor(d1)); + PREG = NEXTOP(PREG, yxx); + INITIALIZE_PERMVAR(pt0, MkAtomTerm(NameOfFunctor(d1))); + GONext(); + } else if (IsPairTerm(d0)) { + CELL *pt0 = YREG+PREG->y_u.yxx.y; + XREG(PREG->y_u.yxx.x1) = MkIntTerm(2); + PREG = NEXTOP(PREG, yxx); + INITIALIZE_PERMVAR(pt0 ,TermDot); + GONext(); + } else { + CELL *pt0 = YREG+PREG->y_u.yxx.y; + XREG(PREG->y_u.yxx.x1) = MkIntTerm(0); + PREG = NEXTOP(PREG, yxx); + INITIALIZE_PERMVAR(pt0, d0); + GONext(); + } + + BEGP(pt1); + deref_body(d0, pt1, func2f_yx_unk, func2f_yx_nvar); + saveregs(); + Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); + setregs(); + ENDP(pt1); + /* Oops, second argument was unbound too */ + FAIL(); + ENDD(d0); + ENDOp(); + + Op(p_func2f_yy, yyx); +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) { + HR[0] = XREG(PREG->y_u.yyx.x); + RESET_VARIABLE(HR+1); + RESET_VARIABLE(HR+2); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + } +#endif /* LOW_LEVEL_TRACE */ + BEGD(d0); + d0 = XREG(PREG->y_u.yyx.x); + deref_head(d0, func2f_yy_unk); + func2f_yy_nvar: + if (IsApplTerm(d0)) { + Functor d1 = FunctorOfTerm(d0); + CELL *pt0 = YREG+PREG->y_u.yyx.y1; + CELL *pt1 = YREG+PREG->y_u.yyx.y2; + if (IsExtensionFunctor(d1)) { + PREG = NEXTOP(PREG, yyx); + INITIALIZE_PERMVAR(pt0, d0); + INITIALIZE_PERMVAR(pt1, MkIntTerm(0)); + GONext(); + } + PREG = NEXTOP(PREG, yyx); + INITIALIZE_PERMVAR(pt0, MkAtomTerm(NameOfFunctor(d1))); + INITIALIZE_PERMVAR(pt1, MkIntegerTerm(ArityOfFunctor(d1))); + GONext(); + } else if (IsPairTerm(d0)) { + CELL *pt0 = YREG+PREG->y_u.yyx.y1; + CELL *pt1 = YREG+PREG->y_u.yyx.y2; + PREG = NEXTOP(PREG, yyx); + INITIALIZE_PERMVAR(pt0, TermDot); + INITIALIZE_PERMVAR(pt1, MkIntTerm(2)); + GONext(); + } else { + CELL *pt0 = YREG+PREG->y_u.yyx.y1; + CELL *pt1 = YREG+PREG->y_u.yyx.y2; + PREG = NEXTOP(PREG, yyx); + INITIALIZE_PERMVAR(pt0, d0); + INITIALIZE_PERMVAR(pt1, MkIntTerm(0)); + GONext(); + } + + BEGP(pt1); + deref_body(d0, pt1, func2f_yy_unk, func2f_yy_nvar); + saveregs(); + Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); + setregs(); + ENDP(pt1); + /* Oops, second argument was unbound too */ + FAIL(); + ENDD(d0); + ENDOp(); + + Op(p_functor, e); +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),XREGS+1); +#endif /* LOW_LEVEL_TRACE */ + restart_functor: + BEGD(d0); + d0 = ARG1; + deref_head(d0, func_unk); + func_nvar: + /* A1 is bound */ + BEGD(d1); + if (IsApplTerm(d0)) { + d1 = *RepAppl(d0); + if (IsExtensionFunctor((Functor) d1)) { + if (d1 <= (CELL)FunctorDouble && d1 >= (CELL)FunctorLongInt ) { + d1 = MkIntTerm(0); + } else + FAIL(); + } else { + d0 = MkAtomTerm(NameOfFunctor((Functor) d1)); + d1 = MkIntTerm(ArityOfFunctor((Functor) d1)); + } + } + else if (IsPairTerm(d0)) { + d0 = TermDot; + d1 = MkIntTerm(2); + } + else { + d1 = MkIntTerm(0); + } + /* d1 and d0 now have the two arguments */ + /* let's go and bind them */ + { + register CELL arity = d1; + + d1 = ARG2; + deref_head(d1, func_nvar_unk); + func_nvar_nvar: + /* A2 was bound */ + if (d0 != d1) { + FAIL(); + } + /* I have to this here so that I don't have a jump to a closing bracket */ + d0 = arity; + goto func_bind_x3; + + BEGP(pt0); + deref_body(d1, pt0, func_nvar_unk, func_nvar_nvar); + /* A2 is a variable, go and bind it */ + YapBind(pt0, d0); + /* I have to this here so that I don't have a jump to a closing bracket */ + d0 = arity; + ENDP(pt0); + func_bind_x3: + /* now let's process A3 */ + d1 = ARG3; + deref_head(d1, func_nvar3_unk); + func_nvar3_nvar: + /* A3 was bound */ + if (d0 != d1) { + FAIL(); + } + /* Done */ + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, e),Osbmp),l); + GONext(); + + BEGP(pt0); + deref_body(d1, pt0, func_nvar3_unk, func_nvar3_nvar); + /* A3 is a variable, go and bind it */ + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, e),Osbmp),l); + YapBind(pt0, d0); + /* Done */ + GONext(); + + + ENDP(pt0); + + } + ENDD(d1); + + BEGP(pt0); + deref_body(d0, pt0, func_unk, func_nvar); + /* A1 is a variable */ + /* We have to build the structure */ + d0 = ARG2; + deref_head(d0, func_var_2unk); + func_var_2nvar: + /* we do, let's get the third argument */ + BEGD(d1); + d1 = ARG3; + deref_head(d1, func_var_3unk); + func_var_3nvar: + /* Uuuff, the second and third argument are bound */ + if (IsIntTerm(d1)) + d1 = IntOfTerm(d1); + else { + saveregs(); + Yap_Error(TYPE_ERROR_INTEGER,ARG3,"functor/3"); + setregs(); + FAIL(); + } + if (!IsAtomicTerm(d0)) { + saveregs(); + Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); + setregs(); + FAIL(); + } /* We made it!!!!! we got in d0 the name, in d1 the arity and + * in pt0 the variable to bind it to. */ + if (d0 == TermDot && d1 == 2) { + RESET_VARIABLE(HR); + RESET_VARIABLE(HR+1); + d0 = AbsPair(HR); + HR += 2; + } + else if ((Int)d1 > 0) { + /* now let's build a compound term */ + if (!IsAtomTerm(d0)) { + saveregs(); + Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); + setregs(); + FAIL(); + } + BEGP(pt1); + if (!IsAtomTerm(d0)) { + FAIL(); + } + else + d0 = (CELL) Yap_MkFunctor(AtomOfTerm(d0), (Int) d1); + pt1 = HR; + *pt1++ = d0; + d0 = AbsAppl(HR); + if (pt1+d1 > ENV || pt1+d1 > (CELL *)B) { + /* make sure we have something to show for our trouble */ + saveregs(); + if (!Yap_gcl((1+d1)*sizeof(CELL), 3, YREG, NEXTOP(NEXTOP(PREG,e),Osbmp))) { + Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); + setregs(); + JMPNext(); + } else { + setregs(); + } + goto restart_functor; /* */ + } + while ((Int)d1--) { + RESET_VARIABLE(pt1); + pt1++; + } + /* done building the term */ + HR = pt1; + ENDP(pt1); + } else if ((Int)d1 < 0) { + saveregs(); + Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO,MkIntegerTerm(d1),"functor/3"); + setregs(); + FAIL(); + } + /* else if arity is 0 just pass d0 through */ + /* Ding, ding, we made it */ + PREG = NEXTOP(NEXTOP(NEXTOP(PREG, e),Osbpp),l); + YapBind(pt0, d0); + GONext(); + + + BEGP(pt1); + deref_body(d1, pt1, func_var_3unk, func_var_3nvar); + saveregs(); + Yap_Error(INSTANTIATION_ERROR, d1, "functor/3"); + setregs(); + ENDP(pt1); + /* Oops, third argument was unbound */ + FAIL(); + ENDD(d1); + + BEGP(pt1); + deref_body(d0, pt1, func_var_2unk, func_var_2nvar); + saveregs(); + Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); + setregs(); + ENDP(pt1); + /* Oops, second argument was unbound too */ + FAIL(); + ENDP(pt0); + ENDD(d0); + ENDOp(); + + /* join all the meta-call code into a single procedure with three entry points */ + { + CACHE_Y_AS_ENV(YREG); + BEGD(d0); /* term to be meta-called */ + Term mod; /* module to be used */ + PredEntry *pen; /* predicate */ + choiceptr b_ptr; /* cut point */ + Functor f; + + /* we are doing the rhs of a , */ + BOp(p_execute_tail, Osbmp); + + FETCH_Y_FROM_ENV(YREG); + /* place to cut to */ + b_ptr = (choiceptr)ENV_YREG[E_CB]; + /* original goal */ + d0 = ENV_YREG[-EnvSizeInCells-1]; + /* predicate we had used */ + pen = RepPredProp((Prop)IntegerOfTerm(ENV_YREG[-EnvSizeInCells-2])); + /* current module at the time */ + mod = ENV_YREG[-EnvSizeInCells-3]; + /* set YREG */ + /* Try to preserve the environment */ + ENV_YREG = (CELL *) (((char *) YREG) + PREG->y_u.Osbmp.s); +#ifdef FROZEN_STACKS + { + choiceptr top_b = PROTECT_FROZEN_B(B); +#ifdef YAPOR_SBA + if (ENV_YREG > (CELL *) top_b || ENV_YREG < HR) ENV_YREG = (CELL *) top_b; +#else + if (ENV_YREG > (CELL *) top_b) ENV_YREG = (CELL *) top_b; +#endif /* YAPOR_SBA */ + } +#else + if (ENV_YREG > (CELL *) B) { + ENV_YREG = (CELL *) B; + } +#endif /* FROZEN_STACKS */ + /* now, jump to actual execution */ + if (pen->ArityOfPE) { + f = pen->FunctorOfPred; + /* reuse environment if we are continuining a comma, ie, (g1,g2,g3) */ + /* can only do it deterministically */ + /* broken + if (f == FunctorComma && (CELL *)B >= ENV) { + ENV_YREG = ENV; + ENV = (CELL *)ENV[E_E]; + } + */ + goto execute_pred_f; + } else + goto execute_pred_a; + ENDBOp(); + + /* fetch the module from ARG2 */ + BOp(p_execute2, Osbpp); + + mod = ARG2; + deref_head(mod, execute2_unk0); + execute2_nvar0: + if (!IsAtomTerm(mod)) { + saveregs(); + Yap_Error(TYPE_ERROR_ATOM, mod, "call/2"); + setregs(); + } + goto start_execute; + + BEGP(pt1); + deref_body(mod, pt1, execute2_unk0, execute2_nvar0); + saveregs(); + Yap_Error(INSTANTIATION_ERROR, mod, "call/2"); + setregs(); + ENDP(pt1); + /* Oops, second argument was unbound too */ + FAIL(); + ENDBOp(); + + BOp(p_execute, Osbmp); + /* fetch the module from PREG */ + mod = PREG->y_u.Osbmp.mod; + start_execute: + /* place to cut to */ + b_ptr = B; + /* we have mod, and ARG1 has the goal, let us roll */ + /* Try to preserve the environment */ + ENV_YREG = (CELL *) (((char *) YREG) + PREG->y_u.Osbmp.s); +#ifdef FROZEN_STACKS + { + choiceptr top_b = PROTECT_FROZEN_B(B); +#ifdef YAPOR_SBA + if (ENV_YREG > (CELL *) top_b || ENV_YREG < HR) ENV_YREG = (CELL *) top_b; +#else + if (ENV_YREG > (CELL *) top_b) ENV_YREG = (CELL *) top_b; +#endif /* YAPOR_SBA */ + } +#else + if (ENV_YREG > (CELL *) B) { + ENV_YREG = (CELL *) B; + } +#endif /* FROZEN_STACKS */ + d0 = ARG1; + if (PRED_GOAL_EXPANSION_ALL) { + goto execute_metacall; + } + restart_execute: + deref_head(d0, execute_unk); + execute_nvar: + if (IsApplTerm(d0)) { + f = FunctorOfTerm(d0); + if (IsExtensionFunctor(f)) { + goto execute_metacall; + } + pen = RepPredProp(PredPropByFunc(f, mod)); + execute_pred_f: + if (pen->PredFlags & (MetaPredFlag|GoalExPredFlag)) { + /* just strip all of M:G */ + if (f == FunctorModule) { + Term tmod = ArgOfTerm(1,d0); + /* loop on modules */ + if (!IsVarTerm(tmod) && IsAtomTerm(tmod)) { + d0 = ArgOfTerm(2,d0); + mod = tmod; + goto execute_nvar; + } + goto execute_metacall; + } + if (f == FunctorComma) { + Term nmod = mod; + + /* optimise conj */ + SREG = RepAppl(d0); + BEGD(d1); + d1 = SREG[2]; + /* create an environment to execute the call */ + deref_head(d1, execute_comma_unk); + execute_comma_nvar: + if (IsAtomTerm(d1)) { + /* atomic goal is simpler */ + ENV_YREG[-EnvSizeInCells-2] = MkIntegerTerm((Int)PredPropByAtom(AtomOfTerm(d1),nmod)); + } else if (IsApplTerm(d1)) { + Functor f1 = FunctorOfTerm(d1); + if (IsExtensionFunctor(f1)) { + goto execute_metacall; + } else { + /* check for modules when looking up */ + if (f1 == FunctorModule) { + Term tmod = ArgOfTerm(1,d1); + /* loop on modules */ + if (!IsVarTerm(tmod) && IsAtomTerm(tmod)) { + d1 = ArgOfTerm(2,d1); + nmod = tmod; + goto execute_comma_nvar; + } + goto execute_metacall; + } + ENV_YREG[-EnvSizeInCells-2] = MkIntegerTerm((Int)PredPropByFunc(f1,nmod)); + } + } else { + goto execute_metacall; + } + ENV_YREG[-EnvSizeInCells-3] = mod; + /* now, we can create the new environment for the meta-call */ + /* notice that we are at a call, so we should ignore CP */ + ENV_YREG[E_CP] = (CELL)NEXTOP(PREG,Osbmp); + ENV_YREG[E_CB] = (CELL)b_ptr; + ENV_YREG[E_E] = (CELL)ENV; +#ifdef DEPTH_LIMIT + ENV_YREG[E_DEPTH] = DEPTH; +#endif /* DEPTH_LIMIT */ + ENV_YREG[-EnvSizeInCells-1] = d1; + ENV = ENV_YREG; + ENV_YREG -= EnvSizeInCells+3; + CPREG = NEXTOP(PREG, Osbmp); + PREG = COMMA_CODE; +/* for profiler */ + save_pc(); + d0 = SREG[1]; + goto restart_execute; + + BEGP(pt1); + deref_body(d1, pt1, execute_comma_unk, execute_comma_nvar); + goto execute_metacall; + ENDP(pt1); + ENDD(d1); + } else if (mod != CurrentModule) { + goto execute_metacall; + } + } + + /* copy arguments of meta-call to XREGS */ + BEGP(pt1); + pt1 = RepAppl(d0); + BEGD(d2); + for (d2 = ArityOfFunctor(f); d2; d2--) { +#ifdef YAPOR_SBA + BEGD(d1); + d1 = pt1[d2]; + if (d1 == 0) { + XREGS[d2] = (CELL)(pt1+d2); + } else { + XREGS[d2] = d1; + } +#else + XREGS[d2] = pt1[d2]; +#endif + } + ENDD(d2); + ENDP(pt1); + CACHE_A1(); + } else if (IsAtomTerm(d0)) { + pen = RepPredProp(PredPropByAtom(AtomOfTerm(d0), mod)); + execute_pred_a: + /* handle extra pruning */ + if (pen->FunctorOfPred == (Functor)AtomCut) { + if (b_ptr != B) { + saveregs(); + prune(b_ptr PASS_REGS); + setregs(); + } + } + } else { + goto execute_metacall; + } + + /* execute, but test first for interrupts */ + execute_end: + /* code copied from call */ +#ifndef NO_CHECKING + check_stack(NoStackPExecute, HR); +#endif + execute_stack_checked: + CPREG = NEXTOP(PREG, Osbmp); + ALWAYS_LOOKAHEAD(pen->OpcodeOfPred); + PREG = pen->CodeOfPred; + /* for profiler */ + save_pc(); +#ifdef DEPTH_LIMIT + if (DEPTH <= MkIntTerm(1)) {/* I assume Module==0 is primitives */ + if (pen->ModuleOfPred) { + if (DEPTH == MkIntTerm(0)) + FAIL(); + else DEPTH = RESET_DEPTH(); + } + } else if (pen->ModuleOfPred) + DEPTH -= MkIntConstant(2); +#endif /* DEPTH_LIMIT */ +#ifdef LOW_LEVEL_TRACER + if (Yap_do_low_level_trace) + low_level_trace(enter_pred,pen,XREGS+1); +#endif /* LOW_LEVEL_TRACER */ + WRITEBACK_Y_AS_ENV(); + /* setup GB */ + ENV_YREG[E_CB] = (CELL) B; +#ifdef YAPOR + SCH_check_requests(); +#endif /* YAPOR */ + CACHE_A1(); + ALWAYS_GONext(); + ALWAYS_END_PREFETCH(); + + /* meta-call: Prolog to the rescue */ + BEGP(pt1); + deref_body(d0, pt1, execute_unk, execute_nvar); + execute_metacall: + ARG1 = ARG3 = d0; + pen = PredMetaCall; + ARG2 = Yap_cp_as_integer(b_ptr); + if (mod) + ARG4 = mod; + else + ARG4 = TermProlog; + goto execute_end; + ENDP(pt1); + + /* at this point, we have the arguments all set in the argument registers, pen says who is the current predicate. don't remove. */ + NoStackPExecute: + WRITEBACK_Y_AS_ENV(); +#ifdef SHADOW_S + Yap_REGS.S_ = SREG; +#endif + saveregs_and_ycache(); + d0 = interrupt_pexecute( pen PASS_REGS ); + setregs_and_ycache(); +#ifdef SHADOW_S + SREG = Yap_REGS.S_; +#endif + if (!d0) FAIL(); + if (d0 == 2) goto execute_stack_checked; + goto execute_end; + ENDBOp(); + + ENDD(d0); + ENDCACHE_Y_AS_ENV(); + } + #if !USE_THREADED_CODE default: saveregs(); diff --git a/C/absmi_insts.h b/C/absmi_insts.h deleted file mode 100644 index ef54aabbf..000000000 --- a/C/absmi_insts.h +++ /dev/null @@ -1,77 +0,0 @@ -/***************************************************************** - * INSTRUCTIONS * - *****************************************************************/ - -#ifdef INDENT_CODE -{ - { - { -#endif /* INDENT_CODE */ - - -BOp(Ystop, l); - SET_ASP(YREG, E_CB*sizeof(CELL)); - /* make sure ASP is initialised */ - saveregs(); - -#if PUSH_REGS - restore_absmi_regs(old_regs); -#endif -#if BP_FREE - P1REG = PCBACKUP; -#endif - return 1; - ENDBOp(); - - BOp(Nstop, e); - SET_ASP(YREG, E_CB*sizeof(CELL)); - saveregs(); -#if PUSH_REGS - restore_absmi_regs(old_regs); -#endif -#if BP_FREE - P1REG = PCBACKUP; -#endif - return 0; - ENDBOp(); - - - - /************************************************************************\ - * Native Code Execution * -\************************************************************************/ - -#if YAP_JIT - /* native_me */ - BOp(jit_handler, J); - if (!PREG->y_u.J.jh->fi.bcst.c) PREG->y_u.J.jh->mf.isground = IsGround(PREG); - PREG->y_u.J.jh->fi.bcst.c++; - - /* Did PREG reach threshold value to become critical? */ - if (PREG->y_u.J.jh->fi.bcst.c == (COUNT)(ExpEnv.config_struc.frequency_bound*(ExpEnv.config_struc.profiling_startp)) && !PREG->y_u.J.jh->mf.isground) { -#if YAP_DBG_PREDS - if (ExpEnv.debug_struc.pprint_me.criticals != 0 && ExpEnv.debug_struc.pprint_me.criticals != 0x1) { - fprintf(stderr, "%s:%d\n", __FILE__, __LINE__); - fprintf(stderr, "%s", (char*)ExpEnv.debug_struc.pprint_me.criticals); - } -#endif - goto critical_lbl; - } -#if YAP_DBG_PREDS - print_main_when_head(PREG, ON_INTERPRETER); -#endif - PREG = NEXTOP(PREG, J); - JMPNext(); - ENDBOp(); -#endif - -#include "cp_absmi_insts.c" -#include "lu_absmi_insts.c" -#include "fail_absmi_insts.c" -#include "control_absmi_insts.c" -#include "unify_absmi_insts.c" -#include "fli_absmi_insts.c" -#include "or_absmi_insts.c" -#include "index_absmi_insts.c" -#include "prim_absmi_insts.c" -#include "meta_absmi_insts.c" diff --git a/C/absmi_insts.i b/C/absmi_insts.i deleted file mode 100644 index e897d5a87..000000000 --- a/C/absmi_insts.i +++ /dev/null @@ -1,12248 +0,0 @@ -/***************************************************************** - * INSTRUCTIONS * - *****************************************************************/ - -#ifdef INDENT_CODE -{ - { - { -#endif /* INDENT_CODE */ - - BOp(Ystop, l); - SET_ASP(YREG, E_CB*sizeof(CELL)); - /* make sure ASP is initialised */ - saveregs(); - -#if PUSH_REGS - restore_absmi_regs(old_regs); -#endif -#if BP_FREE - P1REG = PCBACKUP; -#endif - return 1; - ENDBOp(); - - BOp(Nstop, e); - SET_ASP(YREG, E_CB*sizeof(CELL)); - saveregs(); -#if PUSH_REGS - restore_absmi_regs(old_regs); -#endif -#if BP_FREE - P1REG = PCBACKUP; -#endif - return 0; - ENDBOp(); - - /***************************************************************** - * Plain try - retry - trust instructions * - *****************************************************************/ - /* try_me Label,NArgs */ - Op(try_me, Otapl); - /* check if enough space between trail and codespace */ - check_trail(TR); - /* I use YREG to go through the choicepoint. Usually YREG is in a - * register, but sometimes (X86) not. In this case, have a - * new register to point at YREG =*/ - CACHE_Y(YREG); - /* store arguments for procedure */ - store_at_least_one_arg(PREG->y_u.Otapl.s); - /* store abstract machine registers */ - store_yaam_regs(PREG->y_u.Otapl.d, 0); - /* On a try_me, set cut to point at previous choicepoint, - * that is, to the B before the cut. - */ - set_cut(S_YREG, B); - /* now, install the new YREG =*/ - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - PREG = NEXTOP(PREG, Otapl); - SET_BB(B_YREG); - ENDCACHE_Y(); - GONext(); - ENDOp(); - - /* retry_me Label,NArgs */ - Op(retry_me, Otapl); - CACHE_Y(B); - /* After retry, cut should be pointing at the parent - * choicepoint for the current B */ - restore_yaam_regs(PREG->y_u.Otapl.d); - restore_at_least_one_arg(PREG->y_u.Otapl.s); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - ENDCACHE_Y(); - PREG = NEXTOP(PREG, Otapl); - GONext(); - ENDOp(); - - /* trust_me UnusedLabel,NArgs */ - Op(trust_me, Otapl); - CACHE_Y(B); -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_last_alternative(PREG, B_YREG); - restore_at_least_one_arg(PREG->y_u.Otapl.s); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B->cp_b); - } - else -#endif /* YAPOR */ - { - pop_yaam_regs(); - pop_at_least_one_arg(PREG->y_u.Otapl.s); - /* After trust, cut should be pointing at the new top - * choicepoint */ -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B); - } - PREG = NEXTOP(PREG, Otapl); - SET_BB(B_YREG); - ENDCACHE_Y(); - GONext(); - ENDOp(); - - /***************************************************************** - * EXO try - retry instructions * - *****************************************************************/ - /* enter_exo Pred,Label */ - BOp(enter_exo, e); - { - yamop *pt; - saveregs(); - pt = Yap_ExoLookup(PredFromDefCode(PREG) PASS_REGS); - setregs(); -#ifdef SHADOW_S - SREG = S; -#endif - PREG = pt; - } - JMPNext(); - ENDBOp(); - - /* check if enough space between trail and codespace */ - /* try_exo Pred,Label */ - Op(try_exo, lp); - /* check if enough space between trail and codespace */ - check_trail(TR); - /* I use YREG to go through the choicepoint. Usually YREG is in a - * register, but sometimes (X86) not. In this case, have a - * new register to point at YREG =*/ - CACHE_Y(YREG); - { - struct index_t *i = (struct index_t *)(PREG->y_u.lp.l); - S_YREG[-1] = (CELL)LINK_TO_ADDRESS(i,i->links[EXO_ADDRESS_TO_OFFSET(i, SREG)]); - } - S_YREG--; - /* store arguments for procedure */ - store_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); - /* store abstract machine registers */ - store_yaam_regs(NEXTOP(PREG,lp), 0); - /* On a try_me, set cut to point at previous choicepoint, - * that is, to the B before the cut. - */ - set_cut(S_YREG, B); - /* now, install the new YREG =*/ - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - PREG = NEXTOP(NEXTOP(PREG, lp),lp); - SET_BB(B_YREG); - ENDCACHE_Y(); - GONext(); - ENDOp(); - - /* check if enough space between trail and codespace */ - /* try_exo_udi Pred,Label */ - Op(try_exo_udi, lp); - /* check if enough space between trail and codespace */ - check_trail(TR); - /* I use YREG =to go through the choicepoint. Usually YREG =is in a - * register, but sometimes (X86) not. In this case, have a - * new register to point at YREG =*/ - CACHE_Y(YREG); - S_YREG--; - /* store arguments for procedure */ - store_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); - /* store abstract machine registers */ - store_yaam_regs(NEXTOP(PREG,lp), 0); - /* On a try_me, set cut to point at previous choicepoint, - * that is, to the B before the cut. - */ - set_cut(S_YREG, B); - /* now, install the new YREG =*/ - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - PREG = NEXTOP(NEXTOP(PREG, lp),lp); - SET_BB(B_YREG); - ENDCACHE_Y(); - GONext(); - ENDOp(); - - /* try_udi Pred,Label */ - Op(try_udi, p); - /* check if enough space between trail and codespace */ - check_trail(TR); - /* I use YREG =to go through the choicepoint. Usually YREG =is in a - * register, but sometimes (X86) not. In this case, have a - * new register to point at YREG =*/ - CACHE_Y(YREG); - { - S_YREG[-1] = (CELL)SREG; /* the udi code did S = (CELL*)judyp; */ - } - S_YREG--; - /* store arguments for procedure */ - store_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); - /* store abstract machine registers */ - store_yaam_regs(NEXTOP(PREG,lp), 0); - /* On a try_me, set cut to point at previous choicepoint, - * that is, to the B before the cut. - */ - set_cut(S_YREG, B); - /* now, install the new YREG =*/ - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - PREG = NEXTOP(NEXTOP(PREG, lp),lp); - SET_BB(B_YREG); - ENDCACHE_Y(); - GONext(); - ENDOp(); - - /* check if enough space between trail and codespace */ - /* try_exo Pred,Label */ - Op(try_all_exo, lp); - /* check if enough space between trail and codespace */ - check_trail(TR); - /* I use YREG =to go through the choicepoint. Usually YREG =is in a - * register, but sometimes (X86) not. In this case, have a - * new register to point at YREG =*/ - CACHE_Y(YREG); - { - struct index_t *i = (struct index_t *)(PREG->y_u.lp.l); - SREG = i->cls; - S_YREG[-2] = (CELL)(SREG+i->arity); - S_YREG[-1] = (CELL)(SREG+i->arity*i->nels); - } - S_YREG-=2; - /* store arguments for procedure */ - store_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); - /* store abstract machine registers */ - store_yaam_regs(NEXTOP(PREG,lp), 0); - /* On a try_me, set cut to point at previous choicepoint, - * that is, to the B before the cut. - */ - set_cut(S_YREG, B); - /* now, install the new YREG =*/ - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - PREG = NEXTOP(NEXTOP(PREG, lp),lp); - SET_BB(B_YREG); - ENDCACHE_Y(); - GONext(); - ENDOp(); - - /* retry_exo Pred */ - Op(retry_exo, lp); - BEGD(d0); - CACHE_Y(B); - { - struct index_t *it = (struct index_t *)(PREG->y_u.lp.l); - BITS32 offset = ADDRESS_TO_LINK(it,(BITS32 *)((CELL *)(B+1))[it->arity]); - d0 = it->links[offset]; - ((CELL *)(B+1))[it->arity] = (CELL)LINK_TO_ADDRESS(it, d0); - SREG = EXO_OFFSET_TO_ADDRESS(it, offset); - } - if (d0) { - /* After retry, cut should be pointing at the parent - * choicepoint for the current B */ - restore_yaam_regs(PREG); - restore_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - } else { -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_last_alternative(PREG, B_YREG); - restore_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B->cp_b); - } else -#endif /* YAPOR */ - { - pop_yaam_regs(); - pop_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); - /* After trust, cut should be pointing at the new top - * choicepoint */ -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B); - } - } - PREG = NEXTOP(PREG, lp); - ENDCACHE_Y(); - ENDD(D0); - GONext(); - ENDOp(); - - /* retry_exo_udi Pred */ - Op(retry_exo_udi, lp); - BEGD(d0); - CACHE_Y(B); - { - struct index_t *it = (struct index_t *)(PREG->y_u.lp.l); - saveregs(); - d0 = ((CRetryExoIndex)it->udi_next)(it PASS_REGS); - setregs(); -#ifdef SHADOW_S - SREG = S; -#endif - } - if (d0) { - /* After retry, cut should be pointing at the parent - * choicepoint for the current B */ - restore_yaam_regs(PREG); - restore_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - } else { -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_last_alternative(PREG, B_YREG); - restore_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B->cp_b); - } else -#endif /* YAPOR */ - { - pop_yaam_regs(); - pop_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); - /* After trust, cut should be pointing at the new top - * choicepoint */ -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B); - } - } - PREG = NEXTOP(PREG, lp); - ENDCACHE_Y(); - ENDD(D0); - GONext(); - ENDOp(); - - /* retry_exo Pred */ - Op(retry_udi, p); - BEGD(d0); - CACHE_Y(B); - { - // struct udi_index_t *jp = (struct udi_index_t *)((CELL *)(B+1))[it->arity]; - /* operation has a side-effect: S = (CELL*)NextClause */ - saveregs(); - d0 = 0L; // Yap_UDI_NextAlt(jp); - setregs(); -#ifdef SHADOW_S - SREG = S; -#endif - /* d0 says if we're last */ - } - if (d0) { - /* After retry, cut should be pointing at the parent - * choicepoint for the current B */ - restore_yaam_regs(PREG); - restore_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - } else { -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_last_alternative(PREG, B_YREG); - restore_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B->cp_b); - } else -#endif /* YAPOR */ - { - pop_yaam_regs(); - pop_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); - /* After trust, cut should be pointing at the new top - * choicepoint */ -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - #endif /* FROZEN_STACKS */ - set_cut(S_YREG, B); - } - } - PREG = (yamop *)SREG; - ENDCACHE_Y(); - ENDD(D0); - GONext(); - ENDOp(); - - /* retry_exo Pred */ - Op(retry_all_exo, lp); - BEGD(d0); - CACHE_Y(B); - { - UInt arity = ((struct index_t *)PREG->y_u.lp.l)->arity; - CELL *extras = (CELL *)(B+1); - SREG = (CELL *)extras[arity]; - d0 = (SREG+arity != (CELL *)extras[arity+1]); - if (d0) { - extras[arity] = (CELL)(SREG+arity); - /* After retry, cut should be pointing at the parent - * choicepoint for the current B */ - restore_yaam_regs(PREG); - restore_at_least_one_arg(arity); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - } else { -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_last_alternative(PREG, B_YREG); - restore_at_least_one_arg(arity); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B->cp_b); - } else -#endif /* YAPOR */ - { - pop_yaam_regs(); - pop_at_least_one_arg(arity); - /* After trust, cut should be pointing at the new top - * choicepoint */ -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B); - } - } - } - PREG = NEXTOP(PREG, lp); - ENDCACHE_Y(); - ENDD(D0); - GONext(); - ENDOp(); - - /***************************************************************** - * Profiled try - retry - trust instructions * - *****************************************************************/ - - /* profiled_enter_me Pred */ - Op(enter_profiling, p); - LOCK(PREG->y_u.p.p->StatisticsForPred.lock); - PREG->y_u.p.p->StatisticsForPred.NOfEntries++; - UNLOCK(PREG->y_u.p.p->StatisticsForPred.lock); - PREG = NEXTOP(PREG, p); - GONext(); - ENDOp(); - - /* profiled_retry Label,NArgs */ - Op(retry_profiled, p); - LOCK(PREG->y_u.p.p->StatisticsForPred.lock); - PREG->y_u.p.p->StatisticsForPred.NOfRetries++; - UNLOCK(PREG->y_u.p.p->StatisticsForPred.lock); - PREG = NEXTOP(PREG, p); - GONext(); - ENDOp(); - - /* profiled_retry_me Label,NArgs */ - Op(profiled_retry_me, Otapl); - CACHE_Y(B); - /* After retry, cut should be pointing at the parent - * choicepoint for the current B */ - LOCK(PREG->y_u.Otapl.p->StatisticsForPred.lock); - PREG->y_u.Otapl.p->StatisticsForPred.NOfRetries++; - UNLOCK(PREG->y_u.Otapl.p->StatisticsForPred.lock); - restore_yaam_regs(PREG->y_u.Otapl.d); - restore_args(PREG->y_u.Otapl.s); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - ENDCACHE_Y(); - PREG = NEXTOP(PREG, Otapl); - GONext(); - ENDOp(); - - /* profiled_trust_me UnusedLabel,NArgs */ - Op(profiled_trust_me, Otapl); - CACHE_Y(B); -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_last_alternative(PREG, B_YREG); - restore_args(PREG->y_u.Otapl.s); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B->cp_b); - } - else -#endif /* YAPOR */ - { - pop_yaam_regs(); - pop_args(PREG->y_u.Otapl.s); - /* After trust, cut should be pointing at the new top - * choicepoint */ -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B); - } - SET_BB(B_YREG); - ENDCACHE_Y(); - LOCK(PREG->y_u.Otapl.p->StatisticsForPred.lock); - PREG->y_u.Otapl.p->StatisticsForPred.NOfRetries++; - UNLOCK(PREG->y_u.Otapl.p->StatisticsForPred.lock); - PREG = NEXTOP(PREG, Otapl); - GONext(); - ENDOp(); - - BOp(profiled_retry_logical, OtaLl); - check_trail(TR); - { - UInt timestamp; - CACHE_Y(B); - -#if defined(YAPOR) || defined(THREADS) - if (PP != PREG->y_u.OtaLl.d->ClPred) { - if (PP) UNLOCKPE(15,PP); - PP = PREG->y_u.OtaLl.d->ClPred; - PELOCK(15,PP); - } -#endif - timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[PREG->y_u.OtaLl.s]); - if (!VALID_TIMESTAMP(timestamp, PREG->y_u.OtaLl.d)) { - /* jump to next instruction */ - PREG=PREG->y_u.OtaLl.n; - JMPNext(); - } - restore_yaam_regs(PREG->y_u.OtaLl.n); - restore_args(PREG->y_u.OtaLl.s); - LOCK(PREG->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); - PREG->y_u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; - UNLOCK(PREG->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); -#ifdef THREADS - PP = PREG->y_u.OtaLl.d->ClPred; -#endif - PREG = PREG->y_u.OtaLl.d->ClCode; -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - ENDCACHE_Y(); - } - JMPNext(); - ENDBOp(); - - BOp(profiled_trust_logical, OtILl); - CACHE_Y(B); - { - LogUpdIndex *cl = PREG->y_u.OtILl.block; - PredEntry *ap = cl->ClPred; - LogUpdClause *lcl = PREG->y_u.OtILl.d; - UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); - -#if defined(YAPOR) || defined(THREADS) - if (PP != ap) { - if (PP) UNLOCKPE(16,PP); - PP = ap; - PELOCK(16,PP); - } -#endif - if (!VALID_TIMESTAMP(timestamp, lcl)) { - /* jump to next alternative */ - PREG = FAILCODE; - } else { - LOCK(ap->StatisticsForPred.lock); - ap->StatisticsForPred.NOfRetries++; - UNLOCK(ap->StatisticsForPred.lock); - PREG = lcl->ClCode; - } - /* HEY, leave indexing block alone!! */ - /* check if we are the ones using this code */ -#if MULTIPLE_STACKS - DEC_CLREF_COUNT(cl); - /* clear the entry from the trail */ - B->cp_tr--; - TR = B->cp_tr; - /* actually get rid of the code */ - if (cl->ClRefCount == 0 && (cl->ClFlags & (ErasedMask|DirtyMask))) { - if (PREG != FAILCODE) { - /* I am the last one using this clause, hence I don't need a lock - to dispose of it - */ - if (lcl->ClRefCount == 1) { - /* make sure the clause isn't destroyed */ - /* always add an extra reference */ - INC_CLREF_COUNT(lcl); - TRAIL_CLREF(lcl); - } - } - if (cl->ClFlags & ErasedMask) { - saveregs(); - Yap_ErLogUpdIndex(cl); - setregs(); - } else { - saveregs(); - Yap_CleanUpIndex(cl); - setregs(); - } - save_pc(); - } -#else - if (TrailTerm(B->cp_tr-1) == CLREF_TO_TRENTRY(cl) && - B->cp_tr != B->cp_b->cp_tr) { - cl->ClFlags &= ~InUseMask; - --B->cp_tr; -#if FROZEN_STACKS - if (B->cp_tr > TR_FZ) -#endif - { - TR = B->cp_tr; - } - /* next, recover space for the indexing code if it was erased */ - if (cl->ClFlags & (ErasedMask|DirtyMask)) { - if (PREG != FAILCODE) { - /* make sure we don't erase the clause we are jumping to, - notice that we can erase a number of refs in one go. */ - if (!(lcl->ClFlags & InUseMask)) { - lcl->ClFlags |= InUseMask; - TRAIL_CLREF(lcl); - } - } - if (cl->ClFlags & ErasedMask) { - saveregs(); - Yap_ErLogUpdIndex(cl); - setregs(); - } else { - saveregs(); - Yap_CleanUpIndex(cl); - setregs(); - } - save_pc(); - } - } -#endif -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_last_alternative(PREG, B_YREG); - restore_args(ap->ArityOfPE); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#else - S_YREG++; -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B->cp_b); - } else -#endif /* YAPOR */ - { - pop_yaam_regs(); - pop_args(ap->ArityOfPE); - S_YREG--; -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B); - } - SET_BB(B_YREG); - ENDCACHE_Y(); - JMPNext(); - } - ENDBOp(); - - /***************************************************************** - * Call count instructions * - *****************************************************************/ - - /* count_enter_me Label,NArgs */ - Op(count_call, p); - LOCK(PREG->y_u.p.p->StatisticsForPred.lock); - PREG->y_u.p.p->StatisticsForPred.NOfEntries++; - UNLOCK(PREG->y_u.p.p->StatisticsForPred.lock); - LOCAL_ReductionsCounter--; - if (LOCAL_ReductionsCounter == 0 && LOCAL_ReductionsCounterOn) { - saveregs(); - Yap_NilError(CALL_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - LOCAL_PredEntriesCounter--; - if (LOCAL_PredEntriesCounter == 0 && LOCAL_PredEntriesCounterOn) { - saveregs(); - Yap_NilError(PRED_ENTRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - PREG = NEXTOP(PREG, p); - GONext(); - ENDOp(); - - /* count_retry Label,NArgs */ - Op(count_retry, p); - LOCK(PREG->y_u.p.p->StatisticsForPred.lock); - PREG->y_u.p.p->StatisticsForPred.NOfRetries++; - UNLOCK(PREG->y_u.p.p->StatisticsForPred.lock); - LOCAL_RetriesCounter--; - if (LOCAL_RetriesCounter == 0 && LOCAL_RetriesCounterOn) { - /* act as if we had backtracked */ - ENV = B->cp_env; - saveregs(); - Yap_NilError(RETRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - LOCAL_PredEntriesCounter--; - if (LOCAL_PredEntriesCounter == 0 && LOCAL_PredEntriesCounterOn) { - ENV = B->cp_env; - saveregs(); - Yap_NilError(PRED_ENTRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - PREG = NEXTOP(PREG, p); - GONext(); - ENDOp(); - - /* count_retry_me Label,NArgs */ - Op(count_retry_me, Otapl); - CACHE_Y(B); - restore_yaam_regs(PREG->y_u.Otapl.d); - restore_args(PREG->y_u.Otapl.s); - /* After retry, cut should be pointing at the parent - * choicepoint for the current B */ -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - ENDCACHE_Y(); - LOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); - ((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.NOfRetries++; - UNLOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); - LOCAL_RetriesCounter--; - if (LOCAL_RetriesCounter == 0 && LOCAL_RetriesCounterOn) { - saveregs(); - Yap_NilError(RETRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - LOCAL_PredEntriesCounter--; - if (LOCAL_PredEntriesCounter == 0 && LOCAL_PredEntriesCounterOn) { - saveregs(); - Yap_NilError(PRED_ENTRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - PREG = NEXTOP(PREG, Otapl); - GONext(); - ENDOp(); - - /* count_trust_me UnusedLabel,NArgs */ - Op(count_trust_me, Otapl); - CACHE_Y(B); -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_last_alternative(PREG, B_YREG); - restore_args(PREG->y_u.Otapl.s); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B->cp_b); - } - else -#endif /* YAPOR */ - { - pop_yaam_regs(); - pop_args(PREG->y_u.Otapl.s); - /* After trust, cut should be pointing at the new top - * choicepoint */ -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B); - } - SET_BB(B_YREG); - ENDCACHE_Y(); - LOCAL_RetriesCounter--; - if (LOCAL_RetriesCounter == 0) { - saveregs(); - Yap_NilError(RETRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - LOCAL_PredEntriesCounter--; - if (LOCAL_PredEntriesCounter == 0) { - saveregs(); - Yap_NilError(PRED_ENTRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - LOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); - ((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.NOfRetries++; - UNLOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); - PREG = NEXTOP(PREG, Otapl); - GONext(); - ENDOp(); - - BOp(count_retry_logical, OtaLl); - check_trail(TR); - { - UInt timestamp; - CACHE_Y(B); - -#if defined(YAPOR) || defined(THREADS) - if (PP != PREG->y_u.OtaLl.d->ClPred) { - if (PP) UNLOCKPE(15,PP); - PP = PREG->y_u.OtaLl.d->ClPred; - PELOCK(15,PP); - } -#endif - timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[PREG->y_u.OtaLl.s]); - if (!VALID_TIMESTAMP(timestamp, PREG->y_u.OtaLl.d)) { - /* jump to next instruction */ - PREG=PREG->y_u.OtaLl.n; - JMPNext(); - } - restore_yaam_regs(PREG->y_u.OtaLl.n); - restore_args(PREG->y_u.OtaLl.s); - LOCAL_RetriesCounter--; - if (LOCAL_RetriesCounter == 0) { - saveregs(); - Yap_NilError(RETRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - LOCAL_PredEntriesCounter--; - if (LOCAL_PredEntriesCounter == 0) { - saveregs(); - Yap_NilError(PRED_ENTRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - LOCK(PREG->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); - PREG->y_u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; - UNLOCK(PREG->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); -#ifdef THREADS - PP = PREG->y_u.OtaLl.d->ClPred; -#endif - PREG = PREG->y_u.OtaLl.d->ClCode; -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - ENDCACHE_Y(); - } - JMPNext(); - ENDBOp(); - - BOp(count_trust_logical, OtILl); - CACHE_Y(B); - { - LogUpdIndex *cl = PREG->y_u.OtILl.block; - PredEntry *ap = cl->ClPred; - LogUpdClause *lcl = PREG->y_u.OtILl.d; - UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); - -#if defined(YAPOR) || defined(THREADS) - if (PP != ap) { - if (PP) UNLOCKPE(16,PP); - PP = ap; - PELOCK(16,PP); - } -#endif - if (!VALID_TIMESTAMP(timestamp, lcl)) { - /* jump to next alternative */ - PREG = FAILCODE; - } else { - LOCAL_RetriesCounter--; - if (LOCAL_RetriesCounter == 0) { - saveregs(); - Yap_NilError(RETRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - LOCAL_PredEntriesCounter--; - if (LOCAL_PredEntriesCounter == 0) { - saveregs(); - Yap_NilError(PRED_ENTRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - LOCK(ap->StatisticsForPred.lock); - ap->StatisticsForPred.NOfRetries++; - UNLOCK(ap->StatisticsForPred.lock); - PREG = lcl->ClCode; - } - /* HEY, leave indexing block alone!! */ - /* check if we are the ones using this code */ -#if MULTIPLE_STACKS - PELOCK(2, ap); - PP = ap; - DEC_CLREF_COUNT(cl); - /* clear the entry from the trail */ - --B->cp_tr; - TR = B->cp_tr; - /* actually get rid of the code */ - if (cl->ClRefCount == 0 && (cl->ClFlags & (ErasedMask|DirtyMask))) { - if (PREG != FAILCODE) { - /* I am the last one using this clause, hence I don't need a lock - to dispose of it - */ - if (lcl->ClRefCount == 1) { - /* make sure the clause isn't destroyed */ - /* always add an extra reference */ - INC_CLREF_COUNT(lcl); - TRAIL_CLREF(lcl); - } - } - if (cl->ClFlags & ErasedMask) { - saveregs(); - Yap_ErLogUpdIndex(cl); - setregs(); - } else { - saveregs(); - Yap_CleanUpIndex(cl); - setregs(); - } - save_pc(); - } -#else - if (TrailTerm(B->cp_tr-1) == CLREF_TO_TRENTRY(cl) && - B->cp_tr != B->cp_b->cp_tr) { - cl->ClFlags &= ~InUseMask; - --B->cp_tr; -#if FROZEN_STACKS - if (B->cp_tr > TR_FZ) -#endif - { - TR = B->cp_tr; - } - /* next, recover space for the indexing code if it was erased */ - if (cl->ClFlags & (ErasedMask|DirtyMask)) { - if (PREG != FAILCODE) { - /* make sure we don't erase the clause we are jumping too */ - if (!(lcl->ClFlags & InUseMask)) { - lcl->ClFlags |= InUseMask; - TRAIL_CLREF(lcl); - } - } - if (cl->ClFlags & ErasedMask) { - saveregs(); - Yap_ErLogUpdIndex(cl); - setregs(); - } else { - saveregs(); - Yap_CleanUpIndex(cl); - setregs(); - } - save_pc(); - } - } -#endif -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_last_alternative(PREG, B_YREG); - restore_args(ap->ArityOfPE); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#else - S_YREG++; -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B->cp_b); - } else -#endif /* YAPOR */ - { - pop_yaam_regs(); - pop_args(ap->ArityOfPE); - S_YREG--; -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B); - } - SET_BB(B_YREG); - ENDCACHE_Y(); - JMPNext(); - } - ENDBOp(); - - - - /***************************************************************** - * enter a logical semantics dynamic predicate * - *****************************************************************/ - - /* only meaningful with THREADS on! */ - /* lock logical updates predicate. */ - Op(lock_lu, p); -#if PARALLEL_YAP - if (PP) { - GONext(); - } - PP = PREG->y_u.p.p; - PELOCK(3, PP); -#endif - PREG = NEXTOP(PREG, p); - GONext(); - ENDOp(); - - /* only meaningful with THREADS on! */ - /* lock logical updates predicate. */ - Op(unlock_lu, e); -#if defined(YAPOR) || defined(THREADS) - if (PP) { - UNLOCKPE(1,PP); - PP = NULL; - } -#endif - PREG = NEXTOP(PREG, e); - GONext(); - ENDOp(); - - - /* enter logical pred */ - BOp(alloc_for_logical_pred, L); - check_trail(TR); - /* say that an environment is using this clause */ - /* we have our own copy for the clause */ -#if MULTIPLE_STACKS - { - LogUpdClause *cl = PREG->y_u.L.ClBase; -#if PARALLEL_YAP - PredEntry *ap = cl->ClPred; -#endif - - /* always add an extra reference */ - INC_CLREF_COUNT(cl); - TRAIL_CLREF(cl); - UNLOCKPE(2,ap); - PP = NULL; - } -#else - { - LogUpdClause *cl = (LogUpdClause *)PREG->y_u.L.ClBase; - if (!(cl->ClFlags & InUseMask)) { - cl->ClFlags |= InUseMask; - TRAIL_CLREF(cl); - } - } -#endif - PREG = NEXTOP(PREG, L); - JMPNext(); - ENDBOp(); - - /* copy database term */ - BOp(copy_idb_term, e); - { - LogUpdClause *cl = ClauseCodeToLogUpdClause(PREG); - Term t; - - SET_ASP(YREG, E_CB*sizeof(CELL)); - saveregs(); - while ((t = Yap_FetchTermFromDB(cl->lusl.ClSource)) == 0L) { - if (PP) UNLOCKPE(3,PP); -#if defined(YAPOR) || defined(THREADS) - PP = NULL; -#endif - if (LOCAL_Error_TYPE == OUT_OF_ATTVARS_ERROR) { - LOCAL_Error_TYPE = YAP_NO_ERROR; - if (!Yap_growglobal(NULL)) { - Yap_NilError(OUT_OF_ATTVARS_ERROR, LOCAL_ErrorMessage); - FAIL(); - } - } else { - LOCAL_Error_TYPE = YAP_NO_ERROR; - if (!Yap_gc(3, ENV, CP)) { - Yap_NilError(OUT_OF_STACK_ERROR, LOCAL_ErrorMessage); - FAIL(); - } - } -#if defined(YAPOR) || defined(THREADS) - PELOCK(5,ClauseCodeToLogUpdClause(PREG)->ClPred); - PP = ClauseCodeToLogUpdClause(PREG)->ClPred; -#endif - } - if (!Yap_IUnify(ARG2, t)) { - setregs(); -#if defined(YAPOR) || defined(THREADS) - if (PP) UNLOCKPE(6,PP); - PP = NULL; -#endif - FAIL(); - } - if (!Yap_IUnify(ARG3, MkDBRefTerm((DBRef)cl))) { - setregs(); -#if defined(YAPOR) || defined(THREADS) - if (PP) UNLOCKPE(5,PP); - PP = NULL; -#endif - FAIL(); - } - setregs(); - -#if MULTIPLE_STACKS - /* always add an extra reference */ - INC_CLREF_COUNT(cl); - TRAIL_CLREF(cl); - if (PP) UNLOCKPE(7,PP); - PP = NULL; -#else - if (!(cl->ClFlags & InUseMask)) { - /* Clause *cl = (Clause *)PREG->y_u.EC.ClBase; - - PREG->y_u.EC.ClTrail = TR-(tr_fr_ptr)LOCAL_TrailBase; - PREG->y_u.EC.ClENV = LCL0-YREG;*/ - cl->ClFlags |= InUseMask; - TRAIL_CLREF(cl); - } -#endif - } - PREG = CPREG; - YREG = ENV; -#ifdef DEPTH_LIMIT - DEPTH = YREG[E_DEPTH]; -#endif - JMPNext(); - ENDBOp(); - - - /* unify with database term */ - BOp(unify_idb_term, e); - { - LogUpdClause *cl = ClauseCodeToLogUpdClause(PREG); - - saveregs(); - if (!Yap_IUnify(ARG2, cl->lusl.ClSource->Entry)) { - setregs(); - UNLOCKPE(8,PP); -#if defined(YAPOR) || defined(THREADS) - PP = NULL; -#endif - FAIL(); - } - if (!Yap_IUnify(ARG3, MkDBRefTerm((DBRef)cl))) { - setregs(); - UNLOCKPE(9,PP); -#if defined(YAPOR) || defined(THREADS) - PP = NULL; -#endif - FAIL(); - } - setregs(); - - /* say that an environment is using this clause */ - /* we have our own copy for the clause */ -#if MULTIPLE_STACKS - /* always add an extra reference */ - INC_CLREF_COUNT(cl); - TRAIL_CLREF(cl); - UNLOCKPE(10,PP); - PP = NULL; -#else - if (!(cl->ClFlags & InUseMask)) { - /* Clause *cl = (Clause *)PREG->y_u.EC.ClBase; - - PREG->y_u.EC.ClTrail = TR-(tr_fr_ptr)LOCAL_TrailBase; - PREG->y_u.EC.ClENV = LCL0-YREG;*/ - cl->ClFlags |= InUseMask; - TRAIL_CLREF(cl); - } -#endif - } - PREG = CPREG; - YREG = ENV; -#ifdef DEPTH_LIMIT - DEPTH = YREG[E_DEPTH]; -#endif - JMPNext(); - ENDBOp(); - - - /***************************************************************** - * check for enough room * - *****************************************************************/ - - /* ensure_space */ - BOp(ensure_space, Osbpa); - { - Int sz = PREG->y_u.Osbpa.i; - UInt arity = PREG->y_u.Osbpa.p->ArityOfPE; - - if (Unsigned(HR) + sz > Unsigned(YREG)-StackGap( PASS_REGS1 )) { - YENV[E_CP] = (CELL) CPREG; - YENV[E_E] = (CELL) ENV; -#ifdef DEPTH_LIMIT - YENV[E_DEPTH] = DEPTH; -#endif /* DEPTH_LIMIT */ - SET_ASP(YREG, PREG->y_u.Osbpa.s); - PREG = NEXTOP(PREG,Osbpa); - saveregs(); - if (!Yap_gcl(sz, arity, YENV, PREG)) { - Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); - setregs(); - FAIL(); - } else { - setregs(); - } - } else { - PREG = NEXTOP(PREG,Osbpa); - } - } - JMPNext(); - ENDBOp(); - - /***************************************************************** - * try and retry of dynamic predicates * - *****************************************************************/ - - /* spy_or_trymark */ - BOp(spy_or_trymark, Otapl); - PELOCK(5, ((PredEntry *)(PREG->y_u.Otapl.p))); - PREG = (yamop *)(&(((PredEntry *)(PREG->y_u.Otapl.p))->OpcodeOfPred)); - UNLOCKPE(11,(PredEntry *)(PREG->y_u.Otapl.p)); - saveregs(); - spy_goal( PASS_REGS1 ); - setregs(); - ENDBOp(); - - /* try_and_mark Label,NArgs */ - BOp(try_and_mark, Otapl); - check_trail(TR); -#if defined(YAPOR) || defined(THREADS) -#ifdef YAPOR - /* The flags I check here should never change during execution */ - CUT_wait_leftmost(); -#endif /* YAPOR */ - if (PREG->y_u.Otapl.p->PredFlags & LogUpdatePredFlag) { - PELOCK(6,PREG->y_u.Otapl.p); - PP = PREG->y_u.Otapl.p; - } - if (PREG->y_u.Otapl.p->CodeOfPred != PREG) { - /* oops, someone changed the procedure under our feet, - fortunately this is no big deal because we haven't done - anything yet */ - PP = NULL; - PREG = PREG->y_u.Otapl.p->CodeOfPred; - UNLOCKPE(12,PREG->y_u.Otapl.p); - /* for profiler */ - save_pc(); - JMPNext(); - } -#endif - CACHE_Y(YREG); - PREG = PREG->y_u.Otapl.d; - /* - I've got a read lock on the DB, so I don't need to care... - niaaahh.... niahhhh... - */ - LOCK(DynamicLock(PREG)); - /* one can now mess around with the predicate */ - UNLOCKPE(13,((PredEntry *)(PREG->y_u.Otapl.p))); - BEGD(d1); - d1 = PREG->y_u.Otapl.s; - store_args(d1); - store_yaam_regs(PREG, 0); - ENDD(d1); - set_cut(S_YREG, B); - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - SET_BB(B_YREG); - ENDCACHE_Y(); -#if MULTIPLE_STACKS - INC_CLREF_COUNT(ClauseCodeToDynamicClause(PREG)); - UNLOCK(DynamicLock(PREG)); - TRAIL_CLREF(ClauseCodeToDynamicClause(PREG)); -#else - if (FlagOff(InUseMask, DynamicFlags(PREG))) { - - SetFlag(InUseMask, DynamicFlags(PREG)); - TRAIL_CLREF(ClauseCodeToDynamicClause(PREG)); - } -#endif - PREG = NEXTOP(PREG,Otapl); - JMPNext(); - - ENDBOp(); - - BOp(count_retry_and_mark, Otapl); - LOCAL_RetriesCounter--; - if (LOCAL_RetriesCounter == 0) { - saveregs(); - Yap_NilError(RETRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - LOCAL_PredEntriesCounter--; - if (LOCAL_PredEntriesCounter == 0) { - saveregs(); - Yap_NilError(PRED_ENTRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - /* enter a retry dynamic */ - ENDBOp(); - - BOp(profiled_retry_and_mark, Otapl); - LOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); - ((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.NOfRetries++; - UNLOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); - /* enter a retry dynamic */ - ENDBOp(); - - /* retry_and_mark Label,NArgs */ - BOp(retry_and_mark, Otapl); -#ifdef YAPOR - CUT_wait_leftmost(); -#endif /* YAPOR */ - /* need to make the DB stable until I get the new clause */ - PELOCK(7,PREG->y_u.Otapl.p); - CACHE_Y(B); - PREG = PREG->y_u.Otapl.d; - LOCK(DynamicLock(PREG)); - UNLOCK(PREG->y_u.Otapl.p->PELock); - restore_yaam_regs(PREG); - restore_args(PREG->y_u.Otapl.s); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - ENDCACHE_Y(); -#if MULTIPLE_STACKS - INC_CLREF_COUNT(ClauseCodeToDynamicClause(PREG)); - TRAIL_CLREF(ClauseCodeToDynamicClause(PREG)); - UNLOCK(DynamicLock(PREG)); -#else - if (FlagOff(InUseMask, DynamicFlags(PREG))) { - - SetFlag(InUseMask, DynamicFlags(PREG)); - TRAIL_CLREF(ClauseCodeToDynamicClause(PREG)); - } -#endif - PREG = NEXTOP(PREG, Otapl); - JMPNext(); - - ENDBOp(); - - /***************************************************************** - * Failure * - *****************************************************************/ - - /* trust_fail */ - BOp(trust_fail, e); - { - while (POP_CHOICE_POINT(B->cp_b)) - { - POP_EXECUTE(); - } - } -#ifdef YAPOR - { - choiceptr cut_pt; - cut_pt = B->cp_b; - CUT_prune_to(cut_pt); - B = cut_pt; - } -#else - B = B->cp_b; -#endif /* YAPOR */ - goto fail; - ENDBOp(); - -#ifdef YAPOR - shared_fail: - B = Get_LOCAL_top_cp(); - SET_BB(PROTECT_FROZEN_B(B)); - goto fail; -#endif /* YAPOR */ - - /* fail */ - PBOp(op_fail, e); - - if (PP) { - UNLOCK(PP->PELock); - PP = NULL; - } -#ifdef COROUTINING - CACHE_Y_AS_ENV(YREG); - check_stack(NoStackFail, HR); - ENDCACHE_Y_AS_ENV(); -#endif - - fail: - { - register tr_fr_ptr pt0 = TR; -#if defined(YAPOR) || defined(THREADS) - if (PP) { - UNLOCK(PP->PELock); - PP = NULL; - } -#endif - PREG = B->cp_ap; - save_pc(); - CACHE_TR(B->cp_tr); - PREFETCH_OP(PREG); - failloop: - if (pt0 == S_TR) { - SP = SP0; -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - int go_on = true; - yamop *ipc = PREG; - - while (go_on) { - op_numbers opnum = Yap_op_from_opcode(ipc->opc); - - go_on = false; - switch (opnum) { -#ifdef TABLING - case _table_load_answer: - low_level_trace(retry_table_loader, LOAD_CP(B)->cp_pred_entry, NULL); - break; - case _table_try_answer: - case _table_retry_me: - case _table_trust_me: - case _table_retry: - case _table_trust: - case _table_completion: -#ifdef THREADS_CONSUMER_SHARING - case _table_answer_resolution_completion: -#endif /* THREADS_CONSUMER_SHARING */ -#ifdef DETERMINISTIC_TABLING - if (IS_DET_GEN_CP(B)) - low_level_trace(retry_table_generator, DET_GEN_CP(B)->cp_pred_entry, NULL); - else -#endif /* DETERMINISTIC_TABLING */ - low_level_trace(retry_table_generator, GEN_CP(B)->cp_pred_entry, (CELL *)(GEN_CP(B) + 1)); - break; - case _table_answer_resolution: - low_level_trace(retry_table_consumer, CONS_CP(B)->cp_pred_entry, NULL); - break; - case _trie_trust_var: - case _trie_retry_var: - case _trie_trust_var_in_pair: - case _trie_retry_var_in_pair: - case _trie_trust_val: - case _trie_retry_val: - case _trie_trust_val_in_pair: - case _trie_retry_val_in_pair: - case _trie_trust_atom: - case _trie_retry_atom: - case _trie_trust_atom_in_pair: - case _trie_retry_atom_in_pair: - case _trie_trust_null: - case _trie_retry_null: - case _trie_trust_null_in_pair: - case _trie_retry_null_in_pair: - case _trie_trust_pair: - case _trie_retry_pair: - case _trie_trust_appl: - case _trie_retry_appl: - case _trie_trust_appl_in_pair: - case _trie_retry_appl_in_pair: - case _trie_trust_extension: - case _trie_retry_extension: - case _trie_trust_double: - case _trie_retry_double: - case _trie_trust_longint: - case _trie_retry_longint: - case _trie_trust_gterm: - case _trie_retry_gterm: - low_level_trace(retry_table_loader, UndefCode, NULL); - break; -#endif /* TABLING */ - case _or_else: - case _or_last: - low_level_trace(retry_or, (PredEntry *)ipc, &(B->cp_a1)); - break; - case _retry2: - case _retry3: - case _retry4: - ipc = NEXTOP(ipc,l); - go_on = true; - break; - case _jump: - ipc = ipc->y_u.l.l; - go_on = true; - break; - case _retry_c: - case _retry_userc: - low_level_trace(retry_pred, ipc->y_u.OtapFs.p, B->cp_args); - break; - case _retry_profiled: - case _count_retry: - ipc = NEXTOP(ipc,p); - go_on = true; - break; - case _retry_me: - case _trust_me: - case _count_retry_me: - case _count_trust_me: - case _profiled_retry_me: - case _profiled_trust_me: - case _retry_and_mark: - case _profiled_retry_and_mark: - case _retry: - case _trust: - low_level_trace(retry_pred, ipc->y_u.Otapl.p, B->cp_args); - break; - case _try_logical: - case _retry_logical: - case _profiled_retry_logical: - case _count_retry_logical: - case _trust_logical: - case _profiled_trust_logical: - case _count_trust_logical: - low_level_trace(retry_pred, ipc->y_u.OtILl.d->ClPred, B->cp_args); - break; - case _Nstop: - case _Ystop: - low_level_trace(retry_pred, NULL, B->cp_args); - break; - default: - break; - } - } - } -#endif /* LOW_LEVEL_TRACER */ -#ifdef FROZEN_STACKS -#ifdef YAPOR_SBA - if (pt0 < TR_FZ || pt0 > (ADDR)CurrentTrailTop+MinTrailGap) -#else - if (pt0 < TR_FZ) -#endif /* YAPOR_SBA */ - { - TR = TR_FZ; - TRAIL_LINK(pt0); - } else -#endif /* FROZEN_STACKS */ - RESTORE_TR(); - GONext(); - } - BEGD(d1); - d1 = TrailTerm(pt0-1); - pt0--; - if (IsVarTerm(d1)) { -#if defined(YAPOR_SBA) && defined(YAPOR) - /* clean up the trail when we backtrack */ - if (Unsigned((Int)(d1)-(Int)(H_FZ)) > - Unsigned((Int)(B_FZ)-(Int)(H_FZ))) { - RESET_VARIABLE(STACK_TO_SBA(d1)); - } else -#endif - /* normal variable */ - RESET_VARIABLE(d1); - goto failloop; - } - /* pointer to code space */ - /* or updatable variable */ -#if defined(TERM_EXTENSIONS) || defined(FROZEN_STACKS) || defined(MULTI_ASSIGNMENT_VARIABLES) - if (IsPairTerm(d1)) -#endif /* TERM_EXTENSIONS || FROZEN_STACKS || MULTI_ASSIGNMENT_VARIABLES */ - { - register CELL flags; - CELL *pt1 = RepPair(d1); -#ifdef LIMIT_TABLING - if ((ADDR) pt1 == LOCAL_TrailBase) { - sg_fr_ptr sg_fr = (sg_fr_ptr) TrailVal(pt0); - TrailTerm(pt0) = AbsPair((CELL *)(pt0 - 1)); - SgFr_state(sg_fr)--; /* complete_in_use --> complete : compiled_in_use --> compiled */ - insert_into_global_sg_fr_list(sg_fr); - goto failloop; - } -#endif /* LIMIT_TABLING */ -#ifdef FROZEN_STACKS /* TRAIL */ - /* avoid frozen segments */ - if ( -#ifdef YAPOR_SBA - (ADDR) pt1 >= HeapTop -#else - IN_BETWEEN(LOCAL_TrailBase, pt1, (ADDR)CurrentTrailTop+MinTrailGap) -#endif /* YAPOR_SBA */ - ) - { - pt0 = (tr_fr_ptr) pt1; - goto failloop; - } else -#endif /* FROZEN_STACKS */ - if (IN_BETWEEN(H0,pt1,HR)) { - if (IsAttVar(pt1)) { - goto failloop; - } else if (*pt1 == (CELL)FunctorBigInt) { - Yap_CleanOpaqueVariable(pt1); - goto failloop; - } - } -#ifdef FROZEN_STACKS /* TRAIL */ - /* don't reset frozen variables */ - if (pt0 < TR_FZ) - goto failloop; -#endif - flags = *pt1; -#if MULTIPLE_STACKS - if (FlagOn(DBClMask, flags)) { - DBRef dbr = DBStructFlagsToDBStruct(pt1); - int erase; - - LOCK(dbr->lock); - DEC_DBREF_COUNT(dbr); - erase = (dbr->Flags & ErasedMask) && (dbr->ref_count == 0); - UNLOCK(dbr->lock); - if (erase) { - saveregs(); - Yap_ErDBE(dbr); - setregs(); - } - } else { - if (flags & LogUpdMask) { - if (flags & IndexMask) { - LogUpdIndex *cl = ClauseFlagsToLogUpdIndex(pt1); - int erase; -#if PARALLEL_YAP - PredEntry *ap = cl->ClPred; -#endif - - PELOCK(8,ap); - DEC_CLREF_COUNT(cl); - erase = (cl->ClFlags & ErasedMask) && !(cl->ClRefCount); - if (erase) { - saveregs(); - /* at this point, - we are the only ones accessing the clause, - hence we don't need to have a lock it */ - Yap_ErLogUpdIndex(cl); - setregs(); - } else if (cl->ClFlags & DirtyMask) { - saveregs(); - /* at this point, - we are the only ones accessing the clause, - hence we don't need to have a lock it */ - Yap_CleanUpIndex(cl); - setregs(); - } - UNLOCK(ap->PELock); - } else { - LogUpdClause *cl = ClauseFlagsToLogUpdClause(pt1); - int erase; -#if PARALLEL_YAP - PredEntry *ap = cl->ClPred; -#endif - /* BB support */ - if (ap) { - - PELOCK(9,ap); - DEC_CLREF_COUNT(cl); - erase = (cl->ClFlags & ErasedMask) && !(cl->ClRefCount); - if (erase) { - saveregs(); - /* at this point, - we are the only ones accessing the clause, - hence we don't need to have a lock it */ - Yap_ErLogUpdCl(cl); - setregs(); - } - UNLOCK(ap->PELock); - } - } - } else { - DynamicClause *cl = ClauseFlagsToDynamicClause(pt1); - int erase; - - LOCK(cl->ClLock); - DEC_CLREF_COUNT(cl); - erase = (cl->ClFlags & ErasedMask) && !(cl->ClRefCount); - UNLOCK(cl->ClLock); - if (erase) { - saveregs(); - /* at this point, - we are the only ones accessing the clause, - hence we don't need to have a lock it */ - Yap_ErCl(cl); - setregs(); - } - } - } -#else - ResetFlag(InUseMask, flags); - *pt1 = flags; - if (FlagOn((ErasedMask|DirtyMask), flags)) { - if (FlagOn(DBClMask, flags)) { - saveregs(); - Yap_ErDBE(DBStructFlagsToDBStruct(pt1)); - setregs(); - } else { - saveregs(); - if (flags & LogUpdMask) { - if (flags & IndexMask) { - if (FlagOn(ErasedMask, flags)) { - Yap_ErLogUpdIndex(ClauseFlagsToLogUpdIndex(pt1)); - } else { - Yap_CleanUpIndex(ClauseFlagsToLogUpdIndex(pt1)); - } - } else { - Yap_ErLogUpdCl(ClauseFlagsToLogUpdClause(pt1)); - } - } else { - Yap_ErCl(ClauseFlagsToDynamicClause(pt1)); - } - setregs(); - } - } -#endif - goto failloop; - } -#ifdef MULTI_ASSIGNMENT_VARIABLES - else /* if (IsApplTerm(d1)) */ { - CELL *pt = RepAppl(d1); - /* AbsAppl means */ - /* multi-assignment variable */ - /* so the next cell is the old value */ -#ifdef FROZEN_STACKS - --pt0; - pt[0] = TrailVal(pt0); -#else - pt[0] = TrailTerm(pt0-1); - pt0 -= 2; -#endif /* FROZEN_STACKS */ - goto failloop; - } -#endif - ENDD(d1); - ENDCACHE_TR(); - } - -#ifdef COROUTINING - NoStackFail: - BEGD(d0); -#ifdef SHADOW_S - Yap_REGS.S_ = SREG; -#endif - saveregs(); - d0 = interrupt_fail( PASS_REGS1 ); - setregs(); -#ifdef SHADOW_S - SREG = Yap_REGS.S_; -#endif - if (!d0) FAIL(); - JMPNext(); - ENDD(d0); - -#endif /* COROUTINING */ - ENDPBOp(); - - - - /************************************************************************\ - * Cut & Commit Instructions * -\************************************************************************/ - - /* cut */ - Op(cut, s); -#ifdef COROUTINING - CACHE_Y_AS_ENV(YREG); - check_stack(NoStackCut, HR); - ENDCACHE_Y_AS_ENV(); - do_cut: -#endif - SET_ASP(YREG, PREG->y_u.s.s); - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, s),Osbpp),l); - /* assume cut is always in stack */ - saveregs(); - prune((choiceptr)YREG[E_CB] PASS_REGS); - setregs(); - GONext(); - -#ifdef COROUTINING - NoStackCut: - PROCESS_INT(interrupt_cut, do_cut); -#endif - - ENDOp(); - - /* cut_t */ - /* cut_t does the same as cut */ - Op(cut_t, s); -#ifdef COROUTINING - CACHE_Y_AS_ENV(YREG); - check_stack(NoStackCutT, HR); - ENDCACHE_Y_AS_ENV(); - do_cut_t: -#endif - SET_ASP(YREG, PREG->y_u.s.s); - /* assume cut is always in stack */ - saveregs(); - prune((choiceptr)YREG[E_CB] PASS_REGS); - setregs(); - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, s),Osbpp),l); - GONext(); - -#ifdef COROUTINING - NoStackCutT: - PROCESS_INT(interrupt_cut_t, do_cut_t); -#endif - - ENDOp(); - - /* cut_e */ - Op(cut_e, s); -#ifdef COROUTINING - CACHE_Y_AS_ENV(YREG); - check_stack(NoStackCutE, HR); - ENDCACHE_Y_AS_ENV(); - do_cut_e: -#endif - SET_ASP(YREG, PREG->y_u.s.s); - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, s),Osbpp),l); - saveregs(); - prune((choiceptr)SREG[E_CB] PASS_REGS); - setregs(); - GONext(); - -#ifdef COROUTINING - NoStackCutE: - PROCESS_INT(interrupt_cut_e, do_cut_e); -#endif - - ENDOp(); - - /* save_b_x Xi */ - Op(save_b_x, x); - BEGD(d0); - d0 = PREG->y_u.x.x; -#if defined(YAPOR_SBA) && defined(FROZEN_STACKS) - XREG(d0) = MkIntegerTerm((Int)B); -#else - XREG(d0) = MkIntegerTerm(LCL0-(CELL *) (B)); -#endif /* YAPOR_SBA && FROZEN_STACKS */ - PREG = NEXTOP(PREG, x); - ENDD(d0); - GONext(); - ENDOp(); - - /* save_b_y Yi */ - Op(save_b_y, y); -#if defined(YAPOR_SBA) - INITIALIZE_PERMVAR(YREG+PREG->y_u.y.y,MkIntegerTerm((Int)B)); -#else - INITIALIZE_PERMVAR(YREG+PREG->y_u.y.y,MkIntegerTerm(LCL0-(CELL *)(B))); -#endif /* YAPOR_SBA*/ - PREG = NEXTOP(PREG, y); - GONext(); - ENDOp(); - - /* commit_b_x Xi */ - Op(commit_b_x, xps); -#ifdef COROUTINING - CACHE_Y_AS_ENV(YREG); - check_stack(NoStackCommitX, HR); - ENDCACHE_Y_AS_ENV(); - do_commit_b_x: -#endif - BEGD(d0); - d0 = XREG(PREG->y_u.xps.x); - deref_head(d0, commit_b_x_unk); - commit_b_x_nvar: - /* skip a void call and a label */ - SET_ASP(YREG, PREG->y_u.xps.s); - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xps),Osbpp),l); - { - choiceptr pt0; -#if defined(YAPOR_SBA) && defined(FROZEN_STACKS) - pt0 = (choiceptr)IntegerOfTerm(d0); -#else - pt0 = (choiceptr)(LCL0-IntegerOfTerm(d0)); -#endif /* YAPOR_SBA && FROZEN_STACKS */ - saveregs(); - prune(pt0 PASS_REGS); - setregs(); - } - GONext(); - - BEGP(pt1); - deref_body(d0, pt1, commit_b_x_unk, commit_b_x_nvar); - ENDP(pt1); - /* never cut to a variable */ - /* Abort */ - FAIL(); - ENDD(d0); - -#ifdef COROUTINING - /* Problem: have I got an environment or not? */ - NoStackCommitX: - PROCESS_INT(interrupt_commit_x, do_commit_b_x); -#endif - ENDOp(); - - /* commit_b_y Yi */ - Op(commit_b_y, yps); -#ifdef COROUTINING - CACHE_Y_AS_ENV(YREG); - check_stack(NoStackCommitY, HR); - ENDCACHE_Y_AS_ENV(); - do_commit_b_y: -#endif - BEGD(d0); - d0 = YREG[PREG->y_u.yps.y]; - deref_head(d0, commit_b_y_unk); - commit_b_y_nvar: - SET_ASP(YREG, PREG->y_u.yps.s); - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yps),Osbpp),l); - { - choiceptr pt0; -#if defined(YAPOR_SBA) && defined(FROZEN_STACKS) - pt0 = (choiceptr)IntegerOfTerm(d0); -#else - pt0 = (choiceptr)(LCL0-IntegerOfTerm(d0)); -#endif - saveregs(); - prune(pt0 PASS_REGS); - setregs(); - } - GONext(); - - BEGP(pt1); - deref_body(d0, pt1, commit_b_y_unk, commit_b_y_nvar); - ENDP(pt1); - /* never cut to a variable */ - /* Abort */ - FAIL(); - ENDD(d0); - -#ifdef COROUTINING - /* This is easier: I know there is an environment so I cannot do allocate */ - NoStackCommitY: - PROCESS_INT(interrupt_commit_y, do_commit_b_y); -#endif - ENDOp(); - - /************************************************************************* - * Call / Proceed instructions * - *************************************************************************/ - - /* Macros for stack trimming */ - - /* execute Label */ - BOp(execute, pp); - { - PredEntry *pt0; - CACHE_Y_AS_ENV(YREG); - pt0 = PREG->y_u.pp.p; -#ifndef NO_CHECKING - check_stack(NoStackExecute, HR); - goto skip_do_execute; -#endif - do_execute: - FETCH_Y_FROM_ENV(YREG); - pt0 = PREG->y_u.pp.p; - skip_do_execute: -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - low_level_trace(enter_pred,pt0,XREGS+1); - } -#endif /* LOW_LEVEL_TRACE */ - CACHE_A1(); - ALWAYS_LOOKAHEAD(pt0->OpcodeOfPred); - BEGD(d0); - d0 = (CELL)B; - PREG = pt0->CodeOfPred; - /* for profiler */ - save_pc(); - ENV_YREG[E_CB] = d0; - ENDD(d0); -#ifdef DEPTH_LIMIT - if (DEPTH <= MkIntTerm(1)) {/* I assume Module==0 is prolog */ - if (pt0->ModuleOfPred) { - if (DEPTH == MkIntTerm(0)) - FAIL(); - else DEPTH = RESET_DEPTH(); - } - } else if (pt0->ModuleOfPred) - DEPTH -= MkIntConstant(2); -#endif /* DEPTH_LIMIT */ - /* this is the equivalent to setting up the stack */ - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - ENDCACHE_Y_AS_ENV(); - } - - NoStackExecute: - PROCESS_INT(interrupt_execute, do_execute); - - ENDBOp(); - - /* dexecute Label */ - /* joint deallocate and execute */ - BOp(dexecute, pp); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) - low_level_trace(enter_pred,PREG->y_u.pp.p,XREGS+1); -#endif /* LOW_LEVEL_TRACER */ - CACHE_Y_AS_ENV(YREG); - { - PredEntry *pt0; - - CACHE_A1(); - pt0 = PREG->y_u.pp.p; -#ifndef NO_CHECKING - /* check stacks */ - check_stack(NoStackDExecute, HR); - goto skip_dexecute; -#endif - continue_dexecute: - FETCH_Y_FROM_ENV(YREG); - pt0 = PREG->y_u.pp.p; - skip_dexecute: -#ifdef DEPTH_LIMIT - if (DEPTH <= MkIntTerm(1)) {/* I assume Module==0 is primitives */ - if (pt0->ModuleOfPred) { - if (DEPTH == MkIntTerm(0)) - FAIL(); - else DEPTH = RESET_DEPTH(); - } - } else if (pt0->ModuleOfPred) - DEPTH -= MkIntConstant(2); -#endif /* DEPTH_LIMIT */ - PREG = pt0->CodeOfPred; - /* for profiler */ - save_pc(); - ALWAYS_LOOKAHEAD(pt0->OpcodeOfPred); - /* do deallocate */ - CPREG = (yamop *) ENV_YREG[E_CP]; - ENV_YREG = ENV = (CELL *) ENV_YREG[E_E]; -#ifdef FROZEN_STACKS - { - choiceptr top_b = PROTECT_FROZEN_B(B); -#ifdef YAPOR_SBA - if (ENV_YREG > (CELL *) top_b || ENV_YREG < HR) ENV_YREG = (CELL *) top_b; -#else - if (ENV_YREG > (CELL *) top_b) ENV_YREG = (CELL *) top_b; -#endif /* YAPOR_SBA */ - else ENV_YREG = (CELL *)((CELL)ENV_YREG + ENV_Size(CPREG)); - } -#else - if (ENV_YREG > (CELL *)B) { - ENV_YREG = (CELL *)B; - } - else { - ENV_YREG = (CELL *) ((CELL) ENV_YREG + ENV_Size(CPREG)); - } -#endif /* FROZEN_STACKS */ - WRITEBACK_Y_AS_ENV(); - /* setup GB */ - ENV_YREG[E_CB] = (CELL) B; - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - } - ENDCACHE_Y_AS_ENV(); - - NoStackDExecute: - PROCESS_INT(interrupt_dexecute, continue_dexecute); - - ENDBOp(); - - BOp(fcall, Osbpp); - CACHE_Y_AS_ENV(YREG); - ENV_YREG[E_CP] = (CELL) CPREG; - ENV_YREG[E_E] = (CELL) ENV; -#ifdef DEPTH_LIMIT - ENV_YREG[E_DEPTH] = DEPTH; -#endif /* DEPTH_LIMIT */ - ENDCACHE_Y_AS_ENV(); - ENDBOp(); - - BOp(call, Osbpp); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - low_level_trace(enter_pred,PREG->y_u.Osbpp.p,XREGS+1); - } -#endif /* LOW_LEVEL_TRACER */ - CACHE_Y_AS_ENV(YREG); - { - PredEntry *pt; - CACHE_A1(); - pt = PREG->y_u.Osbpp.p; -#ifndef NO_CHECKING - check_stack(NoStackCall, HR); - goto skip_call; -#endif - call_body: - /* external jump if we don;t want to creep */ - FETCH_Y_FROM_ENV(YREG); - pt = PREG->y_u.Osbpp.p; - skip_call: - ENV = ENV_YREG; - /* Try to preserve the environment */ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + PREG->y_u.Osbpp.s); - CPREG = NEXTOP(PREG, Osbpp); - ALWAYS_LOOKAHEAD(pt->OpcodeOfPred); - PREG = pt->CodeOfPred; - /* for profiler */ - save_pc(); -#ifdef DEPTH_LIMIT - if (DEPTH <= MkIntTerm(1)) {/* I assume Module==0 is primitives */ - if (pt->ModuleOfPred) { - if (DEPTH == MkIntTerm(0)) - FAIL(); - else DEPTH = RESET_DEPTH(); - } - } else if (pt->ModuleOfPred) - DEPTH -= MkIntConstant(2); -#endif /* DEPTH_LIMIT */ -#ifdef FROZEN_STACKS - { - choiceptr top_b = PROTECT_FROZEN_B(B); -#ifdef YAPOR_SBA - if (ENV_YREG > (CELL *) top_b || ENV_YREG < HR) ENV_YREG = (CELL *) top_b; -#else - if (ENV_YREG > (CELL *) top_b) ENV_YREG = (CELL *) top_b; -#endif /* YAPOR_SBA */ - } -#else - if (ENV_YREG > (CELL *) B) { - ENV_YREG = (CELL *) B; - } -#endif /* FROZEN_STACKS */ - WRITEBACK_Y_AS_ENV(); - /* setup GB */ - ENV_YREG[E_CB] = (CELL) B; -#ifdef YAPOR - SCH_check_requests(); -#endif /* YAPOR */ - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - } - ENDCACHE_Y_AS_ENV(); - ENDBOp(); - - BOp(procceed, p); - CACHE_Y_AS_ENV(YREG); - ALWAYS_LOOKAHEAD(CPREG->opc); - PREG = CPREG; - /* for profiler */ - save_pc(); - ENV_YREG = ENV; -#ifdef DEPTH_LIMIT - DEPTH = ENV_YREG[E_DEPTH]; -#endif - WRITEBACK_Y_AS_ENV(); - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - ENDCACHE_Y_AS_ENV(); - - NoStackCall: - PROCESS_INT(interrupt_call, call_body); - - ENDBOp(); - - Op(allocate, e); - CACHE_Y_AS_ENV(YREG); - PREG = NEXTOP(PREG, e); - ENV_YREG[E_CP] = (CELL) CPREG; - ENV_YREG[E_E] = (CELL) ENV; -#ifdef DEPTH_LIMIT - ENV_YREG[E_DEPTH] = DEPTH; -#endif /* DEPTH_LIMIT */ - ENV = ENV_YREG; - ENDCACHE_Y_AS_ENV(); - GONext(); - ENDOp(); - - Op(deallocate, p); - CACHE_Y_AS_ENV(YREG); - check_trail(TR); - PREG = NEXTOP(PREG, p); - /* other instructions do depend on S being set by deallocate - :-( */ - SREG = YREG; - CPREG = (yamop *) ENV_YREG[E_CP]; - ENV = ENV_YREG = (CELL *) ENV_YREG[E_E]; -#ifdef DEPTH_LIMIT - DEPTH = ENV_YREG[E_DEPTH]; -#endif /* DEPTH_LIMIT */ -#ifdef FROZEN_STACKS - { - choiceptr top_b = PROTECT_FROZEN_B(B); -#ifdef YAPOR_SBA - if (ENV_YREG > (CELL *) top_b || ENV_YREG < HR) ENV_YREG = (CELL *) top_b; -#else - if (ENV_YREG > (CELL *) top_b) ENV_YREG = (CELL *) top_b; -#endif /* YAPOR_SBA */ - else ENV_YREG = (CELL *)((CELL) ENV_YREG + ENV_Size(CPREG)); - } -#else - if (ENV_YREG > (CELL *) B) - ENV_YREG = (CELL *) B; - else - ENV_YREG = (CELL *) ((CELL) ENV_YREG + ENV_Size(CPREG)); -#endif /* FROZEN_STACKS */ - WRITEBACK_Y_AS_ENV(); -#ifndef NO_CHECKING - /* check stacks */ - check_stack(NoStackDeallocate, HR); -#endif - ENDCACHE_Y_AS_ENV(); - GONext(); - - NoStackDeallocate: - BEGD(d0); -#ifdef SHADOW_S - Yap_REGS.S_ = SREG; -#endif - saveregs(); - d0 = interrupt_deallocate( PASS_REGS1 ); - setregs(); -#ifdef SHADOW_S - SREG = Yap_REGS.S_; -#endif - if (!d0) FAIL(); - JMPNext(); - ENDD(d0); - ENDOp(); - - /********************************************** - * OPTYap instructions * - **********************************************/ - -#ifdef YAPOR -#include "or.insts.i" -#endif /* YAPOR */ -#ifdef TABLING -#include "tab.insts.i" -#include "tab.tries.insts.i" -#endif /* TABLING */ - - - -#ifdef BEAM - extern int eam_am(PredEntry *); - - Op(retry_eam, e); - printf("Aqui estou eu..................\n"); - if (!eam_am(2)) { - abort_eam("Falhei\n"); - FAIL(); - } - - goto procceed; - PREG = NEXTOP(PREG, e); - GONext(); - ENDOp(); - - Op(run_eam, os); - if (inp==-9000) { /* use indexing to find out valid alternatives */ - extern CELL *beam_ALTERNATIVES; - *beam_ALTERNATIVES= (CELL *) PREG->y_u.os.opcw; - beam_ALTERNATIVES++; - if (OLD_B!=B) goto fail; -#if PUSH_REGS - Yap_regp=old_regs; -#endif - return(0); - } - - saveregs(); - if (!eam_am((PredEntry *) PREG->y_u.os.s)) FAIL(); - setregs(); - - /* cut */ - BACKUP_B(); - while (POP_CHOICE_POINT(B->cp_b)) { - POP_EXECUTE(); - } - B = B->cp_b; /* cut_fail */ - HB = B->cp_h; /* cut_fail */ - RECOVER_B(); - - if (0) { register choiceptr ccp; - /* initialize ccp */ -#define NORM_CP(CP) ((choiceptr)(CP)) - - YREG = (CELL *) (NORM_CP(YREG) - 1); - ccp = NORM_CP(YREG); - store_yaam_reg_cpdepth(ccp); - ccp->cp_tr = TR; - ccp->cp_ap = BEAM_RETRY_CODE; - ccp->cp_h = HR; - ccp->cp_b = B; - ccp->cp_env= ENV; - ccp->cp_cp = CPREG; - B = ccp; - SET_BB(B); - } - goto procceed; - PREG = NEXTOP(PREG, os); - GONext(); - ENDOp(); -#endif - - - - - /************************************************************************\ - * Get Instructions * -\************************************************************************/ - - Op(get_x_var, xx); - BEGD(d0); - d0 = XREG(PREG->y_u.xx.xr); - XREG(PREG->y_u.xx.xl) = d0; - PREG = NEXTOP(PREG, xx); - ENDD(d0); - GONext(); - ENDOp(); - - Op(get_y_var, yx); - BEGD(d0); - BEGP(pt0); - pt0 = YREG + PREG->y_u.yx.y; - d0 = XREG(PREG->y_u.yx.x); - PREG = NEXTOP(PREG, yx); - INITIALIZE_PERMVAR(pt0,d0); - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(get_yy_var, yyxx); - CACHE_Y(YREG); - BEGD(d0); - BEGP(pt0); - pt0 = S_YREG + PREG->y_u.yyxx.y1; - d0 = XREG(PREG->y_u.yyxx.x1); - BEGD(d1); - BEGP(pt1); - pt1 = S_YREG + PREG->y_u.yyx.y2; - d1 = XREG(PREG->y_u.yyxx.x2); - PREG = NEXTOP(PREG, yyxx); - INITIALIZE_PERMVAR(pt0,d0); - INITIALIZE_PERMVAR(pt1,d1); - ENDP(pt1); - ENDD(d1); - GONext(); - ENDP(pt0); - ENDD(d0); - ENDCACHE_Y(); - ENDOp(); - - /* The code for get_x_val is hard to follow because I use a - * lot of jumps. The convention is that in the label - * gval_X_YREG X refers to the state of the first argument, and - * YREG to the state of the second argument */ - Op(get_x_val, xx); - BEGD(d0); - d0 = XREG(PREG->y_u.xx.xl); - deref_head(d0, gvalx_unk); - - /* d0 will keep the first argument */ - gvalx_nonvar: - /* first argument is bound */ - BEGD(d1); - d1 = XREG(PREG->y_u.xx.xr); - deref_head(d1, gvalx_nonvar_unk); - - gvalx_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, xx); - UnifyBound(d0, d1); - - BEGP(pt0); - /* deref second argument */ - deref_body(d1, pt0, gvalx_nonvar_unk, gvalx_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, xx); - YapBind(pt0, d0); - GONext(); - - ENDP(pt0); - ENDD(d1); - - BEGP(pt0); - /* first argument may be unbound */ - deref_body(d0, pt0, gvalx_unk, gvalx_nonvar); - /* first argument is unbound and in pt0 and in d0 */ - BEGD(d1); - d1 = XREG(PREG->y_u.xx.xr); - deref_head(d1, gvalx_var_unk); - - gvalx_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, xx); - YapBind(pt0, d1); - GONext(); - - BEGP(pt1); - deref_body(d1, pt1, gvalx_var_unk, gvalx_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, xx); - UnifyCells(pt0, pt1); - GONext(); - ENDP(pt1); - ENDD(d1); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - /* The code for get_y_val mostly uses the code for get_x_val - */ - - Op(get_y_val, yx); - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = YREG + PREG->y_u.yx.y; - d0 = *pt0; - - /* From now on, it's just a copy of the code for get_x_val */ - - deref_head(d0, gvaly_unk); - gvaly_nonvar: - - /* first argument is bound */ - d1 = XREG(PREG->y_u.yx.x); - deref_head(d1, gvaly_nonvar_unk); - gvaly_nonvar_nonvar: - - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, yx); - UnifyBound(d0, d1); - - BEGP(pt1); - /* deref second argument */ - deref_body(d1, pt1, gvaly_nonvar_unk, gvaly_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, yx); - YapBind(pt1, d0); - GONext(); - ENDP(pt1); - - - /* first argument may be unbound */ - derefa_body(d0, pt0, gvaly_unk, gvaly_nonvar); - /* first argument is unbound */ - d1 = XREG(PREG->y_u.yx.x); - deref_head(d1, gvaly_var_unk); - - gvaly_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, yx); - YapBind(pt0, d1); - GONext(); - - BEGP(pt1); - deref_body(d1, pt1, gvaly_var_unk, gvaly_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, yx); - UnifyCells(pt0, pt1); - GONext(); - ENDP(pt1); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(get_atom, xc); - BEGD(d0); - BEGD(d1); - /* fetch arguments */ - d0 = XREG(PREG->y_u.xc.x); - d1 = PREG->y_u.xc.c; - - BEGP(pt0); - deref_head(d0, gatom_unk); - /* argument is nonvar */ - gatom_nonvar: - if (d0 == d1) { - PREG = NEXTOP(PREG, xc); - GONext(); - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_unk, gatom_nonvar); - /* argument is a variable */ - PREG = NEXTOP(PREG, xc); - YapBind(pt0, d1); - GONext(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(get_atom_exo, x); - BEGD(d0); - BEGD(d1); - /* fetch arguments */ - d0 = XREG(PREG->y_u.x.x); - d1 = *SREG; - SREG++; - - BEGP(pt0); - deref_head(d0, gatom_exo_unk); - /* argument is nonvar */ - gatom_exo_nonvar: - if (d0 == d1) { - PREG = NEXTOP(PREG, x); - GONext(); - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_exo_unk, gatom_exo_nonvar); - /* argument is a variable */ - pt0 = (CELL *)d0; - PREG = NEXTOP(PREG, x); - YapBind(pt0, d1); - GONext(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(get_2atoms, cc); - BEGD(d0); - BEGD(d1); - /* fetch arguments */ - d0 = ARG1; - - BEGP(pt0); - deref_head(d0, gatom_2unk); - /* argument is nonvar */ - gatom_2nonvar: - if (d0 == PREG->y_u.cc.c1) { - goto gatom_2b; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_2unk, gatom_2nonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.cc.c1); - ENDP(pt0); - gatom_2b: - /* fetch arguments */ - d0 = ARG2; - d1 = PREG->y_u.cc.c2; - - BEGP(pt0); - deref_head(d0, gatom_2bunk); - /* argument is nonvar */ - gatom_2bnonvar: - if (d0 == d1) { - PREG = NEXTOP(PREG, cc); - GONext(); - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_2bunk, gatom_2bnonvar); - /* argument is a variable */ - PREG = NEXTOP(PREG, cc); - YapBind(pt0, d1); - GONext(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(get_3atoms, ccc); - BEGD(d0); - BEGD(d1); - /* fetch arguments */ - d0 = ARG1; - - BEGP(pt0); - deref_head(d0, gatom_3unk); - /* argument is nonvar */ - gatom_3nonvar: - if (d0 == PREG->y_u.ccc.c1) { - goto gatom_3b; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_3unk, gatom_3nonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.ccc.c1); - ENDP(pt0); - gatom_3b: - /* fetch arguments */ - d0 = ARG2; - - BEGP(pt0); - deref_head(d0, gatom_3bunk); - /* argument is nonvar */ - gatom_3bnonvar: - if (d0 == PREG->y_u.ccc.c2) { - goto gatom_3c; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_3bunk, gatom_3bnonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.ccc.c2); - ENDP(pt0); - gatom_3c: - /* fetch arguments */ - d0 = ARG3; - d1 = PREG->y_u.ccc.c3; - - BEGP(pt0); - deref_head(d0, gatom_3cunk); - /* argument is nonvar */ - gatom_3cnonvar: - if (d0 == d1) { - PREG = NEXTOP(PREG, ccc); - GONext(); - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_3cunk, gatom_3cnonvar); - /* argument is a variable */ - PREG = NEXTOP(PREG, ccc); - YapBind(pt0, d1); - GONext(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(get_4atoms, cccc); - BEGD(d0); - BEGD(d1); - /* fetch arguments */ - d0 = ARG1; - - BEGP(pt0); - deref_head(d0, gatom_4unk); - /* argument is nonvar */ - gatom_4nonvar: - if (d0 == PREG->y_u.cccc.c1) { - goto gatom_4b; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_4unk, gatom_4nonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.cccc.c1); - ENDP(pt0); - gatom_4b: - /* fetch arguments */ - d0 = ARG2; - - BEGP(pt0); - deref_head(d0, gatom_4bunk); - /* argument is nonvar */ - gatom_4bnonvar: - if (d0 == PREG->y_u.cccc.c2) { - goto gatom_4c; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_4bunk, gatom_4bnonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.cccc.c2); - ENDP(pt0); - gatom_4c: - /* fetch arguments */ - d0 = ARG3; - - BEGP(pt0); - deref_head(d0, gatom_4cunk); - /* argument is nonvar */ - gatom_4cnonvar: - if (d0 == PREG->y_u.cccc.c3) { - goto gatom_4d; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_4cunk, gatom_4cnonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.cccc.c3); - ENDP(pt0); - gatom_4d: - /* fetch arguments */ - d0 = ARG4; - d1 = PREG->y_u.cccc.c4; - - BEGP(pt0); - deref_head(d0, gatom_4dunk); - /* argument is nonvar */ - gatom_4dnonvar: - if (d0 == d1) { - PREG = NEXTOP(PREG, cccc); - GONext(); - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_4dunk, gatom_4dnonvar); - /* argument is a variable */ - PREG = NEXTOP(PREG, cccc); - YapBind(pt0, d1); - GONext(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(get_5atoms, ccccc); - BEGD(d0); - BEGD(d1); - /* fetch arguments */ - d0 = ARG1; - - BEGP(pt0); - deref_head(d0, gatom_5unk); - /* argument is nonvar */ - gatom_5nonvar: - if (d0 == PREG->y_u.ccccc.c1) { - goto gatom_5b; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_5unk, gatom_5nonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.ccccc.c1); - ENDP(pt0); - gatom_5b: - /* fetch arguments */ - d0 = ARG2; - - BEGP(pt0); - deref_head(d0, gatom_5bunk); - /* argument is nonvar */ - gatom_5bnonvar: - if (d0 == PREG->y_u.ccccc.c2) { - goto gatom_5c; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_5bunk, gatom_5bnonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.ccccc.c2); - ENDP(pt0); - gatom_5c: - /* fetch arguments */ - d0 = ARG3; - - BEGP(pt0); - deref_head(d0, gatom_5cunk); - /* argument is nonvar */ - gatom_5cnonvar: - if (d0 == PREG->y_u.ccccc.c3) { - goto gatom_5d; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_5cunk, gatom_5cnonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.ccccc.c3); - ENDP(pt0); - gatom_5d: - /* fetch arguments */ - d0 = ARG4; - - BEGP(pt0); - deref_head(d0, gatom_5dunk); - /* argument is nonvar */ - gatom_5dnonvar: - if (d0 == PREG->y_u.ccccc.c4) { - goto gatom_5e; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_5dunk, gatom_5dnonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.ccccc.c4); - ENDP(pt0); - gatom_5e: - /* fetch arguments */ - d0 = ARG5; - d1 = PREG->y_u.ccccc.c5; - - BEGP(pt0); - deref_head(d0, gatom_5eunk); - /* argument is nonvar */ - gatom_5enonvar: - if (d0 == d1) { - PREG = NEXTOP(PREG, ccccc); - GONext(); - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_5eunk, gatom_5enonvar); - /* argument is a variable */ - PREG = NEXTOP(PREG, ccccc); - YapBind(pt0, d1); - GONext(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(get_6atoms, cccccc); - BEGD(d0); - BEGD(d1); - /* fetch arguments */ - d0 = ARG1; - - BEGP(pt0); - deref_head(d0, gatom_6unk); - /* argument is nonvar */ - gatom_6nonvar: - if (d0 == PREG->y_u.cccccc.c1) { - goto gatom_6b; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_6unk, gatom_6nonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.cccccc.c1); - ENDP(pt0); - gatom_6b: - /* fetch arguments */ - d0 = ARG2; - - BEGP(pt0); - deref_head(d0, gatom_6bunk); - /* argument is nonvar */ - gatom_6bnonvar: - if (d0 == PREG->y_u.cccccc.c2) { - goto gatom_6c; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_6bunk, gatom_6bnonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.cccccc.c2); - ENDP(pt0); - gatom_6c: - /* fetch arguments */ - d0 = ARG3; - - BEGP(pt0); - deref_head(d0, gatom_6cunk); - /* argument is nonvar */ - gatom_6cnonvar: - if (d0 == PREG->y_u.cccccc.c3) { - goto gatom_6d; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_6cunk, gatom_6cnonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.cccccc.c3); - ENDP(pt0); - gatom_6d: - /* fetch arguments */ - d0 = ARG4; - - BEGP(pt0); - deref_head(d0, gatom_6dunk); - /* argument is nonvar */ - gatom_6dnonvar: - if (d0 == PREG->y_u.cccccc.c4) { - goto gatom_6e; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_6dunk, gatom_6dnonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.cccccc.c4); - ENDP(pt0); - gatom_6e: - /* fetch arguments */ - d0 = ARG5; - - BEGP(pt0); - deref_head(d0, gatom_6eunk); - /* argument is nonvar */ - gatom_6enonvar: - if (d0 == PREG->y_u.cccccc.c5) { - goto gatom_6f; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_6eunk, gatom_6enonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.cccccc.c5); - ENDP(pt0); - gatom_6f: - /* fetch arguments */ - d0 = ARG6; - d1 = PREG->y_u.cccccc.c6; - - BEGP(pt0); - deref_head(d0, gatom_6funk); - /* argument is nonvar */ - gatom_6fnonvar: - if (d0 == d1) { - PREG = NEXTOP(PREG, cccccc); - GONext(); - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_6funk, gatom_6fnonvar); - /* argument is a variable */ - PREG = NEXTOP(PREG, cccccc); - YapBind(pt0, d1); - GONext(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - /* The next instructions can lead to either the READ stream - * or the write stream */ - - OpRW(get_list, x); - BEGD(d0); - d0 = XREG(PREG->y_u.x.x); - deref_head(d0, glist_unk); - - glist_nonvar: - /* did we find a list? */ - if (!IsPairTerm(d0)) { - FAIL(); - } - START_PREFETCH(x); - PREG = NEXTOP(PREG, x); - /* enter read mode */ - SREG = RepPair(d0); - GONext(); - END_PREFETCH(); - - BEGP(pt0); - deref_body(d0, pt0, glist_unk, glist_nonvar); - /* glist var */ - /* enter write mode */ - CACHE_S(); - S_SREG = HR; - START_PREFETCH_W(x); - PREG = NEXTOP(PREG, x); - BEGD(d0); - d0 = AbsPair(S_SREG); - YapBind(pt0, d0); - S_SREG = HR; - /* don't put an ENDD just after a label */ - HR = S_SREG + 2; - ENDD(d0); - WRITEBACK_S(S_SREG); - GONextW(); - - - END_PREFETCH_W(); - ENDCACHE_S(); - ENDP(pt0); - - ENDD(d0); - ENDOpRW(); - - OpRW(get_struct, xfa); - BEGD(d0); - d0 = XREG(PREG->y_u.xfa.x); - deref_head(d0, gstruct_unk); - - gstruct_nonvar: - if (!IsApplTerm(d0)) - FAIL(); - /* we have met a compound term */ - START_PREFETCH(xfa); - CACHE_S(); - S_SREG = RepAppl(d0); - /* check functor */ - d0 = (CELL) (PREG->y_u.xfa.f); - if (*S_SREG != d0) { - FAIL(); - } - WRITEBACK_S(S_SREG+1); - ENDCACHE_S(); - PREG = NEXTOP(PREG, xfa); - /* enter read mode */ - GONext(); - END_PREFETCH(); - - BEGP(pt0); - deref_body(d0, pt0, gstruct_unk, gstruct_nonvar); - /* Enter Write mode */ - /* set d1 to be the new structure we are going to create */ - START_PREFETCH_W(xfa); - BEGD(d1); - d1 = AbsAppl(HR); - YapBind(pt0, d1); - /* now, set pt0 to point to the heap where we are going to - * build our term */ - pt0 = HR; - ENDD(d1); - /* first, put the functor */ - d0 = (CELL) (PREG->y_u.xfa.f); - *pt0++ = d0; - HR = pt0 + PREG->y_u.xfa.a; - PREG = NEXTOP(PREG, xfa); - /* set SREG */ - SREG = pt0; - /* update HR */ - GONextW(); - END_PREFETCH_W(); - ENDP(pt0); - - ENDD(d0); - ENDOpRW(); - - Op(get_float, xd); - BEGD(d0); - d0 = XREG(PREG->y_u.xd.x); - deref_head(d0, gfloat_unk); - - gfloat_nonvar: - if (!IsApplTerm(d0)) - FAIL(); - /* we have met a preexisting float */ - START_PREFETCH(xd); - BEGP(pt0); - pt0 = RepAppl(d0); - /* check functor */ - if (*pt0 != (CELL)FunctorDouble) { - FAIL(); - } - BEGP(pt1); - pt1 = PREG->y_u.xd.d; - PREG = NEXTOP(PREG, xd); - if ( - pt1[1] != pt0[1] -#if SIZEOF_DOUBLE == 2*SIZEOF_INT_P - || pt1[2] != pt0[2] -#endif - ) FAIL(); - ENDP(pt1); - ENDP(pt0); - /* enter read mode */ - GONext(); - END_PREFETCH(); - - BEGP(pt0); - deref_body(d0, pt0, gfloat_unk, gfloat_nonvar); - /* Enter Write mode */ - /* set d1 to be the new structure we are going to create */ - START_PREFETCH(xc); - BEGD(d1); - d1 = AbsAppl(PREG->y_u.xd.d); - PREG = NEXTOP(PREG, xd); - YapBind(pt0, d1); - GONext(); - ENDD(d1); - END_PREFETCH(); - ENDP(pt0); - - ENDD(d0); - ENDOp(); - - Op(get_string, xu); - BEGD(d0); - d0 = XREG(PREG->y_u.xu.x); - deref_head(d0, gstring_unk); - - gstring_nonvar: - if (!IsApplTerm(d0)) - FAIL(); - /* we have met a preexisting string */ - START_PREFETCH(xu); - BEGP(pt0); - pt0 = RepAppl(d0); - /* check functor */ - if (*pt0 != (CELL)FunctorString) { - FAIL(); - } - BEGP(pt1); - pt1 = RepAppl(PREG->y_u.xu.ut); - PREG = NEXTOP(PREG, xu); - if ( - pt1[1] != pt0[1] || - strcmp((const char *)(pt1+2), (const char *)(pt0+2)) - ) FAIL(); - ENDP(pt1); - ENDP(pt0); - /* enter read mode */ - GONext(); - END_PREFETCH(); - - BEGP(pt0); - deref_body(d0, pt0, gstring_unk, gstring_nonvar); - /* Enter Write mode */ - /* set d1 to be the new structure we are going to create */ - START_PREFETCH(xc); - BEGD(d1); - d1 = PREG->y_u.xu.ut; - PREG = NEXTOP(PREG, xu); - YapBind(pt0, d1); - GONext(); - ENDD(d1); - END_PREFETCH(); - ENDP(pt0); - - ENDD(d0); - ENDOp(); - - Op(get_longint, xi); - BEGD(d0); - d0 = XREG(PREG->y_u.xi.x); - deref_head(d0, glongint_unk); - - glongint_nonvar: - if (!IsApplTerm(d0)) - FAIL(); - /* we have met a preexisting longint */ - START_PREFETCH(xi); - BEGP(pt0); - pt0 = RepAppl(d0); - /* check functor */ - if (*pt0 != (CELL)FunctorLongInt) { - FAIL(); - } - if (PREG->y_u.xi.i[1] != (CELL)pt0[1]) FAIL(); - ENDP(pt0); - PREG = NEXTOP(PREG, xi); - /* enter read mode */ - GONext(); - END_PREFETCH(); - - BEGP(pt0); - deref_body(d0, pt0, glongint_unk, glongint_nonvar); - /* Enter Write mode */ - /* set d1 to be the new structure we are going to create */ - START_PREFETCH(xi); - BEGD(d1); - d1 = AbsAppl(PREG->y_u.xi.i); - PREG = NEXTOP(PREG, xi); - YapBind(pt0, d1); - GONext(); - ENDD(d1); - END_PREFETCH(); - ENDP(pt0); - - ENDD(d0); - ENDOp(); - - Op(get_bigint, xN); -#ifdef USE_GMP - BEGD(d0); - d0 = XREG(PREG->y_u.xN.x); - deref_head(d0, gbigint_unk); - - gbigint_nonvar: - if (!IsApplTerm(d0)) - FAIL(); - /* we have met a preexisting bigint */ - START_PREFETCH(xN); - BEGP(pt0); - pt0 = RepAppl(d0); - /* check functor */ - if (*pt0 != (CELL)FunctorBigInt) - { - FAIL(); - } - if (Yap_gmp_tcmp_big_big(d0,PREG->y_u.xN.b)) - FAIL(); - PREG = NEXTOP(PREG, xN); - ENDP(pt0); - /* enter read mode */ - GONext(); - END_PREFETCH(); - - BEGP(pt0); - deref_body(d0, pt0, gbigint_unk, gbigint_nonvar); - /* Enter Write mode */ - /* set d1 to be the new structure we are going to create */ - START_PREFETCH(xN); - BEGD(d1); - d1 = PREG->y_u.xN.b; - PREG = NEXTOP(PREG, xN); - YapBind(pt0, d1); - GONext(); - ENDD(d1); - END_PREFETCH(); - ENDP(pt0); - - ENDD(d0); -#else - FAIL(); -#endif - ENDOp(); - - - Op(get_dbterm, xD); - BEGD(d0); - d0 = XREG(PREG->y_u.xD.x); - deref_head(d0, gdbterm_unk); - - gdbterm_nonvar: - BEGD(d1); - /* we have met a preexisting dbterm */ - d1 = PREG->y_u.xD.D; - PREG = NEXTOP(PREG, xD); - UnifyBound(d0,d1); - ENDD(d1); - - BEGP(pt0); - deref_body(d0, pt0, gdbterm_unk, gdbterm_nonvar); - /* Enter Write mode */ - /* set d1 to be the new structure we are going to create */ - START_PREFETCH(xD); - BEGD(d1); - d1 = PREG->y_u.xD.D; - PREG = NEXTOP(PREG, xD); - YapBind(pt0, d1); - GONext(); - ENDD(d1); - END_PREFETCH(); - ENDP(pt0); - - ENDD(d0); - ENDOp(); - - /************************************************************************\ - * Optimised Get List Instructions * -\************************************************************************/ - OpRW(glist_valx, xx); - BEGD(d0); - d0 = XREG(PREG->y_u.xx.xl); - deref_head(d0, glist_valx_write); - glist_valx_read: - BEGP(pt0); - /* did we find a list? */ - if (!IsPairTerm(d0)) - FAIL(); - /* enter read mode */ - START_PREFETCH(xx); - pt0 = RepPair(d0); - SREG = pt0 + 1; - /* start unification with first argument */ - d0 = *pt0; - deref_head(d0, glist_valx_unk); - - /* first argument is in d0 */ - glist_valx_nonvar: - /* first argument is bound */ - BEGD(d1); - d1 = XREG(PREG->y_u.xx.xr); - deref_head(d1, glist_valx_nonvar_unk); - - glist_valx_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, xx); - UnifyBound(d0, d1); - - BEGP(pt1); - /* deref second argument */ - deref_body(d1, pt1, glist_valx_nonvar_unk, glist_valx_nonvar_nonvar); - /* head bound, argument unbound */ - PREG = NEXTOP(PREG, xx); - YapBind(pt1, d0); - GONext(); - ENDP(pt1); - - - ENDD(d1); - - /* head may be unbound */ - derefa_body(d0, pt0, glist_valx_unk, glist_valx_nonvar); - /* head is unbound, pt0 has the value */ - d0 = XREG(PREG->y_u.xx.xr); - deref_head(d0, glist_valx_var_unk); - - glist_valx_var_nonvar: - /* head is unbound, second arg bound */ - PREG = NEXTOP(PREG, xx); - Bind_Global(pt0, d0); - GONext(); - - BEGP(pt1); - deref_body(d0, pt1, glist_valx_var_unk, glist_valx_var_nonvar); - /* head and second argument are unbound */ - PREG = NEXTOP(PREG, xx); - UnifyGlobalCellToCell(pt0, pt1); - GONext(); - ENDP(pt1); - ENDP(pt0); - END_PREFETCH(); - - BEGP(pt0); - deref_body(d0, pt0, glist_valx_write, glist_valx_read); - CACHE_S(); - /* enter write mode */ - S_SREG = HR; - BEGD(d1); - d1 = XREG(PREG->y_u.xx.xr); - d0 = AbsPair(S_SREG); - S_SREG[0] = d1; - ENDD(d1); - ALWAYS_START_PREFETCH_W(xx); - PREG = NEXTOP(PREG, xx); - HR = S_SREG + 2; - WRITEBACK_S(S_SREG+1); - YapBind(pt0, d0); - ALWAYS_GONextW(); - ALWAYS_END_PREFETCH_W(); - ENDCACHE_S(); - ENDP(pt0); - - ENDD(d0); - ENDOpRW(); - - OpRW(glist_valy, yx); - BEGD(d0); - d0 = XREG(PREG->y_u.yx.x); - deref_head(d0, glist_valy_write); - glist_valy_read: - BEGP(pt0); - /* did we find a list? */ - if (!IsPairTerm(d0)) - FAIL(); - START_PREFETCH(yx); - /* enter read mode */ - pt0 = RepPair(d0); - SREG = pt0 + 1; - /* start unification with first argument */ - d0 = *pt0; - deref_head(d0, glist_valy_unk); - - glist_valy_nonvar: - /* first argument is bound */ - BEGD(d1); - BEGP(pt1); - pt1 = YREG + PREG->y_u.yx.y; - d1 = *pt1; - PREG = NEXTOP(PREG, yx); - deref_head(d1, glist_valy_nonvar_unk); - - glist_valy_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - SREG = pt0 + 1; - UnifyBound(d0, d1); - - /* deref second argument */ - derefa_body(d1, pt1, glist_valy_nonvar_unk, glist_valy_nonvar_nonvar); - /* first argument bound, second unbound */ - YapBind(pt1, d0); - GONext(); - - - ENDP(pt1); - - /* first argument may be unbound */ - derefa_body(d0, pt0, glist_valy_unk, glist_valy_nonvar); - /* first argument is unbound */ - BEGP(pt1); - pt1 = YREG+PREG->y_u.yx.y; - d1 = *pt1; - deref_head(d1, glist_valy_var_unk); - glist_valy_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, yx); - Bind_Global(pt0, d1); - GONext(); - - derefa_body(d1, pt1, glist_valy_var_unk, glist_valy_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, yx); - UnifyGlobalCellToCell(pt0, pt1); - GONext(); - ENDP(pt1); - ENDD(d1); - - END_PREFETCH(); - ENDP(pt0); - - BEGP(pt0); - deref_body(d0, pt0, glist_valy_write, glist_valy_read); - /* enter write mode */ - START_PREFETCH_W(yx); - BEGP(pt1); - pt1 = HR; - d0 = AbsPair(pt1); - YapBind(pt0, d0); - BEGD(d0); - /* include XREG on it */ - d0 = YREG[PREG->y_u.yx.y]; - pt1[0] = d0; - ENDD(d0); - HR = pt1 + 2; - SREG = pt1 + 1; - ENDP(pt1); - PREG = NEXTOP(PREG, yx); - GONextW(); - END_PREFETCH_W(); - ENDP(pt0); - - ENDD(d0); - ENDOpRW(); - - Op(gl_void_varx, xx); - BEGD(d0); - d0 = XREG(PREG->y_u.xx.xl); - deref_head(d0, glist_void_varx_write); - glist_void_varx_read: - /* did we find a list? */ - if (!IsPairTerm(d0)) - FAIL(); - ALWAYS_START_PREFETCH(xx); - /* enter read mode */ - BEGP(pt0); - pt0 = RepPair(d0); - d0 = pt0[1]; - XREG(PREG->y_u.xx.xr) = d0; - PREG = NEXTOP(PREG, xx); - ALWAYS_GONext(); - ENDP(pt0); - ALWAYS_END_PREFETCH(); - - BEGP(pt0); - deref_body(d0, pt0, glist_void_varx_write, glist_void_varx_read); - /* enter write mode */ - BEGP(pt1); - pt1 = HR; - /* include XREG on it */ - XREG(PREG->y_u.xx.xr) = - Unsigned(pt1 + 1); - RESET_VARIABLE(pt1); - RESET_VARIABLE(pt1+1); - HR = pt1 + 2; - BEGD(d0); - d0 = AbsPair(pt1); - YapBind(pt0, d0); - PREG = NEXTOP(PREG, xx); - ENDD(d0); - ENDP(pt1); - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(gl_void_vary, yx); - BEGD(d0); - d0 = XREG(PREG->y_u.yx.x); - deref_head(d0, glist_void_vary_write); - glist_void_vary_read: - /* did we find a list? */ - if (!IsPairTerm(d0)) - FAIL(); - /* enter read mode */ - BEGP(pt0); - pt0 = RepPair(d0); - d0 = pt0[1]; - ENDP(pt0); - INITIALIZE_PERMVAR(YREG+PREG->y_u.yx.y,d0); - PREG = NEXTOP(PREG, yx); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, glist_void_vary_write, glist_void_vary_read); - /* enter write mode */ - BEGP(pt1); - pt1 = HR; - /* include XREG on it */ - INITIALIZE_PERMVAR(YREG+PREG->y_u.yx.y,Unsigned(pt1 + 1)); - PREG = NEXTOP(PREG, yx); - RESET_VARIABLE(pt1); - RESET_VARIABLE(pt1+1); - d0 = AbsPair(pt1); - HR = pt1 + 2; - YapBind(pt0, d0); - GONext(); - ENDP(pt1); - ENDP(pt0); - - ENDD(d0); - ENDOp(); - - Op(gl_void_valx, xx); - BEGD(d0); - d0 = XREG(PREG->y_u.xx.xl); - deref_head(d0, glist_void_valx_write); - glist_void_valx_read: - BEGP(pt0); - /* did we find a list? */ - if (!IsPairTerm(d0)) - FAIL(); - /* enter read mode */ - pt0 = RepPair(d0)+1; - /* start unification with first argument */ - d0 = *pt0; - deref_head(d0, glist_void_valx_unk); - - glist_void_valx_nonvar: - /* first argument is bound */ - BEGD(d1); - d1 = XREG(PREG->y_u.xx.xr); - deref_head(d1, glist_void_valx_nonvar_unk); - - glist_void_valx_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, xx); - UnifyBound(d0, d1); - - /* deref second argument */ - BEGP(pt1); - deref_body(d1, pt1, glist_void_valx_nonvar_unk, glist_void_valx_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, xx); - YapBind(pt1, d0); - GONext(); - ENDP(pt1); - ENDD(d1); - - /* first argument may be unbound */ - derefa_body(d0, pt0, glist_void_valx_unk, glist_void_valx_nonvar); - /* first argument is unbound */ - BEGD(d1); - d1 = XREG(PREG->y_u.xx.xr); - deref_head(d1, glist_void_valx_var_unk); - - glist_void_valx_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, xx); - Bind_Global(pt0, d1); - GONext(); - - BEGP(pt1); - deref_body(d1, pt1, glist_void_valx_var_unk, glist_void_valx_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, xx); - UnifyGlobalCellToCell(pt0, pt1); - GONext(); - ENDP(pt1); - ENDD(d1); - ENDP(pt0); - - BEGP(pt0); - deref_body(d0, pt0, glist_void_valx_write, glist_void_valx_read); - /* enter write mode */ - BEGP(pt1); - pt1 = HR; - d0 = AbsPair(pt1); - YapBind(pt0, d0); - pt1 = HR; - BEGD(d0); - /* include XREG on it */ - d0 = XREG(PREG->y_u.xx.xr); - RESET_VARIABLE(pt1); - pt1[1] = d0; - HR = pt1 + 2; - ENDD(d0); - ENDP(pt1); - PREG = NEXTOP(PREG, xx); - GONext(); - ENDP(pt0); - - ENDD(d0); - ENDOp(); - - Op(gl_void_valy, yx); - BEGD(d0); - d0 = XREG(PREG->y_u.yx.x); - deref_head(d0, glist_void_valy_write); - glist_void_valy_read: - BEGP(pt0); - /* did we find a list? */ - if (!IsPairTerm(d0)) - FAIL(); - /* enter read mode */ - pt0 = RepPair(d0)+1; - /* start unification with first argument */ - d0 = *pt0; - deref_head(d0, glist_void_valy_unk); - - glist_void_valy_nonvar: - /* first argument is bound */ - BEGD(d1); - BEGP(pt1); - pt1 = YREG+PREG->y_u.yx.y; - d1 = *pt1; - deref_head(d1, glist_void_valy_nonvar_unk); - - glist_void_valy_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, yx); - UnifyBound(d0, d1); - - /* deref second argument */ - derefa_body(d1, pt1, glist_void_valy_nonvar_unk, glist_void_valy_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, yx); - YapBind(pt1, d0); - GONext(); - - ENDP(pt1); - - /* first argument may be unbound */ - derefa_body(d0, pt0, glist_void_valy_unk, glist_void_valy_nonvar); - /* first argument is unbound */ - BEGP(pt1); - pt1 = YREG+PREG->y_u.yx.y; - d1 = *pt1; - deref_head(d1, glist_void_valy_var_unk); - - glist_void_valy_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, yx); - Bind_Global(pt0, d1); - GONext(); - - deref_body(d1, pt1, glist_void_valy_var_unk, glist_void_valy_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, yx); - UnifyGlobalCellToCell(pt0, pt1); - GONext(); - ENDP(pt1); - ENDD(d1); - ENDP(pt0); - - BEGP(pt0); - deref_body(d0, pt0, glist_void_valy_write, glist_void_valy_read); - /* enter write mode */ - CACHE_S(); - S_SREG = HR; - d0 = AbsPair(S_SREG); - YapBind(pt0, d0); - S_SREG = HR; - /* include XREG on it */ - BEGD(d1); - d1 = YREG[PREG->y_u.yx.y]; - RESET_VARIABLE(S_SREG); - S_SREG[1] = d1; - ENDD(d1); - PREG = NEXTOP(PREG, yx); - HR = S_SREG + 2; - ENDCACHE_S(); - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - - - /************************************************************************\ - * Unify instructions * -\************************************************************************/ - - Op(unify_x_var, ox); - CACHE_S(); - READ_IN_S(); - BEGD(d0); - d0 = *S_SREG; -#ifdef YAPOR_SBA - if (d0 == 0) - d0 = (CELL)S_SREG; -#endif - WRITEBACK_S(S_SREG+1); - ALWAYS_START_PREFETCH(ox); - XREG(PREG->y_u.ox.x) = d0; - PREG = NEXTOP(PREG, ox); - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - ENDD(d0); - ENDCACHE_S(); - ENDOp(); - - OpW(unify_x_var_write, ox); - CACHE_S(); - READ_IN_S(); - BEGP(pt0); - pt0 = &XREG(PREG->y_u.ox.x); - PREG = NEXTOP(PREG, ox); - RESET_VARIABLE(S_SREG); - *pt0 = (CELL) S_SREG; - WRITEBACK_S(S_SREG+1); - ENDP(pt0); - ENDCACHE_S(); - GONextW(); - ENDOpW(); - - BOp(unify_l_x_var, ox); - ALWAYS_START_PREFETCH(ox); - BEGP(pt0); - BEGD(d0); - d0 = SREG[0]; - pt0 = &XREG(PREG->y_u.ox.x); - PREG = NEXTOP(PREG, ox); -#ifdef YAPOR_SBA - if (d0 == 0) - d0 = (CELL)SREG; -#endif - *pt0 = d0; - ALWAYS_GONext(); - ENDD(d0); - ENDP(pt0); - ALWAYS_END_PREFETCH(); - ENDBOp(); - - BOp(unify_l_x_var_write, ox); - ALWAYS_START_PREFETCH(ox); - CACHE_S(); - READ_IN_S(); - BEGP(pt0); - pt0 = &XREG(PREG->y_u.ox.x); - PREG = NEXTOP(PREG, ox); - RESET_VARIABLE(S_SREG); - *pt0 = (CELL)S_SREG; - ENDP(pt0); - ENDCACHE_S(); - ALWAYS_GONext(); - ENDBOp(); - ALWAYS_END_PREFETCH(); - - BOp(unify_x_var2, oxx); - CACHE_S(); - ALWAYS_START_PREFETCH(oxx); - READ_IN_S(); - BEGP(pt0); - pt0 = &XREG(PREG->y_u.oxx.xr); - BEGD(d0); - d0 = S_SREG[0]; - BEGD(d1); - d1 = S_SREG[1]; -#ifdef YAPOR_SBA - if (d0 == 0) - d0 = (CELL)S_SREG; - if (d1 == 0) - d1 = (CELL)(S_SREG+1); -#endif - WRITEBACK_S(S_SREG+2); - XREG(PREG->y_u.oxx.xl) = d0; - PREG = NEXTOP(PREG, oxx); - *pt0 = d1; - ENDD(d0); - ENDD(d1); - ENDP(pt0); - ALWAYS_GONext(); - ENDBOp(); - ALWAYS_END_PREFETCH(); - ENDCACHE_S(); - - OpW(unify_x_var2_write, oxx); - CACHE_S(); - READ_IN_S(); - BEGP(pt0); - pt0 = &XREG(PREG->y_u.oxx.xr); - RESET_VARIABLE(S_SREG); - XREG(PREG->y_u.oxx.xl) = (CELL) S_SREG; - S_SREG++; - PREG = NEXTOP(PREG, oxx); - RESET_VARIABLE(S_SREG); - *pt0 = (CELL) S_SREG; - ENDP(pt0); - WRITEBACK_S(S_SREG+1); - ENDCACHE_S(); - GONextW(); - ENDOpW(); - - BOp(unify_l_x_var2, oxx); - ALWAYS_START_PREFETCH(oxx); - CACHE_S(); - READ_IN_S(); - BEGP(pt0); - pt0 = &XREG(PREG->y_u.oxx.xr); - BEGD(d0); - d0 = S_SREG[0]; - BEGD(d1); - d1 = S_SREG[1]; -#ifdef YAPOR_SBA - if (d0 == 0) - XREG(PREG->y_u.oxx.xl) = (CELL)S_SREG; - else -#endif - XREG(PREG->y_u.oxx.xl) = d0; - PREG = NEXTOP(PREG, oxx); -#ifdef YAPOR_SBA - if (d1 == 0) - *pt0 = (CELL)(S_SREG+1); - else -#endif - *pt0 = d1; - ENDD(d0); - ENDD(d1); - ENDP(pt0); - ENDCACHE_S(); - ALWAYS_GONext(); - ENDBOp(); - ALWAYS_END_PREFETCH(); - - Op(unify_l_x_var2_write, oxx); - CACHE_S(); - READ_IN_S(); - BEGP(pt0); - pt0 = &XREG(PREG->y_u.oxx.xr); - XREG(PREG->y_u.oxx.xl) = (CELL) S_SREG; - RESET_VARIABLE(S_SREG); - S_SREG++; - *pt0 = (CELL) S_SREG; - PREG = NEXTOP(PREG, oxx); - RESET_VARIABLE(S_SREG); - ENDP(pt0); - ENDCACHE_S(); - GONext(); - ENDOp(); - - Op(unify_y_var, oy); - BEGD(d0); - d0 = *SREG++; -#ifdef YAPOR_SBA - if (d0 == 0) { - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,(CELL)(SREG-1)); - } else -#else - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,d0); -#endif /* YAPOR_SBA */ - PREG = NEXTOP(PREG, oy); - GONext(); - ENDD(d0); - ENDOp(); - - OpW(unify_y_var_write, oy); - CACHE_S(); - READ_IN_S(); - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,(CELL) S_SREG); - PREG = NEXTOP(PREG, oy); - RESET_VARIABLE(S_SREG); - WRITEBACK_S(S_SREG+1); - ENDCACHE_S(); - GONextW(); - ENDOpW(); - - Op(unify_l_y_var, oy); - BEGD(d0); - d0 = SREG[0]; -#ifdef YAPOR_SBA - if (d0 == 0) { - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,(CELL)SREG); - } else -#else - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,d0); -#endif /* YAPOR_SBA */ - PREG = NEXTOP(PREG, oy); - GONext(); - ENDD(d0); - ENDOp(); - - Op(unify_l_y_var_write, oy); - CACHE_S(); - READ_IN_S(); - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,(CELL) S_SREG); - PREG = NEXTOP(PREG, oy); - RESET_VARIABLE(S_SREG); - ENDCACHE_S(); - GONext(); - ENDOp(); - - /* We assume the value in X is pointing to an object in the - * global stack */ - Op(unify_x_val, ox); - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, uvalx_unk); - - uvalx_nonvar: - /* first argument is bound */ - d1 = XREG(PREG->y_u.ox.x); - deref_head(d1, uvalx_nonvar_unk); - - uvalx_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, ox); - SREG++; - UnifyBound(d0, d1); - - /* deref second argument */ - /* pt0 is in the structure and pt1 the register */ - BEGP(pt1); - deref_body(d1, pt1, uvalx_nonvar_unk, uvalx_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, ox); - SREG++; - YapBind(pt1, d0); - GONext(); - ENDP(pt1); - - /* first argument may be unbound */ - derefa_body(d0, pt0, uvalx_unk, uvalx_nonvar); - /* first argument is unbound */ - d1 = XREG(PREG->y_u.ox.x); - deref_head(d1, uvalx_var_unk); - - uvalx_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, ox); - SREG++; - Bind_Global(pt0, d1); - GONext(); - - BEGP(pt1); - deref_body(d1, pt1, uvalx_var_unk, uvalx_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, ox); - SREG++; - UnifyGlobalCellToCell(pt0, pt1); - GONext(); - ENDP(pt1); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - OpW(unify_x_val_write, ox); - /* we are in write mode */ - *SREG++ = XREG(PREG->y_u.ox.x); - PREG = NEXTOP(PREG, ox); - GONextW(); - ENDOpW(); - - /* We assume the value in X is pointing to an object in the - * global stack */ - Op(unify_l_x_val, ox); - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, ulvalx_unk); - - ulvalx_nonvar: - /* first argument is bound */ - d1 = XREG(PREG->y_u.ox.x); - deref_head(d1, ulvalx_nonvar_unk); - - ulvalx_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, ox); - UnifyBound(d0, d1); - - BEGP(pt1); - /* deref second argument */ - deref_body(d1, pt1, ulvalx_nonvar_unk, ulvalx_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, ox); - YapBind(pt1, d0); - GONext(); - ENDP(pt1); - - /* first argument may be unbound */ - derefa_body(d0, pt0, ulvalx_unk, ulvalx_nonvar); - /* first argument is unbound */ - d1 = XREG(PREG->y_u.ox.x); - deref_head(d1, ulvalx_var_unk); - - ulvalx_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, ox); - Bind_Global(pt0, d1); - GONext(); - - BEGP(pt1); - deref_body(d1, pt1, ulvalx_var_unk, ulvalx_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, ox); - UnifyGlobalCellToCell(pt0, pt1); - GONext(); - ENDP(pt1); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(unify_l_x_val_write, ox); - /* we are in write mode */ - SREG[0] = XREG(PREG->y_u.ox.x); - PREG = NEXTOP(PREG, ox); - GONext(); - ENDOp(); - - /* We assume the value in X is pointing to an object in the - * global stack */ - Op(unify_y_val, oy); - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, uvaly_unk); - - uvaly_nonvar: - /* first argument is bound */ - BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; - d1 = *pt1; - deref_head(d1, uvaly_nonvar_unk); - - uvaly_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, oy); - SREG++; - UnifyBound(d0, d1); - - /* deref second argument */ - derefa_body(d1, pt1, uvaly_nonvar_unk, uvaly_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, oy); - SREG++; - YapBind(pt1, d0); - GONext(); - ENDP(pt1); - - /* first argument may be unbound */ - derefa_body(d0, pt0, uvaly_unk, uvaly_nonvar); - /* first argument is unbound */ - BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; - d1 = *pt1; - deref_head(d1, uvaly_var_unk); - - uvaly_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, oy); - SREG++; - Bind_Global(pt0, d1); - GONext(); - - derefa_body(d1, pt1, uvaly_var_unk, uvaly_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, oy); - SREG++; - UnifyGlobalCellToCell(pt0, pt1); - GONext(); - ENDP(pt1); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - OpW(unify_y_val_write, oy); - /* we are in write mode */ - BEGD(d0); - d0 = YREG[PREG->y_u.oy.y]; -#ifdef YAPOR_SBA - if (d0 == 0) /* free variable */ - *SREG++ = (CELL)(YREG+PREG->y_u.oy.y); - else -#endif - *SREG++ = d0; - ENDD(d0); - PREG = NEXTOP(PREG, oy); - GONextW(); - ENDOpW(); - - /* We assume the value in X is pointing to an object in the - * global stack */ - Op(unify_l_y_val, oy); - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, ulvaly_unk); - - ulvaly_nonvar: - /* first argument is bound */ - BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; - d1 = *pt1; - deref_head(d1, ulvaly_nonvar_unk); - - ulvaly_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, oy); - UnifyBound(d0, d1); - - /* deref second argument */ - derefa_body(d1, pt1, ulvaly_nonvar_unk, ulvaly_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, oy); - YapBind(pt1, d0); - GONext(); - ENDP(pt1); - - /* first argument may be unbound */ - derefa_body(d0, pt0, ulvaly_unk, ulvaly_nonvar); - /* first argument is unbound */ - BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; - d1 = *pt1; - deref_head(d1, ulvaly_var_unk); - - ulvaly_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, oy); - Bind_Global(pt0, d1); - GONext(); - - /* Here we are in trouble: we have a clash between pt1 and - * SREG. We address this by storing SREG in d0 for the duration. */ - derefa_body(d1, pt1, ulvaly_var_unk, ulvaly_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, oy); - UnifyGlobalCellToCell(pt0, pt1); - GONext(); - ENDP(pt1); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(unify_l_y_val_write, oy); - /* we are in write mode */ - BEGD(d0); - d0 = YREG[PREG->y_u.oy.y]; -#ifdef YAPOR_SBA - if (d0 == 0) /* new variable */ - SREG[0] = (CELL)(YREG+PREG->y_u.oy.y); - else -#endif - SREG[0] = d0; - ENDD(d0); - PREG = NEXTOP(PREG, oy); - GONext(); - ENDOp(); - - /* In the next instructions, we do not know anything about - * what is in X */ - Op(unify_x_loc, ox); - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, uvalx_loc_unk); - - uvalx_loc_nonvar: - /* first argument is bound */ - d1 = XREG(PREG->y_u.ox.x); - deref_head(d1, uvalx_loc_nonvar_unk); - - uvalx_loc_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, ox); - SREG++; - UnifyBound(d0, d1); - - BEGP(pt1); - /* deref second argument */ - deref_body(d1, pt1, uvalx_loc_nonvar_unk, uvalx_loc_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, ox); - SREG++; - YapBind(pt1, d0); - GONext(); - ENDP(pt1); - - - /* first argument may be unbound */ - derefa_body(d0, pt0, uvalx_loc_unk, uvalx_loc_nonvar); - /* first argument is unbound */ - d1 = XREG(PREG->y_u.ox.x); - deref_head(d1, uvalx_loc_var_unk); - - uvalx_loc_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, ox); - SREG++; - Bind_Global(pt0, d1); - GONext(); - - /* Here we are in trouble: we have a clash between pt1 and - * SREG. We address this by storing SREG in d0 for the duration. */ - BEGP(pt1); - deref_body(d1, pt1, uvalx_loc_var_unk, uvalx_loc_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, ox); - SREG++; - UnifyCells(pt0, pt1); - GONext(); - ENDP(pt1); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - OpW(unify_x_loc_write, ox); - /* we are in write mode */ - BEGD(d0); - d0 = XREG(PREG->y_u.ox.x); - deref_head(d0, unify_x_loc_unk); - unify_x_loc_nonvar: - *SREG++ = d0; - PREG = NEXTOP(PREG, ox); - GONextW(); - - BEGP(pt0); - deref_body(d0, pt0, unify_x_loc_unk, unify_x_loc_nonvar); - /* move ahead in the instructions */ - PREG = NEXTOP(PREG, ox); - /* d0 is a variable, check whether we need to globalise it */ - if (pt0 < HR) { - /* variable is global */ - *SREG++ = Unsigned(pt0); - GONextW(); - } - else { - /* bind our variable to the structure */ - CACHE_S(); - READ_IN_S(); - Bind_Local(pt0, Unsigned(S_SREG)); - RESET_VARIABLE(S_SREG); - WRITEBACK_S(S_SREG+1); - ENDCACHE_S(); - GONextW(); - } - ENDP(pt0); - ENDD(d0); - ENDOpW(); - - /* In the next instructions, we do not know anything about - * what is in X */ - Op(unify_l_x_loc, ox); - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, ulvalx_loc_unk); - - ulvalx_loc_nonvar: - /* first argument is bound */ - d1 = XREG(PREG->y_u.ox.x); - deref_head(d1, ulvalx_loc_nonvar_unk); - - ulvalx_loc_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, ox); - UnifyBound(d0, d1); - - /* deref second argument */ - deref_body(d1, pt0, ulvalx_loc_nonvar_unk, ulvalx_loc_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, ox); - YapBind(pt0, d0); - GONext(); - - /* first argument may be unbound */ - derefa_body(d0, pt0, ulvalx_loc_unk, ulvalx_loc_nonvar); - /* first argument is unbound */ - d1 = XREG(PREG->y_u.ox.x); - deref_head(d1, ulvalx_loc_var_unk); - - ulvalx_loc_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, ox); - Bind_Global(pt0, d1); - GONext(); - - BEGP(pt1); - deref_body(d1, pt1, ulvalx_loc_var_unk, ulvalx_loc_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, ox); - UnifyGlobalCellToCell(pt0, pt1); - GONext(); - ENDP(pt1); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(unify_l_x_loc_write, ox); - /* we are in write mode */ - BEGD(d0); - d0 = XREG(PREG->y_u.ox.x); - deref_head(d0, ulnify_x_loc_unk); - ulnify_x_loc_nonvar: - SREG[0] = d0; - PREG = NEXTOP(PREG, ox); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, ulnify_x_loc_unk, ulnify_x_loc_nonvar); - /* d0 is a variable, check whether we need to globalise it */ - PREG = NEXTOP(PREG, ox); - if (pt0 < HR) { - /* variable is global */ - SREG[0] = Unsigned(pt0); - GONext(); - } - else { - /* create a new Heap variable and bind our variable to it */ - Bind_Local(pt0, Unsigned(SREG)); - RESET_VARIABLE(SREG); - GONext(); - } - ENDP(pt0); - ENDD(d0); - ENDOpW(); - - Op(unify_y_loc, oy); - /* we are in read mode */ - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, uvaly_loc_unk); - - uvaly_loc_nonvar: - /* structure is bound */ - BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; - d1 = *pt1; - deref_head(d1, uvaly_loc_nonvar_unk); - - uvaly_loc_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, oy); - SREG++; - UnifyBound(d0, d1); - - /* deref second argument */ - derefa_body(d1, pt1, uvaly_loc_nonvar_unk, uvaly_loc_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, oy); - SREG++; - YapBind(pt1, d0); - GONext(); - ENDP(pt1); - - /* first argument may be unbound */ - derefa_body(d0, pt0, uvaly_loc_unk, uvaly_loc_nonvar); - /* first argument is unbound */ - BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; - d1 = *pt1; - deref_head(d1, uvaly_loc_var_unk); - - uvaly_loc_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, oy); - SREG++; - Bind_Global(pt0, d1); - GONext(); - - /* Here we are in trouble: we have a clash between pt1 and - * SREG. We address this by storing SREG in d0 for the duration. */ - derefa_body(d1, pt1, uvaly_loc_var_unk, uvaly_loc_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, oy); - SREG++; - UnifyCells(pt0, pt1); - GONext(); - ENDP(pt1); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - OpW(unify_y_loc_write, oy); - /* we are in write mode */ - BEGD(d0); - BEGP(pt0); - pt0 = YREG+PREG->y_u.oy.y; - d0 = *pt0; - deref_head(d0, unify_y_loc_unk); - unify_y_loc_nonvar: - *SREG++ = d0; - PREG = NEXTOP(PREG, oy); - GONextW(); - - derefa_body(d0, pt0, unify_y_loc_unk, unify_y_loc_nonvar); - /* d0 is a variable, check whether we need to globalise it */ - PREG = NEXTOP(PREG, oy); - if (pt0 < HR) { - /* variable is global */ - *SREG++ = Unsigned(pt0); - GONextW(); - } - else { - /* create a new Heap variable and bind our variable to it */ - CACHE_S(); - READ_IN_S(); - Bind_Local(pt0, Unsigned(S_SREG)); - RESET_VARIABLE(S_SREG); - WRITEBACK_S(S_SREG+1); - ENDCACHE_S(); - GONextW(); - } - ENDP(pt0); - ENDD(d0); - ENDOpW(); - - Op(unify_l_y_loc, oy); - /* else we are in read mode */ - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, ulvaly_loc_unk); - - ulvaly_loc_nonvar: - /* structure is bound */ - BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; - d1 = *pt1; - deref_head(d1, ulvaly_loc_nonvar_unk); - - ulvaly_loc_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, oy); - UnifyBound(d0, d1); - - /* deref second argument */ - derefa_body(d1, pt1, ulvaly_loc_nonvar_unk, ulvaly_loc_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, oy); - YapBind(pt1, d0); - GONext(); - ENDP(pt1); - - /* first argument may be unbound */ - derefa_body(d0, pt0, ulvaly_loc_unk, ulvaly_loc_nonvar); - /* first argument is unbound */ - BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; - d1 = *pt1; - deref_head(d1, ulvaly_loc_var_unk); - - ulvaly_loc_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, oy); - Bind_Global(pt0, d1); - GONext(); - - /* Here we are in trouble: we have a clash between pt1 and - * SREG. We address this by storing SREG in d0 for the duration. */ - derefa_body(d1, pt1, ulvaly_loc_var_unk, ulvaly_loc_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, oy); - UnifyGlobalCellToCell(pt0, pt1); - GONext(); - ENDP(pt1); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(unify_l_y_loc_write, oy); - /* we are in write mode */ - BEGD(d0); - BEGP(pt0); - pt0 = YREG+PREG->y_u.oy.y; - d0 = *pt0; - deref_head(d0, ulunify_y_loc_unk); - ulunify_y_loc_nonvar: - SREG[0] = d0; - PREG = NEXTOP(PREG, oy); - GONext(); - - derefa_body(d0, pt0, ulunify_y_loc_unk, ulunify_y_loc_nonvar); - /* d0 is a variable, check whether we need to globalise it */ - PREG = NEXTOP(PREG, oy); - if (pt0 < HR) { - /* variable is global */ - SREG[0] = Unsigned(pt0); - GONext(); - } - else { - /* create a new Heap variable and bind our variable to it */ - CACHE_S(); - READ_IN_S(); - Bind_Local(pt0, Unsigned(S_SREG)); - RESET_VARIABLE(S_SREG); - ENDCACHE_S(); - GONext(); - } - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(unify_void, o); - START_PREFETCH(o); - PREG = NEXTOP(PREG, o); - SREG++; - GONext(); - END_PREFETCH(); - ENDOp(); - - OpW(unify_void_write, o); - CACHE_S(); - READ_IN_S(); - PREG = NEXTOP(PREG, o); - RESET_VARIABLE(S_SREG); - WRITEBACK_S(S_SREG+1); - ENDCACHE_S(); - GONextW(); - ENDOpW(); - - Op(unify_l_void, o); - PREG = NEXTOP(PREG, o); - GONext(); - ENDOp(); - - Op(unify_l_void_write, o); - PREG = NEXTOP(PREG, o); - RESET_VARIABLE(SREG); - GONext(); - ENDOp(); - - Op(unify_n_voids, os); - SREG += PREG->y_u.os.s; - PREG = NEXTOP(PREG, os); - GONext(); - ENDOp(); - - OpW(unify_n_voids_write, os); - BEGD(d0); - CACHE_S(); - d0 = PREG->y_u.os.s; - READ_IN_S(); - PREG = NEXTOP(PREG, os); - for (; d0 > 0; d0--) { - RESET_VARIABLE(S_SREG); - S_SREG++; - } - WRITEBACK_S(S_SREG); - ENDCACHE_S(); - ENDD(d0); - GONextW(); - ENDOpW(); - - Op(unify_l_n_voids, os); - PREG = NEXTOP(PREG, os); - GONext(); - ENDOp(); - - Op(unify_l_n_voids_write, os); - BEGD(d0); - d0 = PREG->y_u.os.s; - PREG = NEXTOP(PREG, os); - CACHE_S(); - READ_IN_S(); - for (; d0 > 0; d0--) { - RESET_VARIABLE(S_SREG); - S_SREG++; - } - ENDCACHE_S(); - ENDD(d0); - GONext(); - ENDOp(); - - Op(unify_atom, oc); - BEGD(d0); - BEGP(pt0); - pt0 = SREG++; - d0 = *pt0; - deref_head(d0, uatom_unk); - uatom_nonvar: - if (d0 != PREG->y_u.oc.c) { - FAIL(); - } - PREG = NEXTOP(PREG, oc); - GONext(); - - derefa_body(d0, pt0, uatom_unk, uatom_nonvar); - d0 = PREG->y_u.oc.c; - PREG = NEXTOP(PREG, oc); - Bind_Global(pt0, d0); - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - OpW(unify_atom_write, oc); - * SREG++ = PREG->y_u.oc.c; - PREG = NEXTOP(PREG, oc); - GONextW(); - ENDOpW(); - - Op(unify_l_atom, oc); - BEGD(d0); - BEGP(pt0); - pt0 = SREG; - d0 = *SREG; - deref_head(d0, ulatom_unk); - ulatom_nonvar: - if (d0 != PREG->y_u.oc.c) { - FAIL(); - } - PREG = NEXTOP(PREG, oc); - GONext(); - - derefa_body(d0, pt0, ulatom_unk, ulatom_nonvar); - d0 = PREG->y_u.oc.c; - PREG = NEXTOP(PREG, oc); - Bind_Global(pt0, d0); - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(unify_l_atom_write, oc); - SREG[0] = PREG->y_u.oc.c; - PREG = NEXTOP(PREG, oc); - GONext(); - ENDOp(); - - Op(unify_n_atoms, osc); - { - register Int i = PREG->y_u.osc.s; /* not enough registers */ - - BEGD(d1); - d1 = PREG->y_u.osc.c; - for (; i > 0; i--) { - BEGD(d0); - BEGP(pt0); - pt0 = SREG++; - d0 = *pt0; - deref_head(d0, uatom_n_var); - uatom_n_nonvar: - if (d0 != d1) { - FAIL(); - } - continue; - - derefa_body(d0, pt0, uatom_n_var, uatom_n_nonvar); - Bind_Global(pt0, d1); - continue; - ENDP(pt0); - ENDD(d0); - } - ENDD(d1); - } - PREG = NEXTOP(PREG, osc); - GONext(); - ENDOp(); - - OpW(unify_n_atoms_write, osc); - BEGD(d0); - BEGD(d1); - d0 = PREG->y_u.osc.s; - d1 = PREG->y_u.osc.c; - /* write N atoms */ - CACHE_S(); - READ_IN_S(); - PREG = NEXTOP(PREG, osc); - for (; d0 > 0; d0--) - *S_SREG++ = d1; - WRITEBACK_S(S_SREG); - ENDCACHE_S(); - ENDD(d1); - ENDD(d0); - GONextW(); - ENDOpW(); - - Op(unify_float, od); - BEGD(d0); - BEGP(pt0); - pt0 = SREG++; - d0 = *pt0; - deref_head(d0, ufloat_unk); - ufloat_nonvar: - if (!IsApplTerm(d0)) { - FAIL(); - } - /* look inside term */ - BEGP(pt0); - pt0 = RepAppl(d0); - BEGD(d0); - d0 = *pt0; - if (d0 != (CELL)FunctorDouble) { - FAIL(); - } - ENDD(d0); - BEGP(pt1); - pt1 = PREG->y_u.od.d; - PREG = NEXTOP(PREG, od); - if ( - pt1[1] != pt0[1] -#if SIZEOF_DOUBLE == 2*SIZEOF_INT_P - || pt1[2] != pt0[2] -#endif - ) FAIL(); - ENDP(pt1); - ENDP(pt0); - GONext(); - - derefa_body(d0, pt0, ufloat_unk, ufloat_nonvar); - BEGD(d1); - d1 = AbsAppl(PREG->y_u.od.d); - PREG = NEXTOP(PREG, od); - Bind_Global(pt0, d1); - GONext(); - ENDD(d1); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - OpW(unify_float_write, od); - * SREG++ = AbsAppl(PREG->y_u.od.d); - PREG = NEXTOP(PREG, od); - GONextW(); - ENDOpW(); - - Op(unify_l_float, od); - BEGD(d0); - CACHE_S(); - READ_IN_S(); - d0 = *S_SREG; - deref_head(d0, ulfloat_unk); - ulfloat_nonvar: - if (!IsApplTerm(d0)) { - FAIL(); - } - BEGP(pt0); - pt0 = RepAppl(d0); - BEGD(d0); - d0 = *pt0; - if (d0 != (CELL)FunctorDouble) { - FAIL(); - } - ENDD(d0); - BEGP(pt1); - pt1 = PREG->y_u.od.d; - PREG = NEXTOP(PREG, od); - if ( - pt1[1] != pt0[1] -#if SIZEOF_DOUBLE == 2*SIZEOF_INT_P - || pt1[2] != pt0[2] -#endif - ) FAIL(); - ENDP(pt1); - ENDP(pt0); - GONext(); - - derefa_body(d0, S_SREG, ulfloat_unk, ulfloat_nonvar); - BEGD(d1); - d1 = AbsAppl(PREG->y_u.od.d); - PREG = NEXTOP(PREG, od); - Bind_Global(S_SREG, d1); - GONext(); - ENDD(d1); - ENDCACHE_S(); - ENDD(d0); - ENDOp(); - - Op(unify_l_float_write, od); - SREG[0] = AbsAppl(PREG->y_u.od.d); - PREG = NEXTOP(PREG, od); - GONext(); - ENDOp(); - - Op(unify_string, ou); - BEGD(d0); - BEGP(pt0); - pt0 = SREG++; - d0 = *pt0; - deref_head(d0, ustring_unk); - ustring_nonvar: - if (!IsApplTerm(d0)) { - FAIL(); - } - /* look inside term */ - BEGP(pt0); - pt0 = RepAppl(d0); - BEGD(d0); - d0 = *pt0; - if (d0 != (CELL)FunctorString) { - FAIL(); - } - ENDD(d0); - BEGP(pt1); - pt1 = RepAppl(PREG->y_u.ou.ut); - PREG = NEXTOP(PREG, ou); - if ( - pt1[1] != pt0[1] - || strcmp( (const char *)(pt1 + 2), (const char *)(pt0+2) ) - ) FAIL(); - ENDP(pt1); - ENDP(pt0); - GONext(); - - derefa_body(d0, pt0, ustring_unk, ustring_nonvar); - BEGD(d1); - d1 = PREG->y_u.ou.ut; - PREG = NEXTOP(PREG, ou); - Bind_Global(pt0, d1); - GONext(); - ENDD(d1); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(unify_l_string, ou); - BEGD(d0); - CACHE_S(); - READ_IN_S(); - d0 = *S_SREG; - deref_head(d0, ulstring_unk); - ulstring_nonvar: - if (!IsApplTerm(d0)) { - FAIL(); - } - BEGP(pt0); - pt0 = RepAppl(d0); - BEGD(d0); - d0 = *pt0; - if (d0 != (CELL)FunctorString) { - FAIL(); - } - ENDD(d0); - BEGP(pt1); - pt1 = RepAppl(PREG->y_u.ou.ut); - PREG = NEXTOP(PREG, ou); - if ( - pt1[1] != pt0[1] - || strcmp( (const char *)(pt1 + 2), (const char *)(pt0+2) ) - ) FAIL(); - ENDP(pt1); - ENDP(pt0); - GONext(); - - derefa_body(d0, S_SREG, ulstring_unk, ulstring_nonvar); - BEGD(d1); - d1 = PREG->y_u.ou.ut; - PREG = NEXTOP(PREG, ou); - Bind_Global(S_SREG, d1); - GONext(); - ENDD(d1); - ENDCACHE_S(); - ENDD(d0); - ENDOp(); - - Op(unify_longint, oi); - BEGD(d0); - BEGP(pt0); - pt0 = SREG++; - d0 = *pt0; - deref_head(d0, ulongint_unk); - ulongint_nonvar: - /* look inside term */ - if (!IsApplTerm(d0)) { - FAIL(); - } - BEGP(pt0); - pt0 = RepAppl(d0); - BEGD(d0); - d0 = *pt0; - if (d0 != (CELL)FunctorLongInt) { - FAIL(); - } - ENDD(d0); - BEGP(pt1); - pt1 = PREG->y_u.oi.i; - PREG = NEXTOP(PREG, oi); - if (pt1[1] != pt0[1]) FAIL(); - ENDP(pt1); - ENDP(pt0); - GONext(); - - derefa_body(d0, pt0, ulongint_unk, ulongint_nonvar); - BEGD(d1); - d1 = AbsAppl(PREG->y_u.oi.i); - PREG = NEXTOP(PREG, oi); - Bind_Global(pt0, d1); - GONext(); - ENDD(d1); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - OpW(unify_longint_write, oi); - * SREG++ = AbsAppl(PREG->y_u.oi.i); - PREG = NEXTOP(PREG, oi); - GONextW(); - ENDOpW(); - - Op(unify_l_longint, oi); - BEGD(d0); - CACHE_S(); - READ_IN_S(); - d0 = *S_SREG; - deref_head(d0, ullongint_unk); - ullongint_nonvar: - if (!IsApplTerm(d0)) { - FAIL(); - } - BEGP(pt0); - pt0 = RepAppl(d0); - BEGD(d0); - d0 = *pt0; - if (d0 != (CELL)FunctorLongInt) { - FAIL(); - } - ENDD(d0); - BEGP(pt1); - pt1 = PREG->y_u.oi.i; - PREG = NEXTOP(PREG, oi); - if (pt1[1] != pt0[1]) FAIL(); - ENDP(pt1); - ENDP(pt0); - GONext(); - - derefa_body(d0, S_SREG, ullongint_unk, ullongint_nonvar); - BEGD(d1); - d1 = AbsAppl(PREG->y_u.oi.i); - PREG = NEXTOP(PREG, oi); - Bind_Global(S_SREG, d1); - GONext(); - ENDD(d1); - ENDCACHE_S(); - ENDD(d0); - ENDOp(); - - Op(unify_l_longint_write, oi); - SREG[0] = AbsAppl(PREG->y_u.oi.i); - PREG = NEXTOP(PREG, oi); - GONext(); - ENDOp(); - - Op(unify_bigint, oN); -#ifdef USE_GMP - BEGD(d0); - BEGP(pt0); - pt0 = SREG++; - d0 = *pt0; - deref_head(d0, ubigint_unk); - ubigint_nonvar: - /* look inside term */ - if (!IsApplTerm(d0)) { - FAIL(); - } - BEGP(pt0); - pt0 = RepAppl(d0); - BEGD(d1); - d1 = *pt0; - if (d1 != (CELL)FunctorBigInt) - { - FAIL(); - } - ENDD(d1); - if (Yap_gmp_tcmp_big_big(d0,PREG->y_u.oN.b)) - FAIL(); - PREG = NEXTOP(PREG, oN); - ENDP(pt0); - GONext(); - - derefa_body(d0, pt0, ubigint_unk, ubigint_nonvar); - BEGD(d1); - d1 = PREG->y_u.oN.b; - PREG = NEXTOP(PREG, oN); - Bind_Global(pt0, d1); - GONext(); - ENDD(d1); - ENDP(pt0); - ENDD(d0); -#else - FAIL(); -#endif - ENDOp(); - - Op(unify_l_bigint, oN); -#ifdef USE_GMP - BEGD(d0); - CACHE_S(); - READ_IN_S(); - d0 = *S_SREG; - deref_head(d0, ulbigint_unk); - ulbigint_nonvar: - if (!IsApplTerm(d0)) { - FAIL(); - } - BEGP(pt0); - pt0 = RepAppl(d0); - BEGD(d0); - d0 = *pt0; - if (d0 != (CELL)FunctorBigInt) - { - FAIL(); - } - ENDD(d0); - if (Yap_gmp_tcmp_big_big(d0,PREG->y_u.oN.b)) - FAIL(); - PREG = NEXTOP(PREG, oN); - ENDP(pt0); - GONext(); - - derefa_body(d0, S_SREG, ulbigint_unk, ulbigint_nonvar); - BEGD(d1); - d1 = PREG->y_u.oN.b; - PREG = NEXTOP(PREG, oN); - Bind_Global(S_SREG, d1); - GONext(); - ENDD(d1); - ENDCACHE_S(); - ENDD(d0); -#else - FAIL(); -#endif - ENDOp(); - - Op(unify_dbterm, oD); - BEGD(d0); - BEGP(pt0); - pt0 = SREG++; - d0 = *pt0; - deref_head(d0, udbterm_unk); - udbterm_nonvar: - BEGD(d1); - /* we have met a preexisting dbterm */ - d1 = PREG->y_u.oD.D; - PREG = NEXTOP(PREG, oD); - UnifyBound(d0,d1); - ENDD(d1); - - derefa_body(d0, pt0, udbterm_unk, udbterm_nonvar); - BEGD(d1); - d1 = PREG->y_u.oD.D; - PREG = NEXTOP(PREG, oD); - Bind_Global(pt0, d1); - GONext(); - ENDD(d1); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(unify_l_dbterm, oD); - BEGD(d0); - CACHE_S(); - READ_IN_S(); - d0 = *S_SREG; - deref_head(d0, uldbterm_unk); - uldbterm_nonvar: - BEGD(d1); - /* we have met a preexisting dbterm */ - d1 = PREG->y_u.oD.D; - PREG = NEXTOP(PREG, oD); - UnifyBound(d0,d1); - ENDD(d1); - - derefa_body(d0, S_SREG, uldbterm_unk, uldbterm_nonvar); - BEGD(d1); - d1 = PREG->y_u.oD.D; - PREG = NEXTOP(PREG, oD); - Bind_Global(S_SREG, d1); - GONext(); - ENDD(d1); - ENDCACHE_S(); - ENDD(d0); - ENDOp(); - - OpRW(unify_list, o); - *--SP = Unsigned(SREG + 1); - *--SP = READ_MODE; - BEGD(d0); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, ulist_unk); - ulist_nonvar: - if (!IsPairTerm(d0)) { - FAIL(); - } - /* we continue in read mode */ - START_PREFETCH(o); - SREG = RepPair(d0); - PREG = NEXTOP(PREG, o); - GONext(); - END_PREFETCH(); - - derefa_body(d0, pt0, ulist_unk, ulist_nonvar); - /* we enter write mode */ - START_PREFETCH_W(o); - CACHE_S(); - READ_IN_S(); - S_SREG = HR; - PREG = NEXTOP(PREG, o); - HR = S_SREG + 2; - d0 = AbsPair(S_SREG); - WRITEBACK_S(S_SREG); - ENDCACHE_S(); - Bind_Global(pt0, d0); - GONextW(); - END_PREFETCH_W(); - - ENDP(pt0); - - ENDD(d0); - ENDOpRW(); - - OpW(unify_list_write, o); - PREG = NEXTOP(PREG, o); - BEGD(d0); - d0 = AbsPair(HR); - CACHE_S(); - READ_IN_S(); - SP -= 2; - SP[0] = WRITE_MODE; - SP[1] = Unsigned(S_SREG + 1); - S_SREG[0] = d0; - S_SREG = HR; - HR = S_SREG + 2; - WRITEBACK_S(S_SREG); - ENDCACHE_S(); - GONextW(); - ENDD(d0); - ENDOpW(); - - OpRW(unify_l_list, o); - BEGD(d0); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, ullist_unk); - ullist_nonvar: - START_PREFETCH(o); - if (!IsPairTerm(d0)) { - FAIL(); - } - /* we continue in read mode */ - PREG = NEXTOP(PREG, o); - SREG = RepPair(d0); - GONext(); - END_PREFETCH(); - - derefa_body(d0, pt0, ullist_unk, ullist_nonvar); - /* we enter write mode */ - START_PREFETCH_W(o); - PREG = NEXTOP(PREG, o); - CACHE_S(); - READ_IN_S(); - S_SREG = HR; - HR = S_SREG + 2; - d0 = AbsPair(S_SREG); - WRITEBACK_S(S_SREG); - ENDCACHE_S(); - Bind_Global(pt0, d0); - GONextW(); - END_PREFETCH_W(); - - ENDP(pt0); - ENDD(d0); - ENDOpRW(); - - OpW(unify_l_list_write, o); - /* we continue in write mode */ - BEGD(d0); - d0 = AbsPair(HR); - PREG = NEXTOP(PREG, o); - CACHE_S(); - READ_IN_S(); - S_SREG[0] = d0; - S_SREG = HR; - HR = S_SREG + 2; - WRITEBACK_S(S_SREG); - ENDCACHE_S(); - GONextW(); - ENDD(d0); - ENDOpW(); - - OpRW(unify_struct, ofa); - *--SP = Unsigned(SREG + 1); - *--SP = READ_MODE; - BEGD(d0); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - START_PREFETCH(ofa); - deref_head(d0, ustruct_unk); - ustruct_nonvar: - /* we are in read mode */ - if (!IsApplTerm(d0)) { - FAIL(); - } - CACHE_S(); - READ_IN_S(); - /* we continue in read mode */ - S_SREG = RepAppl(d0); - /* just check functor */ - d0 = (CELL) (PREG->y_u.ofa.f); - if (*S_SREG != d0) { - FAIL(); - } - PREG = NEXTOP(PREG, ofa); - WRITEBACK_S(S_SREG+1); - ENDCACHE_S(); - GONext(); - END_PREFETCH(); - - derefa_body(d0, pt0, ustruct_unk, ustruct_nonvar); - /* Enter Write mode */ - START_PREFETCH_W(ofa); - /* set d1 to be the new structure we are going to create */ - BEGD(d1); - d1 = AbsAppl(HR); - /* we know the variable must be in the heap */ - Bind_Global(pt0, d1); - /* now, set pt0 to point to the heap where we are going to - * build our term */ - pt0 = HR; - ENDD(d1); - /* first, put the functor */ - d0 = (CELL) (PREG->y_u.ofa.f); - *pt0++ = d0; - HR = pt0 + PREG->y_u.ofa.a; - PREG = NEXTOP(PREG, ofa); - /* set SREG */ - SREG = pt0; - /* update H */ - GONextW(); - END_PREFETCH_W(); - - ENDP(pt0); - - ENDD(d0); - ENDOpRW(); - - OpW(unify_struct_write, ofa); - CACHE_S(); - READ_IN_S(); - *--SP = Unsigned(S_SREG + 1); - *--SP = WRITE_MODE; - /* we continue in write mode */ - BEGD(d0); - d0 = AbsAppl(HR); - S_SREG[0] = d0; - S_SREG = HR; - d0 = (CELL) (PREG->y_u.ofa.f); - *S_SREG++ = d0; - HR = S_SREG + PREG->y_u.ofa.a; - PREG = NEXTOP(PREG, ofa); - WRITEBACK_S(S_SREG); - ENDCACHE_S(); - ENDD(d0); - GONextW(); - ENDOpW(); - - OpRW(unify_l_struc, ofa); - BEGD(d0); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, ulstruct_unk); - ulstruct_nonvar: - /* we are in read mode */ - START_PREFETCH(ofa); - if (!IsApplTerm(d0)) { - FAIL(); - } - /* we continue in read mode */ - SREG = RepAppl(d0); - /* just check functor */ - d0 = (CELL) (PREG->y_u.ofa.f); - if (*SREG++ != d0) { - FAIL(); - } - PREG = NEXTOP(PREG, ofa); - GONext(); - END_PREFETCH(); - - derefa_body(d0, pt0, ulstruct_unk, ulstruct_nonvar); - /* Enter Write mode */ - /* set d1 to be the new structure we are going to create */ - START_PREFETCH_W(ofa); - BEGD(d1); - d1 = AbsAppl(HR); - /* we know the variable must be in the heap */ - Bind_Global(pt0, d1); - /* now, set pt0 to point to the heap where we are going to - * build our term */ - pt0 = HR; - ENDD(d1); - /* first, put the functor */ - d0 = (CELL) (PREG->y_u.ofa.f); - *pt0++ = d0; - HR = pt0 + PREG->y_u.ofa.a; - PREG = NEXTOP(PREG, ofa); - /* set SREG */ - SREG = pt0; - /* update H */ - GONextW(); - END_PREFETCH_W(); - ENDP(pt0); - - ENDD(d0); - ENDOpRW(); - - OpW(unify_l_struc_write, ofa); - BEGD(d0); - d0 = AbsAppl(HR); - CACHE_S(); - READ_IN_S(); - S_SREG[0] = d0; - S_SREG = HR; - d0 = (CELL) (PREG->y_u.ofa.f); - *S_SREG++ = d0; - HR = S_SREG + PREG->y_u.ofa.a; - PREG = NEXTOP(PREG, ofa); - WRITEBACK_S(S_SREG); - ENDCACHE_S(); - ENDD(d0); - GONextW(); - ENDOpW(); - - - /************************************************************************\ - * Put Instructions * -\************************************************************************/ - - Op(put_x_var, xx); - BEGP(pt0); - pt0 = HR; - XREG(PREG->y_u.xx.xl) = Unsigned(pt0); - HR = pt0 + 1; - XREG(PREG->y_u.xx.xr) = Unsigned(pt0); - PREG = NEXTOP(PREG, xx); - RESET_VARIABLE(pt0); - ENDP(pt0); - GONext(); - ENDOp(); - - Op(put_y_var, yx); - BEGP(pt0); - pt0 = YREG + PREG->y_u.yx.y; - XREG(PREG->y_u.yx.x) = (CELL) pt0; - PREG = NEXTOP(PREG, yx); -#if defined(YAPOR_SBA) && defined(FROZEN_STACKS) - /* We must initialise a shared variable to point to the SBA */ - if (Unsigned((Int)(pt0)-(Int)(H_FZ)) > - Unsigned((Int)(B_FZ)-(Int)(H_FZ))) { - *pt0 = (CELL)STACK_TO_SBA(pt0); - } else -#endif /* YAPOR_SBA && FROZEN_STACKS */ - INITIALIZE_PERMVAR(pt0, (CELL)pt0); - ENDP(pt0); - GONext(); - ENDOp(); - - Op(put_x_val, xx); - BEGD(d0); - d0 = XREG(PREG->y_u.xx.xl); - XREG(PREG->y_u.xx.xr) = d0; - ENDD(d0); - PREG = NEXTOP(PREG, xx); - GONext(); - ENDOp(); - - Op(put_xx_val, xxxx); - BEGD(d0); - BEGD(d1); - d0 = XREG(PREG->y_u.xxxx.xl1); - d1 = XREG(PREG->y_u.xxxx.xl2); - XREG(PREG->y_u.xxxx.xr1) = d0; - XREG(PREG->y_u.xxxx.xr2) = d1; - ENDD(d1); - ENDD(d0); - PREG = NEXTOP(PREG, xxxx); - GONext(); - ENDOp(); - - Op(put_y_val, yx); - BEGD(d0); - d0 = YREG[PREG->y_u.yx.y]; -#ifdef YAPOR_SBA - if (d0 == 0) /* new variable */ - XREG(PREG->y_u.yx.x) = (CELL)(YREG+PREG->y_u.yx.y); - else -#endif - XREG(PREG->y_u.yx.x) = d0; - ENDD(d0); - PREG = NEXTOP(PREG, yx); - GONext(); - ENDOp(); - - Op(put_y_vals, yyxx); - ALWAYS_START_PREFETCH(yyxx); - BEGD(d0); - d0 = YREG[PREG->y_u.yyxx.y1]; -#ifdef YAPOR_SBA - if (d0 == 0) /* new variable */ - XREG(PREG->y_u.yyxx.x1) = (CELL)(YREG+PREG->y_u.yyxx.y1); - else -#endif - XREG(PREG->y_u.yyxx.x1) = d0; - ENDD(d0); - /* allow for some prefetching */ - PREG = NEXTOP(PREG, yyxx); - BEGD(d1); - d1 = YREG[PREVOP(PREG,yyxx)->y_u.yyxx.y2]; -#ifdef YAPOR_SBA - if (d1 == 0) /* new variable */ - XREG(PREVOP(PREG->y_u.yyxx,yyxx).x2) = (CELL)(YREG+PREG->y_u.yyxx.y2); - else -#endif - XREG(PREVOP(PREG,yyxx)->y_u.yyxx.x2) = d1; - ENDD(d1); - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - ENDOp(); - - Op(put_unsafe, yx); - BEGD(d0); - BEGP(pt0); - pt0 = YREG+PREG->y_u.yx.y; - d0 = *pt0; - deref_head(d0, punsafe_unk); - punsafe_nonvar: - XREG(PREG->y_u.yx.x) = d0; - PREG = NEXTOP(PREG, yx); - GONext(); - - derefa_body(d0, pt0, punsafe_unk, punsafe_nonvar); - /* d0 is a variable, check whether we need to globalise it */ - if (pt0 <= HR || pt0 >= YREG) { - /* variable is safe */ - XREG(PREG->y_u.yx.x) = Unsigned(pt0); - PREG = NEXTOP(PREG, yx); - GONext(); - } - else { - /* create a new Heap variable and bind our variable to it */ - Bind_Local(pt0, Unsigned(HR)); - XREG(PREG->y_u.yx.x) = (CELL) HR; - RESET_VARIABLE(HR); - HR++; - PREG = NEXTOP(PREG, yx); - GONext(); - } - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(put_atom, xc); - BEGD(d0); - d0 = PREG->y_u.xc.c; - XREG(PREG->y_u.xc.x) = d0; - PREG = NEXTOP(PREG, xc); - GONext(); - ENDD(d0); - ENDOp(); - - Op(put_dbterm, xD); - BEGD(d0); - d0 = PREG->y_u.xD.D; - XREG(PREG->y_u.xD.x) = d0; - PREG = NEXTOP(PREG, xD); - GONext(); - ENDD(d0); - ENDOp(); - - Op(put_bigint, xN); - BEGD(d0); - d0 = PREG->y_u.xN.b; - XREG(PREG->y_u.xN.x) = d0; - PREG = NEXTOP(PREG, xN); - GONext(); - ENDD(d0); - ENDOp(); - - Op(put_float, xd); - BEGD(d0); - d0 = AbsAppl(PREG->y_u.xd.d); - XREG(PREG->y_u.xd.x) = d0; - PREG = NEXTOP(PREG, xd); - GONext(); - ENDD(d0); - ENDOp(); - - Op(put_longint, xi); - BEGD(d0); - d0 = AbsAppl(PREG->y_u.xi.i); - XREG(PREG->y_u.xi.x) = d0; - PREG = NEXTOP(PREG, xi); - GONext(); - ENDD(d0); - ENDOp(); - - Op(put_list, x); - CACHE_S(); - READ_IN_S(); - S_SREG = HR; - HR += 2; - BEGD(d0); - d0 = AbsPair(S_SREG); - XREG(PREG->y_u.x.x) = d0; - PREG = NEXTOP(PREG, x); - ENDD(d0); - WRITEBACK_S(S_SREG); - ENDCACHE_S(); - GONext(); - ENDOp(); - - Op(put_struct, xfa); - BEGD(d0); - d0 = AbsAppl(HR); - XREG(PREG->y_u.xfa.x) = d0; - d0 = (CELL) (PREG->y_u.xfa.f); - *HR++ = d0; - SREG = HR; - HR += PREG->y_u.xfa.a; - ENDD(d0); - PREG = NEXTOP(PREG, xfa); - GONext(); - ENDOp(); - - /************************************************************************\ - * Write Instructions * -\************************************************************************/ - - Op(write_x_var, x); - XREG(PREG->y_u.x.x) = Unsigned(SREG); - PREG = NEXTOP(PREG, x); - RESET_VARIABLE(SREG); - SREG++; - GONext(); - ENDOp(); - - Op(write_void, e); - PREG = NEXTOP(PREG, e); - RESET_VARIABLE(SREG); - SREG++; - GONext(); - ENDOp(); - - Op(write_n_voids, s); - BEGD(d0); - d0 = PREG->y_u.s.s; - PREG = NEXTOP(PREG, s); - for (; d0 > 0; d0--) { - RESET_VARIABLE(SREG); - SREG++; - } - ENDD(d0); - GONext(); - ENDOp(); - - Op(write_y_var, y); - INITIALIZE_PERMVAR(YREG+PREG->y_u.y.y,Unsigned(SREG)); - PREG = NEXTOP(PREG, y); - RESET_VARIABLE(SREG); - SREG++; - GONext(); - ENDOp(); - - Op(write_x_val, x); - BEGD(d0); - d0 = XREG(PREG->y_u.x.x); - *SREG++ = d0; - ENDD(d0); - PREG = NEXTOP(PREG, x); - GONext(); - ENDOp(); - - Op(write_x_loc, x); - BEGD(d0); - d0 = XREG(PREG->y_u.x.x); - PREG = NEXTOP(PREG, x); - deref_head(d0, w_x_unk); - w_x_bound: - *SREG++ = d0; - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, w_x_unk, w_x_bound); -#if defined(YAPOR_SBA) && defined(FROZEN_STACKS) - if (pt0 > HR && pt0<(CELL *)B_FZ) { -#else - if (pt0 > HR) { -#endif /* YAPOR_SBA && FROZEN_STACKS */ - /* local variable: let us bind it to the list */ -#ifdef FROZEN_STACKS /* TRAIL */ - Bind_Local(pt0, Unsigned(SREG)); -#else - TRAIL_LOCAL(pt0, Unsigned(SREG)); - *pt0 = Unsigned(SREG); -#endif /* FROZEN_STACKS */ - RESET_VARIABLE(SREG); - SREG++; - GONext(); - } - else { - *SREG++ = Unsigned(pt0); - GONext(); - } - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(write_y_val, y); - BEGD(d0); - d0 = YREG[PREG->y_u.y.y]; -#ifdef YAPOR_SBA - if (d0 == 0) /* new variable */ - *SREG++ = (CELL)(YREG+PREG->y_u.y.y); - else -#endif - *SREG++ = d0; - ENDD(d0); - PREG = NEXTOP(PREG, y); - GONext(); - ENDOp(); - - Op(write_y_loc, y); - BEGD(d0); - BEGP(pt0); - pt0 = YREG+PREG->y_u.y.y; - d0 = *pt0; - deref_head(d0, w_y_unk); - w_y_bound: - PREG = NEXTOP(PREG, y); - *SREG++ = d0; - GONext(); - - derefa_body(d0, pt0, w_y_unk, w_y_bound); - if (pt0 > HR -#if defined(YAPOR_SBA) && defined(FROZEN_STACKS) - && pt0<(CELL *)B_FZ -#endif /* YAPOR_SBA && FROZEN_STACKS */ - ) { - PREG = NEXTOP(PREG, y); - /* local variable: let us bind it to the list */ -#ifdef FROZEN_STACKS - Bind_Local(pt0, Unsigned(SREG)); -#else - *pt0 = Unsigned(SREG); - TRAIL_LOCAL(pt0, Unsigned(SREG)); -#endif /* FROZEN_STACKS */ - RESET_VARIABLE(SREG); - SREG++; - GONext(); - } else { - PREG = NEXTOP(PREG, y); - *SREG++ = Unsigned(pt0); - GONext(); - } - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(write_atom, c); - BEGD(d0); - d0 = PREG->y_u.c.c; - *SREG++ = d0; - ENDD(d0); - PREG = NEXTOP(PREG, c); - GONext(); - ENDOp(); - - Op(write_bigint, N); - BEGD(d0); - d0 = PREG->y_u.N.b; - *SREG++ = d0; - ENDD(d0); - PREG = NEXTOP(PREG, N); - GONext(); - ENDOp(); - - Op(write_dbterm, D); - BEGD(d0); - d0 = PREG->y_u.D.D; - *SREG++ = d0; - ENDD(d0); - PREG = NEXTOP(PREG, D); - GONext(); - ENDOp(); - - Op(write_float, d); - BEGD(d0); - d0 = AbsAppl(PREG->y_u.d.d); - *SREG++ = d0; - ENDD(d0); - PREG = NEXTOP(PREG, d); - GONext(); - ENDOp(); - - Op(write_longint, i); - BEGD(d0); - d0 = AbsAppl(PREG->y_u.i.i); - *SREG++ = d0; - ENDD(d0); - PREG = NEXTOP(PREG, i); - GONext(); - ENDOp(); - - Op(write_n_atoms, sc); - BEGD(d0); - BEGD(d1); - d0 = PREG->y_u.sc.s; - d1 = PREG->y_u.sc.c; - for (; d0 > 0; d0--) - *SREG++ = d1; - ENDD(d1); - ENDD(d0); - PREG = NEXTOP(PREG, sc); - GONext(); - ENDOp(); - - Op(write_list, e); - BEGD(d0); - d0 = AbsPair(HR); - *SREG++ = d0; - /* I will not actually store the mode in the stack */ - SP[-1] = Unsigned(SREG); - SP[-2] = 1; /* Put instructions follow the main stream */ - SP -= 2; - SREG = HR; - HR += 2; - ENDD(d0); - PREG = NEXTOP(PREG, e); - GONext(); - ENDOp(); - - Op(write_l_list, e); - ALWAYS_START_PREFETCH(e); - PREG = NEXTOP(PREG, e); - BEGD(d0); - CACHE_S(); - READ_IN_S(); - d0 = AbsPair(HR); - *S_SREG = d0; - WRITEBACK_S(HR); - HR += 2; - ENDCACHE_S(); - ENDD(d0); - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - ENDOp(); - - Op(write_struct, fa); - BEGD(d0); - d0 = AbsAppl(HR); - *SREG++ = d0; - SP[-1] = Unsigned(SREG); - SP[-2] = 1; /* Put instructions follow the main stream */ - SP -= 2; - d0 = (CELL) (PREG->y_u.fa.f); - *HR++ = d0; - ENDD(d0); - BEGD(d0); - d0 = PREG->y_u.fa.a; - PREG = NEXTOP(PREG, fa); - SREG = HR; - HR += d0; - ENDD(d0); - GONext(); - ENDOp(); - - Op(write_l_struc, fa); - BEGD(d0); - d0 = AbsAppl(HR); - *SREG = d0; - d0 = (CELL) (PREG->y_u.fa.f); - *HR++ = d0; - SREG = HR; - ENDD(d0); - BEGD(d0); - d0 = PREG->y_u.fa.a; - PREG = NEXTOP(PREG, fa); - HR += d0; - ENDD(d0); - GONext(); - ENDOp(); - - /************************************************************************\ - * Save last unified struct or list * -\************************************************************************/ - - /* vitor: I think I should kill these two instructions, by expanding the - * othe instructions. - */ - - Op(save_pair_x, ox); - XREG(PREG->y_u.ox.x) = AbsPair(SREG); - PREG = NEXTOP(PREG, ox); - GONext(); - ENDOp(); - - OpW(save_pair_x_write, ox); - XREG(PREG->y_u.ox.x) = AbsPair(SREG); - PREG = NEXTOP(PREG, ox); - GONextW(); - ENDOpW(); - - Op(save_pair_y, oy); - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,AbsPair(SREG)); - PREG = NEXTOP(PREG, oy); - GONext(); - ENDOp(); - - OpW(save_pair_y_write, oy); - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,AbsPair(SREG)); - PREG = NEXTOP(PREG, oy); - GONextW(); - ENDOpW(); - - Op(save_appl_x, ox); - XREG(PREG->y_u.ox.x) = AbsAppl(SREG - 1); - PREG = NEXTOP(PREG, ox); - GONext(); - ENDOp(); - - OpW(save_appl_x_write, ox); - XREG(PREG->y_u.ox.x) = AbsAppl(SREG - 1); - PREG = NEXTOP(PREG, ox); - GONextW(); - ENDOpW(); - - Op(save_appl_y, oy); - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,AbsAppl(SREG-1)); - PREG = NEXTOP(PREG, oy); - GONext(); - ENDOp(); - - OpW(save_appl_y_write, oy); - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,AbsAppl(SREG-1)); - PREG = NEXTOP(PREG, oy); - GONextW(); - ENDOpW(); - - - /************************************************************************\ - * Instructions for implemeting 'or;' * -\************************************************************************/ - - BOp(jump, l); - PREG = PREG->y_u.l.l; - JMPNext(); - ENDBOp(); - - /* This instruction is called when the previous goal - was interrupted when waking up goals - */ - BOp(move_back, l); - PREG = (yamop *)(((char *)PREG)-(Int)(NEXTOP((yamop *)NULL,Osbpp))); - JMPNext(); - ENDBOp(); - - /* This instruction is called when the previous goal - was interrupted when waking up goals - */ - BOp(skip, l); - PREG = NEXTOP(PREG,l); - JMPNext(); - ENDBOp(); - - Op(either, Osblp); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - low_level_trace(try_or, (PredEntry *)PREG, NULL); - } -#endif -#ifdef COROUTINING - CACHE_Y_AS_ENV(YREG); - check_stack(NoStackEither, HR); - ENDCACHE_Y_AS_ENV(); - either_notest: -#endif - BEGD(d0); - /* Try to preserve the environment */ - d0 = PREG->y_u.Osblp.s; - BEGCHO(pt1); - pt1 = (choiceptr) ((char *) YREG + (yslot) d0); -#ifdef FROZEN_STACKS - { - choiceptr top_b = PROTECT_FROZEN_B(B); -#ifdef YAPOR_SBA - if (pt1 > top_b || pt1 < (choiceptr)HR) pt1 = top_b; -#else - if (pt1 > top_b) pt1 = top_b; -#endif /* YAPOR_SBA */ - } -#else - if (pt1 > B) { - pt1 = B; - } -#endif /* FROZEN_STACKS */ - pt1 = (choiceptr)(((CELL *) pt1)-1); - *(CELL **) pt1 = YREG; - store_yaam_regs_for_either(PREG->y_u.Osblp.l, PREG); - SREG = (CELL *) (B = pt1); -#ifdef YAPOR - SCH_set_load(pt1); -#endif /* YAPOR */ - SET_BB(pt1); - ENDCHO(pt1); - /* skip the current instruction plus the next one */ - PREG = NEXTOP(NEXTOP(PREG, Osblp),l); - GONext(); - ENDD(d0); - -#ifdef COROUTINING - NoStackEither: - PROCESS_INT(interrupt_either, either_notest); -#endif - - ENDOp(); - - Op(or_else, Osblp); - HR = HBREG = PROTECT_FROZEN_H(B); - ENV = B->cp_env; - B->cp_cp = PREG; -#ifdef DEPTH_LIMIT - DEPTH = B->cp_depth; -#endif /* DEPTH_LIMIT */ - SET_BB(PROTECT_FROZEN_B(B)); -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_new_alternative(PREG, PREG->y_u.Osblp.l); - } else -#endif /* YAPOR */ - B->cp_ap = PREG->y_u.Osblp.l; - PREG = NEXTOP(PREG, Osblp); - YREG = (CELL *) B->cp_a1; - GONext(); - ENDOp(); - -#ifdef YAPOR - Op(or_last, Osblp); -#else - Op(or_last, p); -#endif /* YAPOR */ - BEGCHO(pt0); - pt0 = B; -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - HR = HBREG = PROTECT_FROZEN_H(pt0); - YREG = (CELL *) pt0->cp_a1; - ENV = pt0->cp_env; -#ifdef DEPTH_LIMIT - DEPTH = pt0->cp_depth; -#endif /* DEPTH_LIMIT */ - SCH_new_alternative(PREG, NULL); - } - else -#endif /* YAPOR */ - { - B = pt0->cp_b; - HR = PROTECT_FROZEN_H(pt0); - YREG = (CELL *) pt0->cp_a1; - ENV = pt0->cp_env; -#ifdef DEPTH_LIMIT - DEPTH = pt0->cp_depth; -#endif /* DEPTH_LIMIT */ - HBREG = PROTECT_FROZEN_H(B); - } -#ifdef YAPOR - PREG = NEXTOP(PREG, Osblp); -#else - PREG = NEXTOP(PREG, p); -#endif /* YAPOR */ - SET_BB(PROTECT_FROZEN_B(B)); - GONext(); - ENDCHO(pt0); - ENDOp(); - - /************************************************************************\ - * Pop operations * -\************************************************************************/ - - OpRW(pop_n, s); - /* write mode might have been called from read mode */ - BEGD(d0); - d0 = PREG->y_u.os.s; - SP = (CELL *) (((char *) SP) + d0); - ENDD(d0); - BEGD(d0); - d0 = SP[0]; - if (d0) { - START_PREFETCH(s); - SREG = (CELL *) (SP[1]); - SP += 2; - PREG = NEXTOP(PREG, s); - GONext(); - END_PREFETCH(); - } - else { - START_PREFETCH_W(s); - SREG = (CELL *) (SP[1]); - SP += 2; - PREG = NEXTOP(PREG, s); - GONextW(); - END_PREFETCH_W(); - } - ENDD(d0); - ENDOpRW(); - - OpRW(pop, e); - BEGD(d0); - d0 = SP[0]; - SREG = (CELL *) (SP[1]); - SP += 2; - if (d0) { - START_PREFETCH(e); - PREG = NEXTOP(PREG, e); - GONext(); - END_PREFETCH(); - } - else { - START_PREFETCH_W(e); - PREG = NEXTOP(PREG, e); - GONextW(); - END_PREFETCH_W(); - } - ENDD(d0); - ENDOpRW(); - - /************************************************************************\ - * Call C predicates instructions * -\************************************************************************/ - - BOp(call_cpred, Osbpp); - check_trail(TR); - if (!(PREG->y_u.Osbpp.p->PredFlags & (SafePredFlag|NoTracePredFlag|HiddenPredFlag))) { - CACHE_Y_AS_ENV(YREG); - check_stack(NoStackCCall, HR); - ENDCACHE_Y_AS_ENV(); - } - do_c_call: -#ifdef FROZEN_STACKS - { - choiceptr top_b = PROTECT_FROZEN_B(B); - -#ifdef YAPOR_SBA - if (YREG > (CELL *) top_b || YREG < HR) ASP = (CELL *)top_b; -#else - if (YREG > (CELL *) top_b) ASP = (CELL *)top_b; -#endif /* YAPOR_SBA */ - else ASP = (CELL *)(((char *)YREG) + PREG->y_u.Osbpp.s); - } -#else - SET_ASP(YREG, PREG->y_u.Osbpp.s); - /* for slots to work */ -#endif /* FROZEN_STACKS */ -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) - low_level_trace(enter_pred,PREG->y_u.Osbpp.p,XREGS+1); -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - CPredicate f = PREG->y_u.Osbpp.p->cs.f_code; - PREG = NEXTOP(PREG, Osbpp); - saveregs(); - d0 = (f)(PASS_REGS1); - setregs(); -#ifdef SHADOW_S - SREG = Yap_REGS.S_; -#endif - if (!d0) { - FAIL(); - } - CACHE_A1(); - ENDD(d0); - JMPNext(); - - NoStackCCall: - PROCESS_INT(interrupt_call, do_c_call); - - ENDBOp(); - - /* execute Label */ - BOp(execute_cpred, pp); - check_trail(TR); - { - PredEntry *pt0; - - BEGD(d0); - CACHE_Y_AS_ENV(YREG); -#ifndef NO_CHECKING - check_stack(NoStackExecuteC, HR); - do_executec: -#endif -#ifdef FROZEN_STACKS - { - choiceptr top_b = PROTECT_FROZEN_B(B); - -#ifdef YAPOR_SBA - if (YREG > (CELL *) top_b || YREG < HR) ASP = (CELL *)top_b; -#else - if (YREG > (CELL *) top_b) ASP = (CELL *)top_b; -#endif /* YAPOR_SBA */ - else ASP = YREG+E_CB; - } -#else - SET_ASP(YREG, E_CB*sizeof(CELL)); - /* for slots to work */ -#endif /* FROZEN_STACKS */ - pt0 = PREG->y_u.pp.p; -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - low_level_trace(enter_pred,pt0,XREGS+1); - } -#endif /* LOW_LEVEL_TRACE */ - CACHE_A1(); - BEGD(d0); - d0 = (CELL)B; - /* for profiler */ - save_pc(); - ENV_YREG[E_CB] = d0; - ENDD(d0); -#ifdef DEPTH_LIMIT - if (DEPTH <= MkIntTerm(1)) {/* I assume Module==0 is prolog */ - if (pt0->ModuleOfPred) { - if (DEPTH == MkIntTerm(0)) - FAIL(); - else DEPTH = RESET_DEPTH(); - } - } else if (pt0->ModuleOfPred) { - DEPTH -= MkIntConstant(2); - } -#endif /* DEPTH_LIMIT */ - /* now call C-Code */ - { - CPredicate f = PREG->y_u.pp.p->cs.f_code; - yamop *oldPREG = PREG; - saveregs(); - d0 = (f)(PASS_REGS1); - setregs(); -#ifdef SHADOW_S - SREG = Yap_REGS.S_; -#endif - if (!d0) { - FAIL(); - } - if (oldPREG == PREG) { - /* we did not update PREG */ - /* we can proceed */ - PREG = CPREG; - ENV_YREG = ENV; -#ifdef DEPTH_LIMIT - DEPTH = ENV_YREG[E_DEPTH]; -#endif - WRITEBACK_Y_AS_ENV(); - } else { - /* call the new code */ - CACHE_A1(); - } - } - JMPNext(); - ENDCACHE_Y_AS_ENV(); - ENDD(d0); - } - - NoStackExecuteC: - PROCESS_INT(interrupt_execute, do_executec); - ENDBOp(); - - /* Like previous, the only difference is that we do not */ - /* trust the C-function we are calling and hence we must */ - /* guarantee that *all* machine registers are saved and */ - /* restored */ - BOp(call_usercpred, Osbpp); - CACHE_Y_AS_ENV(YREG); - check_stack(NoStackUserCall, HR); - ENDCACHE_Y_AS_ENV(); - do_user_call: -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - low_level_trace(enter_pred,PREG->y_u.Osbpp.p,XREGS+1); - } -#endif /* LOW_LEVEL_TRACE */ -#ifdef FROZEN_STACKS - { - choiceptr top_b = PROTECT_FROZEN_B(B); -#ifdef YAPOR_SBA - if (YREG > (CELL *) top_b || YREG < HR) ASP = (CELL *) top_b; -#else - if (YREG > (CELL *) top_b) ASP = (CELL *) top_b; -#endif /* YAPOR_SBA */ - else ASP = (CELL *)(((char *)YREG) + PREG->y_u.Osbpp.s); - } -#else - SET_ASP(YREG, PREG->y_u.Osbpp.s); - /* for slots to work */ -#endif /* FROZEN_STACKS */ - { - /* make sure that we can still have access to our old PREG after calling user defined goals and backtracking or failing */ - yamop *savedP; - - LOCAL_PrologMode |= UserCCallMode; - { - PredEntry *p = PREG->y_u.Osbpp.p; - - PREG = NEXTOP(PREG, Osbpp); - savedP = PREG; - saveregs(); - save_machine_regs(); - - SREG = (CELL *) YAP_Execute(p, p->cs.f_code); - } - setregs(); - LOCAL_PrologMode &= ~UserCCallMode; - restore_machine_regs(); - PREG = savedP; - } - if (EX) { - struct DB_TERM *exp = EX; - EX = NULL; - Yap_JumpToEnv(Yap_PopTermFromDB(exp)); - SREG = NULL; - } - if (!SREG) { - FAIL(); - } - /* in case we call Execute */ - YENV = ENV; - YREG = ENV; - JMPNext(); - - NoStackUserCall: - PROCESS_INT(interrupt_call, do_user_call); - - ENDBOp(); - - BOp(call_c_wfail, slp); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - low_level_trace(enter_pred,PREG->y_u.slp.p,XREGS+1); - } -#endif /* LOW_LEVEL_TRACE */ -#ifdef FROZEN_STACKS - { - choiceptr top_b = PROTECT_FROZEN_B(B); -#ifdef YAPOR_SBA - if (YREG > (CELL *) top_b || YREG < HR) ASP = (CELL *) top_b; -#else - if (YREG > (CELL *) top_b) ASP = (CELL *) top_b; -#endif /* YAPOR_SBA */ - else { - BEGD(d0); - d0 = PREG->y_u.slp.s; - ASP = ((CELL *)YREG) + d0; - ENDD(d0); - } - } -#else - if (YREG > (CELL *) B) - ASP = (CELL *) B; - else { - BEGD(d0); - d0 = PREG->y_u.slp.s; - ASP = ((CELL *) YREG) + d0; - ENDD(d0); - } -#endif /* FROZEN_STACKS */ - { - CPredicate f = PREG->y_u.slp.p->cs.f_code; - saveregs(); - SREG = (CELL *)((f)(PASS_REGS1)); - setregs(); - } - if (!SREG) { - /* be careful about error handling */ - if (PREG != FAILCODE) - PREG = PREG->y_u.slp.l; - } else { - PREG = NEXTOP(PREG, slp); - } - CACHE_A1(); - JMPNext(); - ENDBOp(); - - BOp(try_c, OtapFs); -#ifdef YAPOR - CUT_wait_leftmost(); -#endif /* YAPOR */ - CACHE_Y(YREG); - /* Alocate space for the cut_c structure*/ - CUT_C_PUSH(NEXTOP(NEXTOP(PREG,OtapFs),OtapFs),S_YREG); - S_YREG = S_YREG - PREG->y_u.OtapFs.extra; - store_args(PREG->y_u.OtapFs.s); - store_yaam_regs(NEXTOP(PREG, OtapFs), 0); - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - SET_BB(B_YREG); - ENDCACHE_Y(); - - TRYCC: - ASP = (CELL *)B; - { - CPredicate f = (CPredicate)(PREG->y_u.OtapFs.f); - saveregs(); - SREG = (CELL *) ((f) (PASS_REGS1)); - /* This last instruction changes B B*/ - while (POP_CHOICE_POINT(B)){ - cut_c_pop(); - } - setregs(); - } - if (!SREG) { - /* Removes the cut functions from the stack - without executing them because we have fail - and not cuted the predicate*/ - while(POP_CHOICE_POINT(B)) - cut_c_pop(); - FAIL(); - } - if ((CELL *) B == YREG && ASP != (CELL *) B) { - /* as Luis says, the predicate that did the try C might - * have left some data on the stack. We should preserve - * it, unless the builtin also did cut */ - YREG = ASP; - HBREG = PROTECT_FROZEN_H(B); - SET_BB(B); - } - PREG = CPREG; - YREG = ENV; - JMPNext(); - ENDBOp(); - - BOp(retry_c, OtapFs); -#ifdef YAPOR - CUT_wait_leftmost(); -#endif /* YAPOR */ - CACHE_Y(B); - CPREG = B_YREG->cp_cp; - ENV = B_YREG->cp_env; - HR = PROTECT_FROZEN_H(B); -#ifdef DEPTH_LIMIT - DEPTH =B->cp_depth; -#endif - HBREG = HR; - restore_args(PREG->y_u.OtapFs.s); - ENDCACHE_Y(); - goto TRYCC; - ENDBOp(); - - BOp(cut_c, OtapFs); - /*This is a phantom instruction. This is not executed by the WAM*/ -#ifdef DEBUG - /*If WAM executes this instruction, probably there's an error - when we put this instruction, cut_c, after retry_c*/ - printf ("ERROR: Should not print this message FILE: absmi.c %d\n",__LINE__); -#endif /*DEBUG*/ - ENDBOp(); - - BOp(try_userc, OtapFs); -#ifdef YAPOR - CUT_wait_leftmost(); -#endif /* YAPOR */ - CACHE_Y(YREG); - /* Alocate space for the cut_c structure*/ - CUT_C_PUSH(NEXTOP(NEXTOP(PREG,OtapFs),OtapFs),S_YREG); - S_YREG = S_YREG - PREG->y_u.OtapFs.extra; - store_args(PREG->y_u.OtapFs.s); - store_yaam_regs(NEXTOP(PREG, OtapFs), 0); - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif - SET_BB(B_YREG); - ENDCACHE_Y(); - LOCAL_PrologMode |= UserCCallMode; - ASP = YREG; - saveregs(); - save_machine_regs(); - SREG = (CELL *) YAP_ExecuteFirst(PREG->y_u.OtapFs.p, (CPredicate)(PREG->y_u.OtapFs.f)); - EX = NULL; - restore_machine_regs(); - setregs(); - LOCAL_PrologMode &= ~UserCCallMode; - if (!SREG) { - FAIL(); - } - if ((CELL *) B == YREG && ASP != (CELL *) B) { - /* as Luis says, the predicate that did the try C might - * have left some data on the stack. We should preserve - * it, unless the builtin also did cut */ - YREG = ASP; - HBREG = PROTECT_FROZEN_H(B); - } - PREG = CPREG; - YREG = ENV; - CACHE_A1(); - JMPNext(); - ENDBOp(); - - BOp(retry_userc, OtapFs); -#ifdef YAPOR - CUT_wait_leftmost(); -#endif /* YAPOR */ - CACHE_Y(B); - CPREG = B_YREG->cp_cp; - ENV = B_YREG->cp_env; - HR = PROTECT_FROZEN_H(B); -#ifdef DEPTH_LIMIT - DEPTH =B->cp_depth; -#endif - HBREG = HR; - restore_args(PREG->y_u.OtapFs.s); - ENDCACHE_Y(); - - LOCAL_PrologMode |= UserCCallMode; - SET_ASP(YREG, E_CB*sizeof(CELL)); - saveregs(); - save_machine_regs(); - SREG = (CELL *) YAP_ExecuteNext(PREG->y_u.OtapFs.p, (CPredicate)(PREG->y_u.OtapFs.f)); - EX = NULL; - restore_machine_regs(); - setregs(); - LOCAL_PrologMode &= ~UserCCallMode; - if (!SREG) { - /* Removes the cut functions from the stack - without executing them because we have fail - and not cuted the predicate*/ - while(POP_CHOICE_POINT(B)) - cut_c_pop(); - FAIL(); - } - if ((CELL *) B == YREG && ASP != (CELL *) B) { - /* as Luis says, the predicate that did the try C might - * have left some data on the stack. We should preserve - * it, unless the builtin also did cut */ - YREG = ASP; - HBREG = PROTECT_FROZEN_H(B); - } - PREG = CPREG; - YREG = ENV; - CACHE_A1(); - JMPNext(); - ENDBOp(); - - BOp(cut_userc, OtapFs); - /*This is a phantom instruction. This is not executed by the WAM*/ -#ifdef DEBUG - /*If WAM executes this instruction, probably there's an error - when we put this instruction, cut_userc, after retry_userc*/ - printf ("ERROR: Should not print this message FILE: absmi.c %d\n",__LINE__); -#endif /*DEBUG*/ - CACHE_A1(); - JMPNext(); - ENDBOp(); - - - /************************************************************************\ - * support instructions * -\************************************************************************/ - - BOp(lock_pred, e); - { - PredEntry *ap = PredFromDefCode(PREG); - PELOCK(10,ap); - PP = ap; - if (!ap->cs.p_code.NOfClauses) { - UNLOCKPE(11,ap); - FAIL(); - } - /* - we do not lock access to the predicate, - we must take extra care here - */ - if (ap->cs.p_code.NOfClauses > 1 && - !(ap->PredFlags & IndexedPredFlag)) { - /* update ASP before calling IPred */ - SET_ASP(YREG, E_CB*sizeof(CELL)); - saveregs(); - Yap_IPred(ap, 0, CP); - /* IPred can generate errors, it thus must get rid of the lock itself */ - setregs(); - CACHE_A1(); - /* for profiler */ - save_pc(); - } - PREG = ap->cs.p_code.TrueCodeOfPred; - } - JMPNext(); - ENDBOp(); - - BOp(index_pred, e); - { - PredEntry *ap = PredFromDefCode(PREG); -#if defined(YAPOR) || defined(THREADS) - /* - we do not lock access to the predicate, - we must take extra care here - */ - if (!PP) { - PELOCK(11,ap); - } - if (ap->OpcodeOfPred != INDEX_OPCODE) { - /* someone was here before we were */ - if (!PP) { - UNLOCKPE(11,ap); - } - PREG = ap->CodeOfPred; - /* for profiler */ - save_pc(); - JMPNext(); - } -#endif - /* update ASP before calling IPred */ - SET_ASP(YREG, E_CB*sizeof(CELL)); - saveregs(); - Yap_IPred(ap, 0, CP); - /* IPred can generate errors, it thus must get rid of the lock itself */ - setregs(); - CACHE_A1(); - PREG = ap->CodeOfPred; - /* for profiler */ - save_pc(); -#if defined(YAPOR) || defined(THREADS) - if (!PP) -#endif - UNLOCKPE(14,ap); - - } - JMPNext(); - ENDBOp(); - -#if THREADS - BOp(thread_local, e); - { - PredEntry *ap = PredFromDefCode(PREG); - ap = Yap_GetThreadPred(ap PASS_REGS); - PREG = ap->CodeOfPred; - /* for profiler */ - save_pc(); - } - JMPNext(); - ENDBOp(); -#endif - - BOp(expand_index, e); - { - PredEntry *pe = PredFromExpandCode(PREG); - yamop *pt0; - - /* update ASP before calling IPred */ - SET_ASP(YREG, E_CB*sizeof(CELL)); -#if defined(YAPOR) || defined(THREADS) - if (!PP) { - PELOCK(12,pe); - } - if (!same_lu_block(PREG_ADDR, PREG)) { - PREG = *PREG_ADDR; - if (!PP) { - UNLOCKPE(15,pe); - } - JMPNext(); - } -#endif -#ifdef SHADOW_S - S = SREG; -#endif /* SHADOW_S */ - saveregs(); - pt0 = Yap_ExpandIndex(pe, 0); - /* restart index */ - setregs(); -#ifdef SHADOW_S - SREG = S; -#endif /* SHADOW_S */ - PREG = pt0; -#if defined(YAPOR) || defined(THREADS) - if (!PP) { - UNLOCKPE(12,pe); - } -#endif - JMPNext(); - } - ENDBOp(); - - BOp(expand_clauses, sssllp); - { - PredEntry *pe = PREG->y_u.sssllp.p; - yamop *pt0; - - /* update ASP before calling IPred */ - SET_ASP(YREG, E_CB*sizeof(CELL)); -#if defined(YAPOR) || defined(THREADS) - if (PP == NULL) { - PELOCK(13,pe); - } - if (!same_lu_block(PREG_ADDR, PREG)) { - PREG = *PREG_ADDR; - if (!PP) { - UNLOCKPE(16,pe); - } - JMPNext(); - } -#endif - saveregs(); - pt0 = Yap_ExpandIndex(pe, 0); - /* restart index */ - setregs(); - PREG = pt0; -#if defined(YAPOR) || defined(THREADS) - if (!PP) { - UNLOCKPE(18,pe); - } -#endif - JMPNext(); - } - ENDBOp(); - - BOp(undef_p, e); - /* save S for module name */ - saveregs(); - undef_goal( PASS_REGS1 ); - setregs(); - /* for profiler */ - CACHE_A1(); - JMPNext(); - ENDBOp(); - - BOp(spy_pred, e); - saveregs(); - spy_goal( PASS_REGS1 ); - setregs(); - CACHE_A1(); - JMPNext(); - ENDBOp(); - - - /************************************************************************\ - * Try / Retry / Trust for main indexing blocks * -\************************************************************************/ - - BOp(try_clause, Otapl); - check_trail(TR); - CACHE_Y(YREG); - /* Point AP to the code that follows this instruction */ - store_at_least_one_arg(PREG->y_u.Otapl.s); - store_yaam_regs(NEXTOP(PREG, Otapl), 0); - PREG = PREG->y_u.Otapl.d; - set_cut(S_YREG, B); - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - SET_BB(B_YREG); - ENDCACHE_Y(); - JMPNext(); - ENDBOp(); - - BOp(try_clause2, l); - check_trail(TR); - CACHE_Y(YREG); - /* Point AP to the code that follows this instruction */ - { - register CELL x2 = ARG2; - register CELL x1 = ARG1; - - store_yaam_regs(NEXTOP(PREG, l), 2); - B_YREG->cp_a1 = x1; - B_YREG->cp_a2 = x2; - } - PREG = PREG->y_u.l.l; - set_cut(S_YREG, B); - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - SET_BB(B_YREG); - ENDCACHE_Y(); - JMPNext(); - ENDBOp(); - - BOp(try_clause3, l); - check_trail(TR); - CACHE_Y(YREG); - /* Point AP to the code that follows this instruction */ - { - store_yaam_regs(NEXTOP(PREG, l), 3); - B_YREG->cp_a1 = ARG1; - B_YREG->cp_a2 = ARG2; - B_YREG->cp_a3 = ARG3; - } - PREG = PREG->y_u.l.l; - set_cut(S_YREG, B); - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - SET_BB(B_YREG); - ENDCACHE_Y(); - JMPNext(); - ENDBOp(); - - BOp(try_clause4, l); - check_trail(TR); - CACHE_Y(YREG); - /* Point AP to the code that follows this instruction */ - { - store_yaam_regs(NEXTOP(PREG, l), 4); - B_YREG->cp_a1 = ARG1; - B_YREG->cp_a2 = ARG2; - B_YREG->cp_a3 = ARG3; - B_YREG->cp_a4 = ARG4; - } - PREG = PREG->y_u.l.l; - set_cut(S_YREG, B); - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - SET_BB(B_YREG); - ENDCACHE_Y(); - JMPNext(); - ENDBOp(); - - BOp(retry, Otapl); - CACHE_Y(B); - restore_yaam_regs(NEXTOP(PREG, Otapl)); - restore_at_least_one_arg(PREG->y_u.Otapl.s); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - ENDCACHE_Y(); - PREG = PREG->y_u.Otapl.d; - JMPNext(); - ENDBOp(); - - BOp(retry2, l); - CACHE_Y(B); - restore_yaam_regs(NEXTOP(PREG, l)); - PREG = PREG->y_u.l.l; - ARG1 = B_YREG->cp_a1; - ARG2 = B_YREG->cp_a2; -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - ENDCACHE_Y(); - JMPNext(); - ENDBOp(); - - BOp(retry3, l); - CACHE_Y(B); - restore_yaam_regs(NEXTOP(PREG, l)); - PREG = PREG->y_u.l.l; - ARG1 = B_YREG->cp_a1; - ARG2 = B_YREG->cp_a2; - ARG3 = B_YREG->cp_a3; -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - ENDCACHE_Y(); - JMPNext(); - ENDBOp(); - - BOp(retry4, l); - CACHE_Y(B); - restore_yaam_regs(NEXTOP(PREG, l)); - PREG = PREG->y_u.l.l; - ARG1 = B_YREG->cp_a1; - ARG2 = B_YREG->cp_a2; - ARG3 = B_YREG->cp_a3; - ARG4 = B_YREG->cp_a4; -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - ENDCACHE_Y(); - JMPNext(); - ENDBOp(); - - BOp(trust, Otapl); - CACHE_Y(B); -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_last_alternative(PREG, B_YREG); - restore_at_least_one_arg(PREG->y_u.Otapl.s); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B->cp_b); - } - else -#endif /* YAPOR */ - { - pop_yaam_regs(); - pop_at_least_one_arg(PREG->y_u.Otapl.s); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B); - } - SET_BB(B_YREG); - ENDCACHE_Y(); - PREG = PREG->y_u.Otapl.d; - JMPNext(); - ENDBOp(); - - BOp(try_in, l); - B->cp_ap = NEXTOP(PREG, l); - PREG = PREG->y_u.l.l; - JMPNext(); - ENDBOp(); - - - - /************************************************************************\ - * Logical Updates * -\************************************************************************/ - - /* enter logical pred */ - BOp(enter_lu_pred, Illss); - check_trail(TR); - /* mark the indexing code */ - { - LogUpdIndex *cl = PREG->y_u.Illss.I; - PredEntry *ap = cl->ClPred; - - if (!cl) { FAIL(); } /* in case the index is empty */ - if (ap->LastCallOfPred != LUCALL_EXEC) { - /* - only increment time stamp if we are working on current time - stamp - */ - if (ap->TimeStampOfPred >= TIMESTAMP_RESET) - Yap_UpdateTimestamps(ap); - ap->TimeStampOfPred++; - ap->LastCallOfPred = LUCALL_EXEC; - /* fprintf(stderr,"R %x--%d--%ul\n",ap,ap->TimeStampOfPred,ap->ArityOfPE);*/ - } - *--YREG = MkIntegerTerm(ap->TimeStampOfPred); - /* fprintf(stderr,"> %p/%p %d %d\n",cl,ap,ap->TimeStampOfPred,PREG->y_u.Illss.s);*/ - PREG = PREG->y_u.Illss.l1; - /* indicate the indexing code is being used */ -#if MULTIPLE_STACKS - /* just store a reference */ - INC_CLREF_COUNT(cl); - TRAIL_CLREF(cl); -#else - if (!(cl->ClFlags & InUseMask)) { - cl->ClFlags |= InUseMask; - TRAIL_CLREF(cl); - } -#endif - } - JMPNext(); - ENDBOp(); - - BOp(try_logical, OtaLl); - check_trail(TR); - { - UInt timestamp; - - CACHE_Y(YREG); - timestamp = IntegerOfTerm(S_YREG[0]); - /* fprintf(stderr,"+ %p/%p %d %d %d--%u\n",PREG,PREG->y_u.OtaLl.d->ClPred,timestamp,PREG->y_u.OtaLl.d->ClPred->TimeStampOfPred,PREG->y_u.OtaLl.d->ClTimeStart,PREG->y_u.OtaLl.d->ClTimeEnd);*/ - /* Point AP to the code that follows this instruction */ - /* always do this, even if we are not going to use it */ - store_args(PREG->y_u.OtaLl.s); - store_yaam_regs(PREG->y_u.OtaLl.n, 0); - set_cut(S_YREG, B); - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ -#ifdef YAPOR - PP = PREG->y_u.OtaLl.d->ClPred; -#endif /* YAPOR */ - if (!VALID_TIMESTAMP(timestamp, PREG->y_u.OtaLl.d)) { - /* jump to next alternative */ - PREG=PREG->y_u.OtaLl.n; - } else { - PREG = PREG->y_u.OtaLl.d->ClCode; - } - SET_BB(B_YREG); - ENDCACHE_Y(); - } - JMPNext(); - ENDBOp(); - - BOp(retry_logical, OtaLl); - check_trail(TR); - { - UInt timestamp; - CACHE_Y(B); - -#if defined(YAPOR) || defined(THREADS) - if (PP != PREG->y_u.OtaLl.d->ClPred) { - if (PP) UNLOCKPE(15,PP); - PP = PREG->y_u.OtaLl.d->ClPred; - PELOCK(15,PP); - } -#endif - timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[PREG->y_u.OtaLl.s]); - /* fprintf(stderr,"^ %p/%p %d %d %d--%u\n",PREG,PREG->y_u.OtaLl.d->ClPred,timestamp,PREG->y_u.OtaLl.d->ClPred->TimeStampOfPred,PREG->y_u.OtaLl.d->ClTimeStart,PREG->y_u.OtaLl.d->ClTimeEnd);*/ - if (!VALID_TIMESTAMP(timestamp, PREG->y_u.OtaLl.d)) { - /* jump to next instruction */ - PREG=PREG->y_u.OtaLl.n; - JMPNext(); - } - restore_yaam_regs(PREG->y_u.OtaLl.n); - restore_at_least_one_arg(PREG->y_u.OtaLl.s); -#ifdef THREADS - PP = PREG->y_u.OtaLl.d->ClPred; -#endif - PREG = PREG->y_u.OtaLl.d->ClCode; -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - ENDCACHE_Y(); - } - JMPNext(); - ENDBOp(); - - BOp(trust_logical, OtILl); - CACHE_Y(B); - { - LogUpdIndex *cl = PREG->y_u.OtILl.block; - PredEntry *ap = cl->ClPred; - LogUpdClause *lcl = PREG->y_u.OtILl.d; - UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); - - /* fprintf(stderr,"- %p/%p %d %d %p\n",PREG,ap,timestamp,ap->TimeStampOfPred,PREG->y_u.OtILl.d->ClCode);*/ -#if defined(YAPOR) || defined(THREADS) - if (PP != ap) { - if (PP) UNLOCKPE(16,PP); - PP = ap; - PELOCK(16,PP); - } -#endif - if (!VALID_TIMESTAMP(timestamp, lcl)) { - /* jump to next alternative */ - PREG = FAILCODE; - } else { - PREG = lcl->ClCode; - } - /* HEY, leave indexing block alone!! */ - /* check if we are the ones using this code */ -#if MULTIPLE_STACKS - DEC_CLREF_COUNT(cl); - /* clear the entry from the trail */ - B->cp_tr--; - TR = B->cp_tr; - /* actually get rid of the code */ - if (cl->ClRefCount == 0 && (cl->ClFlags & (ErasedMask|DirtyMask))) { - if (PREG != FAILCODE) { - if (lcl->ClRefCount == 1) { - /* make sure the clause isn't destroyed */ - /* always add an extra reference */ - INC_CLREF_COUNT(lcl); - TRAIL_CLREF(lcl); - B->cp_tr = TR; - } - } - if (cl->ClFlags & ErasedMask) { - saveregs(); - Yap_ErLogUpdIndex(cl); - setregs(); - } else { - saveregs(); - Yap_CleanUpIndex(cl); - setregs(); - } - save_pc(); - } -#else - if (TrailTerm(B->cp_tr-1) == CLREF_TO_TRENTRY(cl) && - B->cp_tr != B->cp_b->cp_tr) { - cl->ClFlags &= ~InUseMask; - B->cp_tr--; -#if FROZEN_STACKS - if (B->cp_tr > TR_FZ) -#endif - { - TR = B->cp_tr; - } - /* next, recover space for the indexing code if it was erased */ - if (cl->ClFlags & (ErasedMask|DirtyMask)) { - if (PREG != FAILCODE) { - /* make sure we don't erase the clause we are jumping too */ - if (!(lcl->ClFlags & InUseMask)) { - lcl->ClFlags |= InUseMask; - TRAIL_CLREF(lcl); - B->cp_tr = TR; - } - } - if (cl->ClFlags & ErasedMask) { - saveregs(); - Yap_ErLogUpdIndex(cl); - setregs(); - } else { - saveregs(); - Yap_CleanUpIndex(cl); - setregs(); - } - } - } -#endif -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_last_alternative(PREG, B_YREG); - restore_args(ap->ArityOfPE); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#else - S_YREG++; -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B->cp_b); - } else -#endif /* YAPOR */ - { - pop_yaam_regs(); - pop_args(ap->ArityOfPE); - S_YREG--; -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B); - } - SET_BB(B_YREG); - ENDCACHE_Y(); -#if defined(YAPOR) || defined(THREADS) - if (PREG == FAILCODE) { - UNLOCKPE(26,PP); - PP = NULL; - } -#endif - JMPNext(); - } - ENDBOp(); - - - /************************************************************************\ - * Indexing in ARG1 * -\************************************************************************/ - - BOp(user_switch, lp); - { - yamop *new = Yap_udi_search(PREG->y_u.lp.p); - if (!new) { - PREG = PREG->y_u.lp.l; - JMPNext(); - } - PREG = new; - JMPNext(); - } - ENDBOp(); - - BOp(switch_on_type, llll); - BEGD(d0); - d0 = CACHED_A1(); - deref_head(d0, swt_unk); - /* nonvar */ - swt_nvar: - if (IsPairTerm(d0)) { - /* pair */ - SREG = RepPair(d0); - copy_jmp_address(PREG->y_u.llll.l1); - PREG = PREG->y_u.llll.l1; - JMPNext(); - } - else if (!IsApplTerm(d0)) { - /* constant */ - copy_jmp_address(PREG->y_u.llll.l2); - PREG = PREG->y_u.llll.l2; - I_R = d0; - JMPNext(); - } - else { - /* appl */ - copy_jmp_address(PREG->y_u.llll.l3); - PREG = PREG->y_u.llll.l3; - SREG = RepAppl(d0); - JMPNext(); - } - - BEGP(pt0); - deref_body(d0, pt0, swt_unk, swt_nvar); - /* variable */ - copy_jmp_address(PREG->y_u.llll.l4); - PREG = PREG->y_u.llll.l4; - JMPNext(); - ENDP(pt0); - ENDD(d0); - ENDBOp(); - - /* specialised case where the arguments may be: - * a list; - * the empty list; - * some other atom; - * a variable; - * - */ - BOp(switch_list_nl, ollll); - ALWAYS_LOOKAHEAD(PREG->y_u.ollll.pop); - BEGD(d0); - d0 = CACHED_A1(); -#if UNIQUE_TAG_FOR_PAIRS - deref_list_head(d0, swlnl_unk_p); - swlnl_list_p: - { -#else - deref_head(d0, swlnl_unk_p); - /* non variable */ - swlnl_nvar_p: - if (__builtin_expect(IsPairTerm(d0),1)) { - /* pair */ -#endif - copy_jmp_address(PREG->y_u.ollll.l1); - PREG = PREG->y_u.ollll.l1; - SREG = RepPair(d0); - ALWAYS_GONext(); - } -#if UNIQUE_TAG_FOR_PAIRS - swlnl_nlist_p: -#endif - if (d0 == TermNil) { - /* empty list */ - PREG = PREG->y_u.ollll.l2; - JMPNext(); - } - else { - /* appl or constant */ - if (IsApplTerm(d0)) { - copy_jmp_address(PREG->y_u.ollll.l3); - PREG = PREG->y_u.ollll.l3; - SREG = RepAppl(d0); - JMPNext(); - } else { - copy_jmp_address(PREG->y_u.ollll.l3); - PREG = PREG->y_u.ollll.l3; - I_R = d0; - JMPNext(); - } - } - - BEGP(pt0); -#if UNIQUE_TAG_FOR_PAIRS - swlnl_unk_p: - deref_list_body(d0, pt0, swlnl_list_p, swlnl_nlist_p); -#else - deref_body(d0, pt0, swlnl_unk_p, swlnl_nvar_p); -#endif - ENDP(pt0); - /* variable */ - copy_jmp_address(PREG->y_u.ollll.l4); - PREG = PREG->y_u.ollll.l4; - JMPNext(); - ENDD(d0); - } - ENDBOp(); - - BOp(switch_on_arg_type, xllll); - BEGD(d0); - d0 = XREG(PREG->y_u.xllll.x); - deref_head(d0, arg_swt_unk); - /* nonvar */ - arg_swt_nvar: - if (IsPairTerm(d0)) { - /* pair */ - copy_jmp_address(PREG->y_u.xllll.l1); - PREG = PREG->y_u.xllll.l1; - SREG = RepPair(d0); - JMPNext(); - } - else if (!IsApplTerm(d0)) { - /* constant */ - copy_jmp_address(PREG->y_u.xllll.l2); - PREG = PREG->y_u.xllll.l2; - I_R = d0; - JMPNext(); - } - else { - /* appl */ - copy_jmp_address(PREG->y_u.xllll.l3); - PREG = PREG->y_u.xllll.l3; - SREG = RepAppl(d0); - JMPNext(); - } - - BEGP(pt0); - deref_body(d0, pt0, arg_swt_unk, arg_swt_nvar); - /* variable */ - copy_jmp_address(PREG->y_u.xllll.l4); - PREG = PREG->y_u.xllll.l4; - JMPNext(); - ENDP(pt0); - ENDD(d0); - ENDBOp(); - - BOp(switch_on_sub_arg_type, sllll); - BEGD(d0); - d0 = SREG[PREG->y_u.sllll.s]; - deref_head(d0, sub_arg_swt_unk); - /* nonvar */ - sub_arg_swt_nvar: - if (IsPairTerm(d0)) { - /* pair */ - copy_jmp_address(PREG->y_u.sllll.l1); - PREG = PREG->y_u.sllll.l1; - SREG = RepPair(d0); - JMPNext(); - } - else if (!IsApplTerm(d0)) { - /* constant */ - copy_jmp_address(PREG->y_u.sllll.l2); - PREG = PREG->y_u.sllll.l2; - I_R = d0; - JMPNext(); - } - else { - /* appl */ - copy_jmp_address(PREG->y_u.sllll.l3); - PREG = PREG->y_u.sllll.l3; - SREG = RepAppl(d0); - JMPNext(); - } - - BEGP(pt0); - deref_body(d0, pt0, sub_arg_swt_unk, sub_arg_swt_nvar); - /* variable */ - copy_jmp_address(PREG->y_u.sllll.l4); - PREG = PREG->y_u.sllll.l4; - JMPNext(); - ENDP(pt0); - ENDD(d0); - ENDBOp(); - - BOp(jump_if_var, l); - BEGD(d0); - d0 = CACHED_A1(); - deref_head(d0, jump_if_unk); - /* non var */ - jump0_if_nonvar: - PREG = NEXTOP(PREG, l); - JMPNext(); - - BEGP(pt0); - deref_body(d0, pt0, jump_if_unk, jump0_if_nonvar); - /* variable */ - copy_jmp_address(PREG->y_u.l.l); - PREG = PREG->y_u.l.l; - ENDP(pt0); - JMPNext(); - ENDD(d0); - ENDBOp(); - - BOp(jump_if_nonvar, xll); - BEGD(d0); - d0 = XREG(PREG->y_u.xll.x); - deref_head(d0, jump2_if_unk); - /* non var */ - jump2_if_nonvar: - copy_jmp_address(PREG->y_u.xll.l1); - PREG = PREG->y_u.xll.l1; - JMPNext(); - - BEGP(pt0); - deref_body(d0, pt0, jump2_if_unk, jump2_if_nonvar); - /* variable */ - PREG = NEXTOP(PREG, xll); - ENDP(pt0); - JMPNext(); - ENDD(d0); - ENDBOp(); - - BOp(if_not_then, clll); - BEGD(d0); - d0 = CACHED_A1(); - deref_head(d0, if_n_unk); - if_n_nvar: - /* not variable */ - if (d0 == PREG->y_u.clll.c) { - /* equal to test value */ - copy_jmp_address(PREG->y_u.clll.l2); - PREG = PREG->y_u.clll.l2; - JMPNext(); - } - else { - /* different from test value */ - /* the case to optimise */ - copy_jmp_address(PREG->y_u.clll.l1); - PREG = PREG->y_u.clll.l1; - JMPNext(); - } - - BEGP(pt0); - deref_body(d0, pt0, if_n_unk, if_n_nvar); - ENDP(pt0); - /* variable */ - copy_jmp_address(PREG->y_u.clll.l3); - PREG = PREG->y_u.clll.l3; - JMPNext(); - ENDD(d0); - ENDBOp(); - - /************************************************************************\ - * Indexing on ARG1 * -\************************************************************************/ - -#define HASH_SHIFT 6 - - BOp(switch_on_func, sssl); - BEGD(d1); - d1 = *SREG++; - /* we use a very simple hash function to find elements in a - * switch table */ - { - CELL - /* first, calculate the mask */ - Mask = (PREG->y_u.sssl.s - 1) << 1, /* next, calculate the hash function */ - hash = d1 >> (HASH_SHIFT - 1) & Mask; - CELL *base; - - base = (CELL *)PREG->y_u.sssl.l; - /* PREG now points at the beginning of the hash table */ - BEGP(pt0); - /* pt0 will always point at the item */ - pt0 = base + hash; - BEGD(d0); - d0 = pt0[0]; - /* a match happens either if we found the value, or if we - * found an empty slot */ - if (d0 == d1 || d0 == 0) { - copy_jmp_addressa(pt0+1); - PREG = (yamop *) (pt0[1]); - JMPNext(); - } - else { - /* ooops, collision, look for other items */ - register CELL d = ((d1 | 1) << 1) & Mask; - - while (1) { - hash = (hash + d) & Mask; - pt0 = base + hash; - d0 = pt0[0]; - if (d0 == d1 || d0 == 0) { - copy_jmp_addressa(pt0+1); - PREG = (yamop *) pt0[1]; - JMPNext(); - } - } - } - ENDD(d0); - ENDP(pt0); - } - ENDD(d1); - ENDBOp(); - - BOp(switch_on_cons, sssl); - BEGD(d1); - d1 = I_R; - /* we use a very simple hash function to find elements in a - * switch table */ - { - CELL - /* first, calculate the mask */ - Mask = (PREG->y_u.sssl.s - 1) << 1, /* next, calculate the hash function */ - hash = d1 >> (HASH_SHIFT - 1) & Mask; - CELL *base; - - base = (CELL *)PREG->y_u.sssl.l; - /* PREG now points at the beginning of the hash table */ - BEGP(pt0); - /* pt0 will always point at the item */ - pt0 = base + hash; - BEGD(d0); - d0 = pt0[0]; - /* a match happens either if we found the value, or if we - * found an empty slot */ - if (d0 == d1 || d0 == 0) { - copy_jmp_addressa(pt0+1); - PREG = (yamop *) (pt0[1]); - JMPNext(); - } - else { - /* ooops, collision, look for other items */ - register CELL d = ((d1 | 1) << 1) & Mask; - - while (1) { - hash = (hash + d) & Mask; - pt0 = base + hash; - d0 = pt0[0]; - if (d0 == d1 || d0 == 0) { - copy_jmp_addressa(pt0+1); - PREG = (yamop *) pt0[1]; - JMPNext(); - } - } - } - ENDD(d0); - ENDP(pt0); - } - ENDD(d1); - ENDBOp(); - - BOp(go_on_func, sssl); - BEGD(d0); - { - CELL *pt = (CELL *)(PREG->y_u.sssl.l); - - d0 = *SREG++; - if (d0 == pt[0]) { - copy_jmp_addressa(pt+1); - PREG = (yamop *) pt[1]; - JMPNext(); - } else { - copy_jmp_addressa(pt+3); - PREG = (yamop *) pt[3]; - JMPNext(); - } - } - ENDD(d0); - ENDBOp(); - - BOp(go_on_cons, sssl); - BEGD(d0); - { - CELL *pt = (CELL *)(PREG->y_u.sssl.l); - - d0 = I_R; - if (d0 == pt[0]) { - copy_jmp_addressa(pt+1); - PREG = (yamop *) pt[1]; - JMPNext(); - } else { - copy_jmp_addressa(pt+3); - PREG = (yamop *) pt[3]; - JMPNext(); - } - } - ENDD(d0); - ENDBOp(); - - BOp(if_func, sssl); - BEGD(d1); - BEGP(pt0); - pt0 = (CELL *) PREG->y_u.sssl.l; - d1 = *SREG++; - while (pt0[0] != d1 && pt0[0] != (CELL)NULL ) { - pt0 += 2; - } - copy_jmp_addressa(pt0+1); - PREG = (yamop *) (pt0[1]); - JMPNext(); - ENDP(pt0); - ENDD(d1); - ENDBOp(); - - BOp(if_cons, sssl); - BEGD(d1); - BEGP(pt0); - pt0 = (CELL *) PREG->y_u.sssl.l; - d1 = I_R; - while (pt0[0] != d1 && pt0[0] != 0L ) { - pt0 += 2; - } - copy_jmp_addressa(pt0+1); - PREG = (yamop *) (pt0[1]); - JMPNext(); - ENDP(pt0); - ENDD(d1); - ENDBOp(); - - Op(index_dbref, e); - PREG = NEXTOP(PREG, e); - I_R = AbsAppl(SREG-1); - GONext(); - ENDOp(); - - Op(index_blob, e); - PREG = NEXTOP(PREG, e); - I_R = Yap_DoubleP_key(SREG); - GONext(); - ENDOp(); - - Op(index_long, e); - PREG = NEXTOP(PREG, e); - I_R = Yap_IntP_key(SREG); - GONext(); - ENDOp(); - - - - /************************************************************************\ - * Native Code Execution * -\************************************************************************/ - - /* native_me */ - BOp(native_me, aFlp); - - if (PREG->y_u.aFlp.n) - EXEC_NATIVE(PREG->y_u.aFlp.n); - else { - PREG->y_u.aFlp.n++; - if (PREG->y_u.aFlp.n == MAX_INVOCATION) - PREG->y_u.aFlp.n = Yapc_Compile(PREG->y_u.aFlp.p); - } - - PREG = NEXTOP(PREG, aFlp); - JMPNext(); - - ENDBOp(); - - - - /************************************************************************\ - * Basic Primitive Predicates * -\************************************************************************/ - - Op(p_atom_x, xl); - BEGD(d0); - d0 = XREG(PREG->y_u.xl.x); - deref_head(d0, atom_x_unk); - atom_x_nvar: - if (IsAtomTerm(d0) && !IsBlob(AtomOfTerm(d0))) { - PREG = NEXTOP(PREG, xl); - GONext(); - } - else { - PREG = PREG->y_u.xl.F; - GONext(); - } - - BEGP(pt0); - deref_body(d0, pt0, atom_x_unk, atom_x_nvar); - PREG = PREG->y_u.xl.F; - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_atom_y, yl); - BEGD(d0); - BEGP(pt0); - pt0 = YREG + PREG->y_u.yl.y; - d0 = *pt0; - deref_head(d0, atom_y_unk); - atom_y_nvar: - if (IsAtomTerm(d0) && !IsBlob(AtomOfTerm(d0))) { - PREG = NEXTOP(PREG, yl); - GONext(); - } - else { - PREG = PREG->y_u.yl.F; - GONext(); - } - - derefa_body(d0, pt0, atom_y_unk, atom_y_nvar); - PREG = PREG->y_u.yl.F; - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_atomic_x, xl); - BEGD(d0); - d0 = XREG(PREG->y_u.xl.x); - deref_head(d0, atomic_x_unk); - atomic_x_nvar: - /* non variable */ - if (IsAtomicTerm(d0)) { - PREG = NEXTOP(PREG, xl); - GONext(); - } - else { - PREG = PREG->y_u.xl.F; - GONext(); - } - - BEGP(pt0); - deref_body(d0, pt0, atomic_x_unk, atomic_x_nvar); - PREG = PREG->y_u.xl.F; - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_atomic_y, yl); - BEGD(d0); - BEGP(pt0); - pt0 = YREG + PREG->y_u.yl.y; - d0 = *pt0; - deref_head(d0, atomic_y_unk); - atomic_y_nvar: - /* non variable */ - if (IsAtomicTerm(d0)) { - PREG = NEXTOP(PREG, yl); - GONext(); - } - else { - PREG = PREG->y_u.yl.F; - GONext(); - } - - derefa_body(d0, pt0, atomic_y_unk, atomic_y_nvar); - PREG = PREG->y_u.yl.F; - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_integer_x, xl); - BEGD(d0); - d0 = XREG(PREG->y_u.xl.x); - deref_head(d0, integer_x_unk); - integer_x_nvar: - /* non variable */ - if (IsIntTerm(d0)) { - PREG = NEXTOP(PREG, xl); - GONext(); - } - if (IsApplTerm(d0)) { - Functor f0 = FunctorOfTerm(d0); - if (IsExtensionFunctor(f0)) { - switch ((CELL)f0) { - case (CELL)FunctorBigInt: - { CELL *pt = RepAppl(d0); - if ( pt[1] != BIG_RATIONAL || pt[1] != BIG_INT ) { - PREG = PREG->y_u.xl.F; - GONext(); - } - } - break; - case (CELL)FunctorLongInt: - PREG = NEXTOP(PREG, xl); - GONext(); - break; - default: - PREG = PREG->y_u.xl.F; - GONext(); - } - } - } - PREG = PREG->y_u.xl.F; - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, integer_x_unk, integer_x_nvar); - PREG = PREG->y_u.xl.F; - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_integer_y, yl); - BEGD(d0); - BEGP(pt0); - pt0 = YREG + PREG->y_u.yl.y; - d0 = *pt0; - deref_head(d0, integer_y_unk); - integer_y_nvar: - /* non variable */ - if (IsIntTerm(d0)) { - PREG = NEXTOP(PREG, yl); - GONext(); - } - if (IsApplTerm(d0)) { - Functor f0 = FunctorOfTerm(d0); - if (IsExtensionFunctor(f0)) { - switch ((CELL)f0) { - case (CELL)FunctorBigInt: - { CELL *pt = RepAppl(d0); - if ( pt[1] != BIG_RATIONAL || pt[1] != BIG_INT ) { - PREG = PREG->y_u.yl.F; - GONext(); - } - } - case (CELL)FunctorLongInt: - PREG = NEXTOP(PREG, yl); - GONext(); - default: - PREG = PREG->y_u.yl.F; - GONext(); - } - } - } - PREG = PREG->y_u.yl.F; - GONext(); - - derefa_body(d0, pt0, integer_y_unk, integer_y_nvar); - PREG = PREG->y_u.yl.F; - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_nonvar_x, xl); - BEGD(d0); - d0 = XREG(PREG->y_u.xl.x); - deref_head(d0, nonvar_x_unk); - nonvar_x_nvar: - PREG = NEXTOP(PREG, xl); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, nonvar_x_unk, nonvar_x_nvar); - PREG = PREG->y_u.xl.F; - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_nonvar_y, yl); - BEGD(d0); - BEGP(pt0); - pt0 = YREG + PREG->y_u.yl.y; - d0 = *pt0; - deref_head(d0, nonvar_y_unk); - nonvar_y_nvar: - PREG = NEXTOP(PREG, yl); - GONext(); - - derefa_body(d0, pt0, nonvar_y_unk, nonvar_y_nvar); - PREG = PREG->y_u.yl.F; - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_number_x, xl); - BEGD(d0); - d0 = XREG(PREG->y_u.xl.x); - deref_head(d0, number_x_unk); - number_x_nvar: - /* non variable */ - if (IsIntTerm(d0)) { - PREG = NEXTOP(PREG, xl); - GONext(); - } - if (IsApplTerm(d0)) { - Functor f0 = FunctorOfTerm(d0); - if (IsExtensionFunctor(f0)) { - switch ((CELL)f0) { - case (CELL)FunctorBigInt: - { CELL *pt = RepAppl(d0); - if ( pt[1] != BIG_RATIONAL || pt[1] != BIG_INT ) { - PREG = PREG->y_u.xl.F; - GONext(); - } - } - case (CELL)FunctorLongInt: - case (CELL)FunctorDouble: - PREG = NEXTOP(PREG, xl); - GONext(); - break; - default: - PREG = PREG->y_u.xl.F; - GONext(); - } - } - } - PREG = PREG->y_u.xl.F; - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, number_x_unk, number_x_nvar); - PREG = PREG->y_u.xl.F; - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_number_y, yl); - BEGD(d0); - BEGP(pt0); - pt0 = YREG + PREG->y_u.yl.y; - d0 = *pt0; - deref_head(d0, number_y_unk); - number_y_nvar: - /* non variable */ - /* non variable */ - if (IsIntTerm(d0)) { - PREG = NEXTOP(PREG, xl); - GONext(); - } - if (IsApplTerm(d0)) { - Functor f0 = FunctorOfTerm(d0); - if (IsExtensionFunctor(f0)) { - switch ((CELL)f0) { - case (CELL)FunctorBigInt: - { CELL *pt = RepAppl(d0); - if ( pt[1] != BIG_RATIONAL || pt[1] != BIG_INT ) { - PREG = PREG->y_u.yl.F; - GONext(); - } - } - break; - case (CELL)FunctorLongInt: - case (CELL)FunctorDouble: - PREG = NEXTOP(PREG, yl); - GONext(); - break; - default: - PREG = PREG->y_u.yl.F; - GONext(); - } - } - } - PREG = PREG->y_u.yl.F; - GONext(); - - derefa_body(d0, pt0, number_y_unk, number_y_nvar); - PREG = PREG->y_u.yl.F; - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_var_x, xl); - BEGD(d0); - d0 = XREG(PREG->y_u.xl.x); - deref_head(d0, var_x_unk); - var_x_nvar: - /* non variable */ - PREG = PREG->y_u.xl.F; - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, var_x_unk, var_x_nvar); - PREG = NEXTOP(PREG, xl); - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_var_y, yl); - BEGD(d0); - BEGP(pt0); - pt0 = YREG + PREG->y_u.yl.y; - d0 = *pt0; - deref_head(d0, var_y_unk); - var_y_nvar: - /* non variable */ - PREG = PREG->y_u.yl.F; - GONext(); - - derefa_body(d0, pt0, var_y_unk, var_y_nvar); - PREG = NEXTOP(PREG, yl); - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_db_ref_x, xl); - BEGD(d0); - d0 = XREG(PREG->y_u.xl.x); - deref_head(d0, dbref_x_unk); - dbref_x_nvar: - /* non variable */ - if (IsDBRefTerm(d0)) { - /* only allow references to the database, not general references - * to go through. */ - PREG = NEXTOP(PREG, xl); - GONext(); - } - else { - PREG = PREG->y_u.xl.F; - GONext(); - } - - BEGP(pt0); - deref_body(d0, pt0, dbref_x_unk, dbref_x_nvar); - PREG = PREG->y_u.xl.F; - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_db_ref_y, yl); - BEGD(d0); - BEGP(pt0); - pt0 = YREG + PREG->y_u.yl.y; - d0 = *pt0; - deref_head(d0, dbref_y_unk); - dbref_y_nvar: - /* non variable */ - if (IsDBRefTerm(d0)) { - /* only allow references to the database, not general references - * to go through. */ - PREG = NEXTOP(PREG, yl); - GONext(); - } - else { - PREG = PREG->y_u.yl.F; - GONext(); - } - - derefa_body(d0, pt0, dbref_y_unk, dbref_y_nvar); - PREG = PREG->y_u.yl.F; - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_primitive_x, xl); - BEGD(d0); - d0 = XREG(PREG->y_u.xl.x); - deref_head(d0, primi_x_unk); - primi_x_nvar: - /* non variable */ - if (IsPrimitiveTerm(d0)) { - PREG = NEXTOP(PREG, xl); - GONext(); - } - else { - PREG = PREG->y_u.xl.F; - GONext(); - } - - BEGP(pt0); - deref_body(d0, pt0, primi_x_unk, primi_x_nvar); - PREG = PREG->y_u.xl.F; - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_primitive_y, yl); - BEGD(d0); - BEGP(pt0); - pt0 = YREG + PREG->y_u.yl.y; - d0 = *pt0; - deref_head(d0, primi_y_unk); - primi_y_nvar: - /* non variable */ - if (IsPrimitiveTerm(d0)) { - PREG = NEXTOP(PREG, yl); - GONext(); - } - else { - PREG = PREG->y_u.yl.F; - GONext(); - } - - derefa_body(d0, pt0, primi_y_unk, primi_y_nvar); - PREG = PREG->y_u.yl.F; - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_compound_x, xl); - BEGD(d0); - d0 = XREG(PREG->y_u.xl.x); - deref_head(d0, compound_x_unk); - compound_x_nvar: - /* non variable */ - if (IsPairTerm(d0)) { - PREG = NEXTOP(PREG, xl); - GONext(); - } - else if (IsApplTerm(d0)) { - if (IsExtensionFunctor(FunctorOfTerm(d0))) { - PREG = PREG->y_u.xl.F; - GONext(); - } - PREG = NEXTOP(PREG, xl); - GONext(); - } - else { - PREG = PREG->y_u.xl.F; - GONext(); - } - - BEGP(pt0); - deref_body(d0, pt0, compound_x_unk, compound_x_nvar); - PREG = PREG->y_u.xl.F; - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_compound_y, yl); - BEGD(d0); - BEGP(pt0); - pt0 = YREG + PREG->y_u.yl.y; - d0 = *pt0; - deref_head(d0, compound_y_unk); - compound_y_nvar: - /* non variable */ - if (IsPairTerm(d0)) { - PREG = NEXTOP(PREG, yl); - GONext(); - } - else if (IsApplTerm(d0)) { - if (IsExtensionFunctor(FunctorOfTerm(d0))) { - PREG = PREG->y_u.yl.F; - GONext(); - } - PREG = NEXTOP(PREG, yl); - GONext(); - } - else { - PREG = PREG->y_u.yl.F; - GONext(); - } - - derefa_body(d0, pt0, compound_y_unk, compound_y_nvar); - PREG = PREG->y_u.yl.F; - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_float_x, xl); - BEGD(d0); - d0 = XREG(PREG->y_u.xl.x); - deref_head(d0, float_x_unk); - float_x_nvar: - /* non variable */ - if (IsFloatTerm(d0)) { - PREG = NEXTOP(PREG, xl); - GONext(); - } - PREG = PREG->y_u.xl.F; - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, float_x_unk, float_x_nvar); - PREG = PREG->y_u.xl.F; - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_float_y, yl); - BEGD(d0); - BEGP(pt0); - pt0 = YREG + PREG->y_u.yl.y; - d0 = *pt0; - deref_head(d0, float_y_unk); - float_y_nvar: - /* non variable */ - if (IsFloatTerm(d0)) { - PREG = NEXTOP(PREG, yl); - GONext(); - } - PREG = PREG->y_u.yl.F; - GONext(); - - derefa_body(d0, pt0, float_y_unk, float_y_nvar); - PREG = PREG->y_u.yl.F; - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_plus_vv, xxx); - BEGD(d0); - BEGD(d1); - d0 = XREG(PREG->y_u.xxx.x1); - /* first check pt1 */ - deref_head(d0, plus_vv_unk); - plus_vv_nvar: - d1 = XREG(PREG->y_u.xxx.x2); - /* next check A2 */ - deref_head(d1, plus_vv_nvar_unk); - plus_vv_nvar_nvar: - /* d0 and d1 are where I want them */ - if (IsIntTerm(d0) && IsIntTerm(d1)) { - d0 = MkIntegerTerm(IntOfTerm(d0) + IntOfTerm(d1)); - } - else { - saveregs(); - d0 = p_plus(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - XREG(PREG->y_u.xxx.x) = d0; - PREG = NEXTOP(PREG, xxx); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, plus_vv_unk, plus_vv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is _+B"); - setregs(); - FAIL(); - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, plus_vv_nvar_unk, plus_vv_nvar_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A+B"); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(p_plus_vc, xxn); - BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); - /* first check pt1 */ - deref_head(d0, plus_vc_unk); - plus_vc_nvar: - { - Int d1 = PREG->y_u.xxn.c; - if (IsIntTerm(d0)) { - d0 = MkIntegerTerm(IntOfTerm(d0) + d1); - } - else { - saveregs(); - d0 = p_plus(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - } - XREG(PREG->y_u.xxn.x) = d0; - PREG = NEXTOP(PREG, xxn); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, plus_vc_unk, plus_vc_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A + " Int_FORMAT, PREG->y_u.xxn.c); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_plus_y_vv, yxx); - BEGD(d0); - BEGD(d1); - d0 = XREG(PREG->y_u.yxx.x1); - /* first check pt1 */ - deref_head(d0, plus_y_vv_unk); - plus_y_vv_nvar: - d1 = XREG(PREG->y_u.xxx.x2); - /* next check A2 */ - deref_head(d1, plus_y_vv_nvar_unk); - plus_y_vv_nvar_nvar: - /* d0 and d1 are where I want them */ - if (IsIntTerm(d0) && IsIntTerm(d1)) { - d0 = MkIntegerTerm(IntOfTerm(d0) + IntOfTerm(d1)); - } - else { - saveregs(); - d0 = p_plus(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - BEGP(pt0); - pt0 = YREG + PREG->y_u.yxx.y; - PREG = NEXTOP(PREG, yxx); - INITIALIZE_PERMVAR(pt0,d0); - ENDP(pt0); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, plus_y_vv_unk, plus_y_vv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A+B"); - setregs(); - FAIL(); - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, plus_y_vv_nvar_unk, plus_y_vv_nvar_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A+B"); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(p_plus_y_vc, yxn); - BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); - /* first check pt1 */ - deref_head(d0, plus_y_vc_unk); - plus_y_vc_nvar: - { - Int d1 = PREG->y_u.yxn.c; - if (IsIntTerm(d0)) { - d0 = MkIntegerTerm(IntOfTerm(d0) + d1); - } - else { - saveregs(); - d0 = p_plus(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - } - BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(PREG, yxn); - INITIALIZE_PERMVAR(pt0,d0); - ENDP(pt0); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, plus_y_vc_unk, plus_y_vc_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A + " Int_FORMAT, PREG->y_u.yxn.c); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_minus_vv, xxx); - BEGD(d0); - BEGD(d1); - d0 = XREG(PREG->y_u.xxx.x1); - /* first check pt1 */ - deref_head(d0, minus_vv_unk); - minus_vv_nvar: - d1 = XREG(PREG->y_u.xxx.x2); - /* next check A2 */ - deref_head(d1, minus_vv_nvar_unk); - minus_vv_nvar_nvar: - /* d0 and d1 are where I want them */ - if (IsIntTerm(d0) && IsIntTerm(d1)) { - d0 = MkIntegerTerm(IntOfTerm(d0) - IntOfTerm(d1)); - } - else { - saveregs(); - d0 = p_minus(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - XREG(PREG->y_u.xxx.x) = d0; - PREG = NEXTOP(PREG, xxx); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, minus_vv_unk, minus_vv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A-B"); - setregs(); - FAIL(); - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, minus_vv_nvar_unk, minus_vv_nvar_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A-B"); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(p_minus_cv, xxn); - BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); - /* first check pt1 */ - deref_head(d0, minus_cv_unk); - minus_cv_nvar: - { - Int d1 = PREG->y_u.xxn.c; - if (IsIntTerm(d0)) { - d0 = MkIntegerTerm(d1 - IntOfTerm(d0)); - } - else { - saveregs(); - d0 = p_minus(MkIntegerTerm(d1),Yap_Eval(d0) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - } - XREG(PREG->y_u.xxn.x) = d0; - PREG = NEXTOP(PREG, xxn); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, minus_cv_unk, minus_cv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "-A", PREG->y_u.xxn.c); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_minus_y_vv, yxx); - BEGD(d0); - BEGD(d1); - d0 = XREG(PREG->y_u.yxx.x1); - /* first check pt1 */ - deref_head(d0, minus_y_vv_unk); - minus_y_vv_nvar: - d1 = XREG(PREG->y_u.xxx.x2); - /* next check A2 */ - deref_head(d1, minus_y_vv_nvar_unk); - minus_y_vv_nvar_nvar: - /* d0 and d1 are where I want them */ - if (IsIntTerm(d0) && IsIntTerm(d1)) { - d0 = MkIntegerTerm(IntOfTerm(d0) - IntOfTerm(d1)); - } - else { - saveregs(); - d0 = p_minus(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - BEGP(pt0); - pt0 = YREG + PREG->y_u.yxx.y; - PREG = NEXTOP(PREG, yxx); - INITIALIZE_PERMVAR(pt0,d0); - ENDP(pt0); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, minus_y_vv_unk, minus_y_vv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A-B"); - setregs(); - FAIL(); - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, minus_y_vv_nvar_unk, minus_y_vv_nvar_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A-B"); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(p_minus_y_cv, yxn); - BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); - /* first check pt1 */ - deref_head(d0, minus_y_cv_unk); - minus_y_cv_nvar: - { - Int d1 = PREG->y_u.yxn.c; - if (IsIntTerm(d0)) { - d0 = MkIntegerTerm(d1 - IntOfTerm(d0)); - } - else { - saveregs(); - d0 = p_minus(MkIntegerTerm(d1), Yap_Eval(d0) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - } - BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(PREG, yxn); - INITIALIZE_PERMVAR(pt0,d0); - ENDP(pt0); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, minus_y_cv_unk, minus_y_cv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "-A", PREG->y_u.yxn.c); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_times_vv, xxx); - BEGD(d0); - BEGD(d1); - d0 = XREG(PREG->y_u.xxx.x1); - /* first check pt1 */ - deref_head(d0, times_vv_unk); - times_vv_nvar: - d1 = XREG(PREG->y_u.xxx.x2); - /* next check A2 */ - deref_head(d1, times_vv_nvar_unk); - times_vv_nvar_nvar: - /* d0 and d1 are where I want them */ - if (IsIntTerm(d0) && IsIntTerm(d1)) { - d0 = times_int(IntOfTerm(d0), IntOfTerm(d1) PASS_REGS); - } - else { - saveregs(); - d0 = p_times(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - XREG(PREG->y_u.xxx.x) = d0; - PREG = NEXTOP(PREG, xxx); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, times_vv_unk, times_vv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A*B"); - setregs(); - FAIL(); - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, times_vv_nvar_unk, times_vv_nvar_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A*B"); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(p_times_vc, xxn); - BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); - /* first check pt1 */ - deref_head(d0, times_vc_unk); - times_vc_nvar: - { - Int d1 = PREG->y_u.xxn.c; - if (IsIntTerm(d0)) { - d0 = times_int(IntOfTerm(d0), d1 PASS_REGS); - } - else { - saveregs(); - d0 = p_times(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - } - XREG(PREG->y_u.xxn.x) = d0; - PREG = NEXTOP(PREG, xxn); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, times_vc_unk, times_vc_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A* " Int_FORMAT, PREG->y_u.xxn.c); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_times_y_vv, yxx); - BEGD(d0); - BEGD(d1); - d0 = XREG(PREG->y_u.yxx.x1); - /* first check pt1 */ - deref_head(d0, times_y_vv_unk); - times_y_vv_nvar: - d1 = XREG(PREG->y_u.xxx.x2); - /* next check A2 */ - deref_head(d1, times_y_vv_nvar_unk); - times_y_vv_nvar_nvar: - /* d0 and d1 are where I want them */ - if (IsIntTerm(d0) && IsIntTerm(d1)) { - d0 = times_int(IntOfTerm(d0), IntOfTerm(d1) PASS_REGS); - } - else { - saveregs(); - d0 = p_times(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - BEGP(pt0); - pt0 = YREG + PREG->y_u.yxx.y; - PREG = NEXTOP(PREG, yxx); - INITIALIZE_PERMVAR(pt0,d0); - ENDP(pt0); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, times_y_vv_unk, times_y_vv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A*B"); - setregs(); - FAIL(); - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, times_y_vv_nvar_unk, times_y_vv_nvar_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A*B"); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(p_times_y_vc, yxn); - BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); - /* first check pt1 */ - deref_head(d0, times_y_vc_unk); - times_y_vc_nvar: - { - Int d1 = PREG->y_u.yxn.c; - if (IsIntTerm(d0)) { - d0 = times_int(IntOfTerm(d0), d1 PASS_REGS); - } - else { - saveregs(); - d0 = p_times(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - } - BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(PREG, yxn); - INITIALIZE_PERMVAR(pt0,d0); - ENDP(pt0); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, times_y_vc_unk, times_y_vc_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A* " Int_FORMAT, PREG->y_u.yxn.c); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_div_vv, xxx); - BEGD(d0); - BEGD(d1); - d0 = XREG(PREG->y_u.xxx.x1); - /* first check pt1 */ - deref_head(d0, div_vv_unk); - div_vv_nvar: - d1 = XREG(PREG->y_u.xxx.x2); - /* next check A2 */ - deref_head(d1, div_vv_nvar_unk); - div_vv_nvar_nvar: - /* d0 and d1 are where I want them */ - if (IsIntTerm(d0) && IsIntTerm(d1)) { - Int div = IntOfTerm(d1); - if (div == 0) { - saveregs(); - Yap_NilError(EVALUATION_ERROR_ZERO_DIVISOR,"// /2"); - setregs(); - FAIL(); - } - d0 = MkIntTerm(IntOfTerm(d0) / div); - } - else { - saveregs(); - d0 = p_div(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - XREG(PREG->y_u.xxx.x) = d0; - PREG = NEXTOP(PREG, xxx); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, div_vv_unk, div_vv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A//B"); - setregs(); - FAIL(); - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, div_vv_nvar_unk, div_vv_nvar_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A//B"); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(p_div_vc, xxn); - BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); - /* first check pt1 */ - deref_head(d0, div_vc_unk); - div_vc_nvar: - { - Int d1 = PREG->y_u.xxn.c; - if (IsIntTerm(d0)) { - d0 = MkIntTerm(IntOfTerm(d0) / d1); - } - else { - saveregs(); - d0 = p_div(Yap_Eval(d0),MkIntegerTerm(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - } - XREG(PREG->y_u.xxn.x) = d0; - PREG = NEXTOP(PREG, xxn); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, div_vc_unk, div_vc_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A//B"); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_div_cv, xxn); - BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); - /* first check pt1 */ - deref_head(d0, div_cv_unk); - div_cv_nvar: - { - Int d1 = PREG->y_u.xxn.c; - if (IsIntTerm(d0)) { - Int div = IntOfTerm(d0); - if (div == 0){ - saveregs(); - Yap_NilError(EVALUATION_ERROR_ZERO_DIVISOR,"// /2"); - setregs(); - FAIL(); - } - d0 = MkIntegerTerm(d1 / div); - } - else { - saveregs(); - d0 = p_div(MkIntegerTerm(d1),Yap_Eval(d0) PASS_REGS); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - } - XREG(PREG->y_u.xxn.x) = d0; - PREG = NEXTOP(PREG, xxn); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, div_cv_unk, div_cv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "// A", PREG->y_u.xxn.c); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_div_y_vv, yxx); - BEGD(d0); - BEGD(d1); - d0 = XREG(PREG->y_u.yxx.x1); - /* first check pt1 */ - deref_head(d0, div_y_vv_unk); - div_y_vv_nvar: - d1 = XREG(PREG->y_u.xxx.x2); - /* next check A2 */ - deref_head(d1, div_y_vv_nvar_unk); - div_y_vv_nvar_nvar: - /* d0 and d1 are where I want them */ - if (IsIntTerm(d0) && IsIntTerm(d1)) { - Int div = IntOfTerm(d1); - if (div == 0) { - saveregs(); - Yap_NilError(EVALUATION_ERROR_ZERO_DIVISOR,"// /2"); - setregs(); - FAIL(); - } - d0 = MkIntTerm(IntOfTerm(d0) / div); - } - else { - saveregs(); - d0 = p_div(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - BEGP(pt0); - pt0 = YREG + PREG->y_u.yxx.y; - PREG = NEXTOP(PREG, yxx); - INITIALIZE_PERMVAR(pt0,d0); - ENDP(pt0); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, div_y_vv_unk, div_y_vv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A//B"); - setregs(); - FAIL(); - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, div_y_vv_nvar_unk, div_y_vv_nvar_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A//B"); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(p_div_y_vc, yxn); - BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); - /* first check pt1 */ - deref_head(d0, div_y_vc_unk); - div_y_vc_nvar: - { - Int d1 = PREG->y_u.yxn.c; - if (IsIntTerm(d0)) { - d0 = MkIntTerm(IntOfTerm(d0)/d1); - } - else { - saveregs(); - d0 = p_div(Yap_Eval(d0),MkIntegerTerm(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - } - BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(PREG, yxn); - INITIALIZE_PERMVAR(pt0,d0); - ENDP(pt0); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, div_y_vc_unk, div_y_vc_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A//B"); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_div_y_cv, yxn); - BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); - /* first check pt1 */ - deref_head(d0, div_y_cv_unk); - div_y_cv_nvar: - { - Int d1 = PREG->y_u.yxn.c; - if (IsIntTerm(d0)) { - Int div = IntOfTerm(d0); - if (div == 0) { - saveregs(); - Yap_NilError(EVALUATION_ERROR_ZERO_DIVISOR,"// /2"); - setregs(); - FAIL(); - } - d0 = MkIntegerTerm(d1 / div); - } - else { - saveregs(); - d0 = p_div(MkIntegerTerm(d1), Yap_Eval(d0) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - } - BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(PREG, yxn); - INITIALIZE_PERMVAR(pt0,d0); - ENDP(pt0); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, div_y_cv_unk, div_y_cv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "// A", PREG->y_u.yxn.c); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - - Op(p_and_vv, xxx); - BEGD(d0); - BEGD(d1); - d0 = XREG(PREG->y_u.xxx.x1); - /* first check pt1 */ - deref_head(d0, and_vv_unk); - and_vv_nvar: - d1 = XREG(PREG->y_u.xxx.x2); - /* next check A2 */ - deref_head(d1, and_vv_nvar_unk); - and_vv_nvar_nvar: - /* d0 and d1 are where I want them */ - if (IsIntTerm(d0) && IsIntTerm(d1)) { - d0 = MkIntegerTerm(IntOfTerm(d0) & IntOfTerm(d1)); - } - else { - saveregs(); - d0 = p_and(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - XREG(PREG->y_u.xxx.x) = d0; - PREG = NEXTOP(PREG, xxx); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, and_vv_unk, and_vv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A/\\B"); - setregs(); - FAIL(); - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, and_vv_nvar_unk, and_vv_nvar_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A/\\B"); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(p_and_vc, xxn); - BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); - /* first check pt1 */ - deref_head(d0, and_vc_unk); - and_vc_nvar: - { - Int d1 = PREG->y_u.xxn.c; - if (IsIntTerm(d0)) { - d0 = MkIntegerTerm(IntOfTerm(d0) & d1); - } - else { - saveregs(); - d0 = p_and(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - } - XREG(PREG->y_u.xxn.x) = d0; - PREG = NEXTOP(PREG, xxn); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, and_vc_unk, and_vc_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A /\\ " Int_FORMAT , PREG->y_u.xxn.c); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_and_y_vv, yxx); - BEGD(d0); - BEGD(d1); - d0 = XREG(PREG->y_u.yxx.x1); - /* first check pt1 */ - deref_head(d0, and_y_vv_unk); - and_y_vv_nvar: - d1 = XREG(PREG->y_u.xxx.x2); - /* next check A2 */ - deref_head(d1, and_y_vv_nvar_unk); - and_y_vv_nvar_nvar: - /* d0 and d1 are where I want them */ - if (IsIntTerm(d0) && IsIntTerm(d1)) { - d0 = MkIntegerTerm(IntOfTerm(d0) & IntOfTerm(d1)); - } - else { - saveregs(); - d0 = p_and(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - BEGP(pt0); - pt0 = YREG + PREG->y_u.yxx.y; - PREG = NEXTOP(PREG, yxx); - INITIALIZE_PERMVAR(pt0,d0); - ENDP(pt0); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, and_y_vv_unk, and_y_vv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A/\\B"); - setregs(); - FAIL(); - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, and_y_vv_nvar_unk, and_y_vv_nvar_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A/\\B"); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(p_and_y_vc, yxn); - BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); - /* first check pt1 */ - deref_head(d0, and_y_vc_unk); - and_y_vc_nvar: - { - Int d1 = PREG->y_u.yxn.c; - if (IsIntTerm(d0)) { - d0 = MkIntegerTerm(IntOfTerm(d0) & d1); - } - else { - saveregs(); - d0 = p_and(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - } - BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(PREG, yxn); - INITIALIZE_PERMVAR(pt0,d0); - ENDP(pt0); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, and_y_vc_unk, and_y_vc_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A /\\ " Int_FORMAT , PREG->y_u.yxn.c); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - - Op(p_or_vv, xxx); - BEGD(d0); - BEGD(d1); - d0 = XREG(PREG->y_u.xxx.x1); - /* first check pt1 */ - deref_head(d0, or_vv_unk); - or_vv_nvar: - d1 = XREG(PREG->y_u.xxx.x2); - /* next check A2 */ - deref_head(d1, or_vv_nvar_unk); - or_vv_nvar_nvar: - /* d0 and d1 are where I want them */ - if (IsIntTerm(d0) && IsIntTerm(d1)) { - d0 = MkIntegerTerm(IntOfTerm(d0) | IntOfTerm(d1)); - } - else { - saveregs(); - d0 = p_or(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - XREG(PREG->y_u.xxx.x) = d0; - PREG = NEXTOP(PREG, xxx); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, or_vv_unk, or_vv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A\\/B"); - setregs(); - FAIL(); - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, or_vv_nvar_unk, or_vv_nvar_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A\\/B"); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(p_or_vc, xxn); - BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); - /* first check pt1 */ - deref_head(d0, or_vc_unk); - or_vc_nvar: - { - Int d1 = PREG->y_u.xxn.c; - if (IsIntTerm(d0)) { - d0 = MkIntegerTerm(IntOfTerm(d0) | d1); - } - else { - saveregs(); - d0 = p_or(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - } - XREG(PREG->y_u.xxn.x) = d0; - PREG = NEXTOP(PREG, xxn); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, or_vc_unk, or_vc_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A \\/ " Int_FORMAT , PREG->y_u.xxn.c); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_or_y_vv, yxx); - BEGD(d0); - BEGD(d1); - d0 = XREG(PREG->y_u.yxx.x1); - /* first check pt1 */ - deref_head(d0, or_y_vv_unk); - or_y_vv_nvar: - d1 = XREG(PREG->y_u.xxx.x2); - /* next check A2 */ - deref_head(d1, or_y_vv_nvar_unk); - or_y_vv_nvar_nvar: - /* d0 and d1 are where I want them */ - if (IsIntTerm(d0) && IsIntTerm(d1)) { - d0 = MkIntegerTerm(IntOfTerm(d0) | IntOfTerm(d1)); - } - else { - saveregs(); - d0 = p_or(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - BEGP(pt0); - pt0 = YREG + PREG->y_u.yxx.y; - PREG = NEXTOP(PREG, yxx); - INITIALIZE_PERMVAR(pt0,d0); - ENDP(pt0); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, or_y_vv_unk, or_y_vv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A\\/B"); - setregs(); - FAIL(); - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, or_y_vv_nvar_unk, or_y_vv_nvar_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A\\/B"); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(p_or_y_vc, yxn); - BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); - /* first check pt1 */ - deref_head(d0, or_y_vc_unk); - or_y_vc_nvar: - { - Int d1 = PREG->y_u.yxn.c; - if (IsIntTerm(d0)) { - d0 = MkIntegerTerm(IntOfTerm(d0) | d1); - } - else { - saveregs(); - d0 = p_or(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - } - BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(PREG, yxn); - INITIALIZE_PERMVAR(pt0,d0); - ENDP(pt0); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, or_y_vc_unk, or_y_vc_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A \\/ " Int_FORMAT , PREG->y_u.yxn.c); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_sll_vv, xxx); - BEGD(d0); - BEGD(d1); - d0 = XREG(PREG->y_u.xxx.x1); - /* first check pt1 */ - deref_head(d0, sll_vv_unk); - sll_vv_nvar: - d1 = XREG(PREG->y_u.xxx.x2); - /* next check A2 */ - deref_head(d1, sll_vv_nvar_unk); - sll_vv_nvar_nvar: - /* d0 and d1 are where I want them */ - if (IsIntTerm(d0) && IsIntTerm(d1)) { - Int i2 = IntOfTerm(d1); - if (i2 < 0) - d0 = MkIntegerTerm(SLR(IntOfTerm(d0), -i2)); - else - d0 = do_sll(IntOfTerm(d0),i2 PASS_REGS); - } - else { - saveregs(); - d0 = p_sll(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); - setregs(); - } - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - XREG(PREG->y_u.xxx.x) = d0; - PREG = NEXTOP(PREG, xxx); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, sll_vv_unk, sll_vv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A<y_u.xxn.xi); - /* first check pt1 */ - deref_head(d0, sll_vc_unk); - sll_vc_nvar: - { - Int d1 = PREG->y_u.xxn.c; - if (IsIntTerm(d0)) { - d0 = do_sll(IntOfTerm(d0), (Int)d1 PASS_REGS); - } - else { - saveregs(); - d0 = p_sll(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); - setregs(); - } - } - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - XREG(PREG->y_u.xxn.x) = d0; - PREG = NEXTOP(PREG, xxn); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, sll_vc_unk, sll_vc_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A<y_u.xxn.xi); - /* first check pt1 */ - deref_head(d0, sll_cv_unk); - sll_cv_nvar: - { - Int d1 = PREG->y_u.xxn.c; - if (IsIntTerm(d0)) { - Int i2 = IntOfTerm(d0); - if (i2 < 0) - d0 = MkIntegerTerm(SLR(d1, -i2)); - else - d0 = do_sll(d1,i2 PASS_REGS); - } - else { - saveregs(); - d0 = p_sll(MkIntegerTerm(d1), Yap_Eval(d0) PASS_REGS); - setregs(); - } - } - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - XREG(PREG->y_u.xxn.x) = d0; - PREG = NEXTOP(PREG, xxn); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, sll_cv_unk, sll_cv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A<y_u.yxx.x1); - /* first check pt1 */ - deref_head(d0, sll_y_vv_unk); - sll_y_vv_nvar: - d1 = XREG(PREG->y_u.xxx.x2); - /* next check A2 */ - deref_head(d1, sll_y_vv_nvar_unk); - sll_y_vv_nvar_nvar: - /* d0 and d1 are where I want them */ - if (IsIntTerm(d0) && IsIntTerm(d1)) { - Int i2 = IntOfTerm(d1); - if (i2 < 0) - d0 = MkIntegerTerm(SLR(IntOfTerm(d0), -i2)); - else - d0 = do_sll(IntOfTerm(d0),i2 PASS_REGS); - } - else { - saveregs(); - d0 = p_sll(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); - setregs(); - } - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - BEGP(pt0); - pt0 = YREG + PREG->y_u.yxx.y; - PREG = NEXTOP(PREG, yxx); - INITIALIZE_PERMVAR(pt0,d0); - ENDP(pt0); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, sll_y_vv_unk, sll_y_vv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A<y_u.yxn.xi); - /* first check pt1 */ - deref_head(d0, sll_y_vc_unk); - sll_y_vc_nvar: - { - Int d1 = PREG->y_u.yxn.c; - if (IsIntTerm(d0)) { - d0 = do_sll(IntOfTerm(d0), Yap_Eval(d1) PASS_REGS); - } - else { - saveregs(); - d0 = p_sll(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); - setregs(); - } - } - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(PREG, yxn); - INITIALIZE_PERMVAR(pt0,d0); - ENDP(pt0); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, sll_y_vc_unk, sll_y_vc_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A<y_u.yxn.xi); - /* first check pt1 */ - deref_head(d0, sll_y_cv_unk); - sll_y_cv_nvar: - { - Int d1 = PREG->y_u.yxn.c; - if (IsIntTerm(d0)) { - Int i2 = IntOfTerm(d0); - if (i2 < 0) - d0 = MkIntegerTerm(SLR(d1, -i2)); - else - d0 = do_sll(d1,i2 PASS_REGS); - } - else { - saveregs(); - d0 = p_sll(MkIntegerTerm(d1), Yap_Eval(0) PASS_REGS); - setregs(); - } - } - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(PREG, yxn); - INITIALIZE_PERMVAR(pt0,d0); - ENDP(pt0); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, sll_y_cv_unk, sll_y_cv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A<y_u.xxx.x1); - /* first check pt1 */ - deref_head(d0, slr_vv_unk); - slr_vv_nvar: - d1 = XREG(PREG->y_u.xxx.x2); - /* next check A2 */ - deref_head(d1, slr_vv_nvar_unk); - slr_vv_nvar_nvar: - /* d0 and d1 are where I want them */ - if (IsIntTerm(d0) && IsIntTerm(d1)) { - Int i2 = IntOfTerm(d1); - if (i2 < 0) - d0 = do_sll(IntOfTerm(d0), -i2 PASS_REGS); - else - d0 = MkIntTerm(SLR(IntOfTerm(d0), i2)); - } - else { - saveregs(); - d0 = p_slr(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); - setregs(); - } - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - XREG(PREG->y_u.xxx.x) = d0; - PREG = NEXTOP(PREG, xxx); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, slr_vv_unk, slr_vv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A>>B"); - setregs(); - FAIL(); - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, slr_vv_nvar_unk, slr_vv_nvar_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A>>B"); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(p_slr_vc, xxn); - BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); - /* first check pt1 */ - deref_head(d0, slr_vc_unk); - slr_vc_nvar: - { - Int d1 = PREG->y_u.xxn.c; - if (IsIntTerm(d0)) { - d0 = MkIntTerm(SLR(IntOfTerm(d0), d1)); - } - else { - saveregs(); - d0 = p_slr(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - } - XREG(PREG->y_u.xxn.x) = d0; - PREG = NEXTOP(PREG, xxn); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, slr_vc_unk, slr_vc_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A>>B"); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_slr_cv, xxn); - BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); - /* first check pt1 */ - deref_head(d0, slr_cv_unk); - slr_cv_nvar: - { - Int d1 = PREG->y_u.xxn.c; - if (IsIntTerm(d0)) { - Int i2 = IntOfTerm(d0); - if (i2 < 0) - d0 = do_sll(d1, -i2 PASS_REGS); - else - d0 = MkIntegerTerm(SLR(d1, i2)); - } - else { - saveregs(); - d0 = p_slr(MkIntegerTerm(d1), Yap_Eval(d0) PASS_REGS); - setregs(); - } - } - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - XREG(PREG->y_u.xxn.x) = d0; - PREG = NEXTOP(PREG, xxn); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, slr_cv_unk, slr_cv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A>>B"); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_slr_y_vv, yxx); - BEGD(d0); - BEGD(d1); - d0 = XREG(PREG->y_u.yxx.x1); - /* first check pt1 */ - deref_head(d0, slr_y_vv_unk); - slr_y_vv_nvar: - d1 = XREG(PREG->y_u.xxx.x2); - /* next check A2 */ - deref_head(d1, slr_y_vv_nvar_unk); - slr_y_vv_nvar_nvar: - /* d0 and d1 are where I want them */ - if (IsIntTerm(d0) && IsIntTerm(d1)) { - Int i2 = IntOfTerm(d1); - if (i2 < 0) - d0 = do_sll(IntOfTerm(d0), -i2 PASS_REGS); - else - d0 = MkIntTerm(SLR(IntOfTerm(d0), i2)); - } - else { - saveregs(); - d0 = p_slr(Yap_Eval(d0), Yap_Eval(d1) PASS_REGS); - setregs(); - } - BEGP(pt0); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - pt0 = YREG + PREG->y_u.yxx.y; - PREG = NEXTOP(PREG, yxx); - INITIALIZE_PERMVAR(pt0,d0); - ENDP(pt0); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, slr_y_vv_unk, slr_y_vv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A>>B"); - setregs(); - FAIL(); - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, slr_y_vv_nvar_unk, slr_y_vv_nvar_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A>>B"); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(p_slr_y_vc, yxn); - BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); - /* first check pt1 */ - deref_head(d0, slr_y_vc_unk); - slr_y_vc_nvar: - { - Int d1 = PREG->y_u.yxn.c; - if (IsIntTerm(d0)) { - d0 = MkIntTerm(SLR(IntOfTerm(d0), d1)); - } - else { - saveregs(); - d0 = p_slr(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - } - BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(PREG, yxn); - INITIALIZE_PERMVAR(pt0,d0); - ENDP(pt0); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, slr_y_vc_unk, slr_y_vc_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A>>B"); - setregs(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_slr_y_cv, yxn); - BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); - /* first check pt1 */ - deref_head(d0, slr_y_cv_unk); - slr_y_cv_nvar: - { - Int d1 = PREG->y_u.yxn.c; - if (IsIntTerm(d0)) { - Int i2 = IntOfTerm(d0); - if (i2 < 0) - d0 = do_sll(d1, -i2 PASS_REGS); - else - d0 = MkIntegerTerm(SLR(d1, i2)); - } - else { - saveregs(); - d0 = p_slr(MkIntegerTerm(d1), Yap_Eval(d0) PASS_REGS); - setregs(); - } - } - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(PREG, yxn); - INITIALIZE_PERMVAR(pt0,d0); - ENDP(pt0); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, slr_y_cv_unk, slr_y_cv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A>>B"); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - BOp(call_bfunc_xx, plxxs); - BEGD(d0); - BEGD(d1); - d0 = XREG(PREG->y_u.plxxs.x1); - call_bfunc_xx_nvar: - d1 = XREG(PREG->y_u.plxxs.x2); - call_bfunc_xx2_nvar: - deref_head(d0, call_bfunc_xx_unk); - deref_head(d1, call_bfunc_xx2_unk); - if (IsIntTerm(d0) && IsIntTerm(d1)) { - COUNT flags; - - Int v = IntOfTerm(d0) - IntOfTerm(d1); - flags = PREG->y_u.plxxs.flags; - if (v > 0) { - if (flags & GT_OK_IN_CMP) { - yamop *nextp = NEXTOP(PREG, plxxs); - ALWAYS_LOOKAHEAD(nextp->opc); - PREG = nextp; - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - } else { - yamop *nextp = PREG->y_u.plxxs.f; - ALWAYS_LOOKAHEAD(nextp->opc); - PREG = nextp; - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - } - } else if (v < 0) { - if (flags & LT_OK_IN_CMP) { - yamop *nextp = NEXTOP(PREG, plxxs); - ALWAYS_LOOKAHEAD(nextp->opc); - PREG = nextp; - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - } else { - yamop *nextp = PREG->y_u.plxxs.f; - ALWAYS_LOOKAHEAD(nextp->opc); - PREG = nextp; - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - } - } else /* if (v == 0) */ { - if (flags & EQ_OK_IN_CMP) { - yamop *nextp = NEXTOP(PREG, plxxs); - ALWAYS_LOOKAHEAD(nextp->opc); - PREG = nextp; - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - } else { - yamop *nextp = PREG->y_u.plxxs.f; - ALWAYS_LOOKAHEAD(nextp->opc); - PREG = nextp; - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - } - } - } - exec_bin_cmp_xx: - { - CmpPredicate f = PREG->y_u.plxxs.p->cs.d_code; - saveregs(); - d0 = (CELL) (f) (d0,d1); - setregs(); - } - if (PREG == FAILCODE) { - JMPNext(); - } - if (!d0) { - PREG = PREG->y_u.plxxs.f; - JMPNext(); - } - PREG = NEXTOP(PREG, plxxs); - JMPNext(); - - BEGP(pt0); - deref_body(d0, pt0, call_bfunc_xx_unk, call_bfunc_xx_nvar); - d1 = Deref(d1); - goto exec_bin_cmp_xx; - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, call_bfunc_xx2_unk, call_bfunc_xx2_nvar); - goto exec_bin_cmp_xx; - ENDP(pt0); - - ENDD(d1); - ENDD(d0); - ENDBOp(); - - BOp(call_bfunc_yx, plxys); - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = YREG + PREG->y_u.plxys.y; - d1 = XREG(PREG->y_u.plxys.x); - d0 = *pt0; - ENDP(pt0); - deref_head(d0, call_bfunc_yx_unk); - call_bfunc_yx_nvar: - deref_head(d1, call_bfunc_yx2_unk); - call_bfunc_yx2_nvar: - if (IsIntTerm(d0) && IsIntTerm(d1)) { - int flags; - - Int v = IntOfTerm(d0) - IntOfTerm(d1); - flags = PREG->y_u.plxys.flags; - if (v > 0) { - if (flags & GT_OK_IN_CMP) { - PREG = NEXTOP(PREG, plxys); - JMPNext(); - } else { - PREG = PREG->y_u.plxys.f; - JMPNext(); - } - } else if (v < 0) { - if (flags & LT_OK_IN_CMP) { - PREG = NEXTOP(PREG, plxys); - JMPNext(); - } else { - PREG = PREG->y_u.plxys.f; - JMPNext(); - } - } else /* if (v == 0) */ { - if (flags & EQ_OK_IN_CMP) { - PREG = NEXTOP(PREG, plxys); - JMPNext(); - } else { - PREG = PREG->y_u.plxys.f; - JMPNext(); - } - } - } - exec_bin_cmp_yx: - { - CmpPredicate f = PREG->y_u.plxys.p->cs.d_code; - saveregs(); - d0 = (CELL) (f) (d0,d1); - setregs(); - } - if (!d0 || PREG == FAILCODE) { - if (PREG != FAILCODE) - PREG = PREG->y_u.plxys.f; - JMPNext(); - } - PREG = NEXTOP(PREG, plxys); - JMPNext(); - - BEGP(pt0); - deref_body(d0, pt0, call_bfunc_yx_unk, call_bfunc_yx_nvar); - d1 = Deref(d1); - goto exec_bin_cmp_yx; - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, call_bfunc_yx2_unk, call_bfunc_yx2_nvar); - goto exec_bin_cmp_yx; - ENDP(pt0); - - ENDD(d1); - ENDD(d0); - ENDBOp(); - - BOp(call_bfunc_xy, plxys); - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = YREG + PREG->y_u.plxys.y; - d0 = XREG(PREG->y_u.plxys.x); - d1 = *pt0; - ENDP(pt0); - deref_head(d0, call_bfunc_xy_unk); - call_bfunc_xy_nvar: - deref_head(d1, call_bfunc_xy2_unk); - call_bfunc_xy2_nvar: - if (IsIntTerm(d0) && IsIntTerm(d1)) { - int flags; - - Int v = IntOfTerm(d0) - IntOfTerm(d1); - flags = PREG->y_u.plxys.flags; - if (v > 0) { - if (flags & GT_OK_IN_CMP) { - PREG = NEXTOP(PREG, plxys); - JMPNext(); - } else { - PREG = PREG->y_u.plxys.f; - JMPNext(); - } - } else if (v < 0) { - if (flags & LT_OK_IN_CMP) { - PREG = NEXTOP(PREG, plxys); - JMPNext(); - } else { - PREG = PREG->y_u.plxys.f; - JMPNext(); - } - } else /* if (v == 0) */ { - if (flags & EQ_OK_IN_CMP) { - PREG = NEXTOP(PREG, plxys); - JMPNext(); - } else { - PREG = PREG->y_u.plxys.f; - JMPNext(); - } - } - } - exec_bin_cmp_xy: - { - CmpPredicate f = PREG->y_u.plxys.p->cs.d_code; - saveregs(); - d0 = (CELL) (f) (d0,d1); - setregs(); - } - if (!d0 || PREG == FAILCODE) { - if (PREG != FAILCODE) - PREG = PREG->y_u.plxys.f; - JMPNext(); - } - PREG = NEXTOP(PREG, plxys); - JMPNext(); - - BEGP(pt0); - deref_body(d0, pt0, call_bfunc_xy_unk, call_bfunc_xy_nvar); - d1 = Deref(d1); - goto exec_bin_cmp_xy; - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, call_bfunc_xy2_unk, call_bfunc_xy2_nvar); - goto exec_bin_cmp_xy; - ENDP(pt0); - - ENDD(d1); - ENDD(d0); - ENDBOp(); - - BOp(call_bfunc_yy, plyys); - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = YREG + PREG->y_u.plyys.y1; - BEGP(pt1); - pt1 = YREG + PREG->y_u.plyys.y2; - d0 = *pt0; - d1 = *pt1; - ENDP(pt1); - ENDP(pt0); - deref_head(d0, call_bfunc_yy_unk); - call_bfunc_yy_nvar: - deref_head(d1, call_bfunc_yy2_unk); - call_bfunc_yy2_nvar: - if (IsIntTerm(d0) && IsIntTerm(d1)) { - int flags; - - Int v = IntOfTerm(d0) - IntOfTerm(d1); - flags = PREG->y_u.plyys.flags; - if (v > 0) { - if (flags & GT_OK_IN_CMP) { - PREG = NEXTOP(PREG, plyys); - JMPNext(); - } else { - PREG = PREG->y_u.plyys.f; - JMPNext(); - } - } else if (v < 0) { - if (flags & LT_OK_IN_CMP) { - PREG = NEXTOP(PREG, plyys); - JMPNext(); - } else { - PREG = PREG->y_u.plyys.f; - JMPNext(); - } - } else /* if (v == 0) */ { - if (flags & EQ_OK_IN_CMP) { - PREG = NEXTOP(PREG, plyys); - JMPNext(); - } else { - PREG = PREG->y_u.plyys.f; - JMPNext(); - } - } - } - exec_bin_cmp_yy: - { - CmpPredicate f = PREG->y_u.plyys.p->cs.d_code; - saveregs(); - d0 = (CELL) (f) (d0,d1); - setregs(); - } - if (!d0 || PREG == FAILCODE) { - if (PREG != FAILCODE) - PREG = PREG->y_u.plyys.f; - JMPNext(); - } - PREG = NEXTOP(PREG, plyys); - JMPNext(); - - BEGP(pt0); - deref_body(d0, pt0, call_bfunc_yy_unk, call_bfunc_yy_nvar); - d1 = Deref(d1); - goto exec_bin_cmp_yy; - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, call_bfunc_yy2_unk, call_bfunc_yy2_nvar); - goto exec_bin_cmp_yy; - ENDP(pt0); - - ENDD(d1); - ENDD(d0); - ENDBOp(); - - Op(p_equal, e); - save_hb(); - if (Yap_IUnify(ARG1, ARG2) == false) { - FAIL(); - } - PREG = NEXTOP(PREG, e); - GONext(); - ENDOp(); - - Op(p_dif, l); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorDiff,0)),XREGS+1); -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - BEGD(d1); - d0 = ARG1; - deref_head(d0, dif_unk1); - dif_nvar1: - /* first argument is bound */ - d1 = ARG2; - deref_head(d1, dif_nvar1_unk2); - dif_nvar1_nvar2: - /* both arguments are bound */ - if (d0 == d1) { - PREG = PREG->y_u.l.l; - GONext(); - } - if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { - PREG = NEXTOP(PREG, l); - GONext(); - } - { - Int opresult; -#ifdef COROUTINING - /* - * We may wake up goals during our attempt to unify the - * two terms. If we are adding to the tail of a list of - * woken goals that should be ok, but otherwise we need - * to restore LOCAL_WokenGoals to its previous value. - */ - CELL OldWokenGoals = Yap_ReadTimedVar(LOCAL_WokenGoals); - -#endif - /* We will have to look inside compound terms */ - register tr_fr_ptr pt0; - /* store the old value of TR for clearing bindings */ - pt0 = TR; - BEGCHO(pt1); - pt1 = B; - /* make B and HB point to H to guarantee all bindings will - * be trailed - */ - HBREG = HR; - B = (choiceptr) HR; - B->cp_h = HR; - SET_BB(B); - save_hb(); - opresult = Yap_IUnify(d0, d1); -#ifdef COROUTINING - /* now restore Woken Goals to its old value */ - Yap_UpdateTimedVar(LOCAL_WokenGoals, OldWokenGoals); - if (OldWokenGoals == TermNil) { - Yap_get_signal(YAP_WAKEUP_SIGNAL); - } -#endif - /* restore B */ - B = pt1; - SET_BB(PROTECT_FROZEN_B(pt1)); -#ifdef COROUTINING - HR = HBREG; -#endif - HBREG = B->cp_h; - /* untrail all bindings made by Yap_IUnify */ - while (TR != pt0) { - BEGD(d1); - d1 = TrailTerm(--TR); - if (IsVarTerm(d1)) { -#if defined(YAPOR_SBA) && defined(YAPOR) - /* clean up the trail when we backtrack */ - if (Unsigned((Int)(d1)-(Int)(H_FZ)) > - Unsigned((Int)(B_FZ)-(Int)(H_FZ))) { - RESET_VARIABLE(STACK_TO_SBA(d1)); - } else -#endif - /* normal variable */ - RESET_VARIABLE(d1); -#ifdef MULTI_ASSIGNMENT_VARIABLES - } else /* if (IsApplTerm(d1)) */ { - CELL *pt = RepAppl(d1); - /* AbsAppl means */ - /* multi-assignment variable */ - /* so the next cell is the old value */ -#ifdef FROZEN_STACKS - pt[0] = TrailVal(--TR); -#else - pt[0] = TrailTerm(--TR); - TR--; -#endif /* FROZEN_STACKS */ -#endif /* MULTI_ASSIGNMENT_VARIABLES */ - } - ENDD(d1); - } - if (opresult) { - /* restore B, no need to restore HB */ - PREG = PREG->y_u.l.l; - GONext(); - } - /* restore B, and later HB */ - PREG = NEXTOP(PREG, l); - ENDCHO(pt1); - } - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, dif_unk1, dif_nvar1); - ENDP(pt0); - /* first argument is unbound */ - PREG = PREG->y_u.l.l; - GONext(); - - BEGP(pt0); - deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); - ENDP(pt0); - /* second argument is unbound */ - PREG = PREG->y_u.l.l; - GONext(); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(p_eq, l); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorSame,0)),XREGS+1); -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - BEGD(d1); - d0 = ARG1; - deref_head(d0, p_eq_unk1); - p_eq_nvar1: - /* first argument is bound */ - d1 = ARG2; - deref_head(d1, p_eq_nvar1_unk2); - p_eq_nvar1_nvar2: - /* both arguments are bound */ - if (d0 == d1) { - PREG = NEXTOP(PREG, l); - GONext(); - } - if (IsPairTerm(d0)) { - if (!IsPairTerm(d1)) { - PREG = PREG->y_u.l.l; - GONext(); - } - BEGD(d2); - always_save_pc(); - d2 = iequ_complex(RepPair(d0)-1, RepPair(d0)+1,RepPair(d1)-1); - if (d2 == false) { - PREG = PREG->y_u.l.l; - GONext(); - } - ENDD(d2); - always_set_pc(); - PREG = NEXTOP(PREG, l); - GONext(); - } - if (IsApplTerm(d0)) { - Functor f0 = FunctorOfTerm(d0); - Functor f1; - - /* f1 must be a compound term, even if it is a suspension */ - if (!IsApplTerm(d1)) { - PREG = PREG->y_u.l.l; - GONext(); - } - f1 = FunctorOfTerm(d1); - - /* we now know f1 is true */ - /* deref if a compound term */ - if (IsExtensionFunctor(f0)) { - switch ((CELL)f0) { - case (CELL)FunctorDBRef: - if (d0 == d1) { - PREG = NEXTOP(PREG, l); - GONext(); - } - PREG = PREG->y_u.l.l; - GONext(); - case (CELL)FunctorLongInt: - if (f1 != FunctorLongInt) { - PREG = PREG->y_u.l.l; - GONext(); - } - if (LongIntOfTerm(d0) == LongIntOfTerm(d1)) { - PREG = NEXTOP(PREG, l); - GONext(); - } - PREG = PREG->y_u.l.l; - GONext(); - case (CELL)FunctorString: - if (f1 != FunctorString) { - PREG = PREG->y_u.l.l; - GONext(); - } - if (strcmp((char *)(RepAppl(d0)+2),(char *)(RepAppl(d1)+2)) == 0) { - PREG = NEXTOP(PREG, l); - GONext(); - } - PREG = PREG->y_u.l.l; - GONext(); - break; -#ifdef USE_GMP - case (CELL)FunctorBigInt: - if (f1 != FunctorBigInt) { - PREG = PREG->y_u.l.l; - GONext(); - } - if (Yap_gmp_tcmp_big_big(d0,d1) == 0) { - PREG = NEXTOP(PREG, l); - GONext(); - } - PREG = PREG->y_u.l.l; - GONext(); -#endif - case (CELL)FunctorDouble: - if (f1 != FunctorDouble) { - PREG = PREG->y_u.l.l; - GONext(); - } - if (FloatOfTerm(d0) == FloatOfTerm(d1)) { - PREG = NEXTOP(PREG, l); - GONext(); - } - PREG = PREG->y_u.l.l; - GONext(); - break; - default: - PREG = PREG->y_u.l.l; - GONext(); - } - } - if (f0 != f1) { - PREG = PREG->y_u.l.l; - GONext(); - } - always_save_pc(); - BEGD(d2); - d2 = iequ_complex(RepAppl(d0), RepAppl(d0)+ArityOfFunctor(f0), RepAppl(d1)); - if (d2 == false) { - PREG = PREG->y_u.l.l; - GONext(); - } - ENDD(d2); - always_set_pc(); - PREG = NEXTOP(PREG, l); - GONext(); - } - PREG = PREG->y_u.l.l; - GONext(); - - BEGP(pt0); - deref_body(d1, pt0, p_eq_nvar1_unk2, p_eq_nvar1_nvar2); - ENDP(pt0); - /* first argument is bound */ - /* second argument is unbound */ - /* I don't need to worry about co-routining because an - unbound variable may never be == to a constrained variable!! */ - PREG = PREG->y_u.l.l; - GONext(); - ENDD(d1); - - BEGP(pt0); - deref_body(d0, pt0, p_eq_unk1, p_eq_nvar1); - BEGD(d1); - d1 = ARG2; - deref_head(d1, p_eq_var1_unk2); - p_eq_var1_nvar2: - /* I don't need to worry about co-routining because an - unbound variable may never be == to a constrained variable!! */ - PREG = PREG->y_u.l.l; - GONext(); - - BEGP(pt1); - deref_body(d1, pt1, p_eq_var1_unk2, p_eq_var1_nvar2); - /* first argument is unbound */ - /* second argument is unbound */ - if (pt1 != pt0) { - PREG = PREG->y_u.l.l; - GONext(); - } - PREG = NEXTOP(PREG, l); - GONext(); - ENDP(pt1); - ENDD(d1); - ENDP(pt0); - - ENDD(d0); - ENDOp(); - - Op(p_arg_vv, xxx); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - HR[0] = XREG(PREG->y_u.xxx.x1); - HR[1] = XREG(PREG->y_u.xxx.x2); - RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); - } -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - d0 = XREG(PREG->y_u.xxx.x1); - deref_head(d0, arg_arg1_unk); - arg_arg1_nvar: - /* ARG1 is ok! */ - if (IsIntTerm(d0)) - d0 = IntOfTerm(d0); - else if (IsLongIntTerm(d0)) { - d0 = LongIntOfTerm(d0); - } else { - if (IsBigIntTerm( d0 )) - FAIL(); - saveregs(); - Yap_Error(TYPE_ERROR_INTEGER,d0,"arg 1 of arg/3"); - setregs(); - FAIL(); - } - - /* d0 now got the argument we want */ - BEGD(d1); - d1 = XREG(PREG->y_u.xxx.x2); - deref_head(d1, arg_arg2_unk); - arg_arg2_nvar: - /* d1 now got the structure we want to fetch the argument - * from */ - if (IsApplTerm(d1)) { - BEGP(pt0); - pt0 = RepAppl(d1); - d1 = *pt0; - if (IsExtensionFunctor((Functor) d1)) { - FAIL(); - } - if ((Int)d0 <= 0 || - (Int)d0 > ArityOfFunctor((Functor) d1)) { - /* don't complain here for Prolog compatibility - if ((Int)d0 <= 0) { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, - MkIntegerTerm(d0),"arg 1 of arg/3"); - setregs(); - } - */ - FAIL(); - } - XREG(PREG->y_u.xxx.x) = pt0[d0]; - PREG = NEXTOP(PREG, xxx); - GONext(); - ENDP(pt0); - } - else if (IsPairTerm(d1)) { - BEGP(pt0); - pt0 = RepPair(d1); - if (d0 != 1 && d0 != 2) { - if ((Int)d0 < 0) { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, - MkIntegerTerm(d0),"arg 1 of arg/3"); - setregs(); - } - FAIL(); - } - XREG(PREG->y_u.xxx.x) = pt0[d0-1]; - PREG = NEXTOP(PREG, xxx); - GONext(); - ENDP(pt0); - } - else { - /* - don't complain here for SWI Prolog compatibility - saveregs(); - Yap_Error(TYPE_ERROR_COMPOUND, d1, "arg 2 of arg/3"); - setregs(); - */ - FAIL(); - } - - BEGP(pt0); - deref_body(d1, pt0, arg_arg2_unk, arg_arg2_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d1,"arg 2 of arg/3");; - setregs(); - ENDP(pt0); - FAIL(); - ENDD(d1); - - BEGP(pt0); - deref_body(d0, pt0, arg_arg1_unk, arg_arg1_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "arg 1 of arg/3");; - setregs(); - ENDP(pt0); - FAIL(); - ENDD(d0); - ENDOp(); - - Op(p_arg_cv, xxn); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - CELL *Ho = HR; - Term t = MkIntegerTerm(PREG->y_u.xxn.c); - HR[0] = t; - HR[1] = XREG(PREG->y_u.xxn.xi); - RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); - HR = Ho; - } -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - d0 = PREG->y_u.xxn.c; - /* d0 now got the argument we want */ - BEGD(d1); - d1 = XREG(PREG->y_u.xxn.xi); - deref_head(d1, arg_arg2_vc_unk); - arg_arg2_vc_nvar: - /* d1 now got the structure we want to fetch the argument - * from */ - if (IsApplTerm(d1)) { - BEGP(pt0); - pt0 = RepAppl(d1); - d1 = *pt0; - if (IsExtensionFunctor((Functor) d1)) { - FAIL(); - } - if ((Int)d0 <= 0 || - (Int)d0 > ArityOfFunctor((Functor) d1)) { - /* don't complain here for Prolog compatibility - if ((Int)d0 <= 0) { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, - MkIntegerTerm(d0),"arg 1 of arg/3"); - setregs(); - } - */ - FAIL(); - } - XREG(PREG->y_u.xxn.x) = pt0[d0]; - PREG = NEXTOP(PREG, xxn); - GONext(); - ENDP(pt0); - } - else if (IsPairTerm(d1)) { - BEGP(pt0); - pt0 = RepPair(d1); - if (d0 != 1 && d0 != 2) { - if ((Int)d0 < 0) { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, - MkIntegerTerm(d0),"arg 1 of arg/3"); - setregs(); - } - FAIL(); - } - XREG(PREG->y_u.xxn.x) = pt0[d0-1]; - PREG = NEXTOP(PREG, xxn); - GONext(); - ENDP(pt0); - } - else { - /* - keep SWI Prolog compatibility, just fail on trying to obtain an argument of a compound term. - saveregs(); - Yap_Error(TYPE_ERROR_COMPOUND, d1, "arg 2 of arg/3"); - setregs(); - */ - FAIL(); - } - - BEGP(pt0); - deref_body(d1, pt0, arg_arg2_vc_unk, arg_arg2_vc_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d1,"arg 2 of arg/3");; - setregs(); - ENDP(pt0); - FAIL(); - ENDD(d1); - - ENDD(d0); - ENDOp(); - - Op(p_arg_y_vv, yxx); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - HR[0] = XREG(PREG->y_u.yxx.x1); - HR[1] = XREG(PREG->y_u.yxx.x2); - HR[2] = YREG[PREG->y_u.yxx.y]; - RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); - } -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - d0 = XREG(PREG->y_u.yxx.x1); - deref_head(d0, arg_y_arg1_unk); - arg_y_arg1_nvar: - /* ARG1 is ok! */ - if (IsIntTerm(d0)) - d0 = IntOfTerm(d0); - else if (IsLongIntTerm(d0)) { - d0 = LongIntOfTerm(d0); - } else { - if (IsBigIntTerm( d0 )) - FAIL(); - saveregs(); - Yap_Error(TYPE_ERROR_INTEGER,d0,"arg 1 of arg/3"); - setregs(); - FAIL(); - } - - /* d0 now got the argument we want */ - BEGD(d1); - d1 = XREG(PREG->y_u.yxx.x2); - deref_head(d1, arg_y_arg2_unk); - arg_y_arg2_nvar: - /* d1 now got the structure we want to fetch the argument - * from */ - if (IsApplTerm(d1)) { - BEGP(pt0); - pt0 = RepAppl(d1); - d1 = *pt0; - if (IsExtensionFunctor((Functor) d1)) { - FAIL(); - } - if ((Int)d0 <= 0 || - (Int)d0 > ArityOfFunctor((Functor) d1)) { - /* don't complain here for Prolog compatibility - if ((Int)d0 <= 0) { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, - MkIntegerTerm(d0),"arg 1 of arg/3"); - saveregs(); - } - */ - FAIL(); - } - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxx.y; - PREG = NEXTOP(PREG, yxx); - INITIALIZE_PERMVAR(pt1,pt0[d0]); - ENDP(pt1); - GONext(); - ENDP(pt0); - } - else if (IsPairTerm(d1)) { - BEGP(pt0); - pt0 = RepPair(d1); - if (d0 != 1 && d0 != 2) { - if ((Int)d0 < 0) { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, - MkIntegerTerm(d0),"arg 1 of arg/3"); - setregs(); - } - FAIL(); - } - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxx.y; - PREG = NEXTOP(PREG, yxx); - INITIALIZE_PERMVAR(pt1,pt0[d0-1]); - GONext(); - ENDP(pt1); - ENDP(pt0); - } - else { - /* - don't complain here for SWI Prolog compatibility - saveregs(); - Yap_Error(TYPE_ERROR_COMPOUND, d1, "arg 2 of arg/3"); - setregs(); - */ - FAIL(); - } - - BEGP(pt0); - deref_body(d1, pt0, arg_y_arg2_unk, arg_y_arg2_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d1,"arg 2 of arg/3");; - setregs(); - ENDP(pt0); - FAIL(); - ENDD(d1); - - BEGP(pt0); - deref_body(d0, pt0, arg_y_arg1_unk, arg_y_arg1_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "arg 1 of arg/3");; - setregs(); - ENDP(pt0); - FAIL(); - ENDD(d0); - ENDOp(); - - Op(p_arg_y_cv, yxn); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - CELL *Ho = HR; - Term t = MkIntegerTerm(PREG->y_u.yxn.c); - HR[0] = t; - HR[1] = XREG(PREG->y_u.yxn.xi); - HR[2] = YREG[PREG->y_u.yxn.y]; - RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); - HR = Ho; - } -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - d0 = PREG->y_u.yxn.c; - /* d0 now got the argument we want */ - BEGD(d1); - d1 = XREG(PREG->y_u.yxn.xi); - deref_head(d1, arg_y_arg2_vc_unk); - arg_y_arg2_vc_nvar: - /* d1 now got the structure we want to fetch the argument - * from */ - if (IsApplTerm(d1)) { - BEGP(pt0); - pt0 = RepAppl(d1); - d1 = *pt0; - if (IsExtensionFunctor((Functor) d1)) { - FAIL(); - } - if ((Int)d0 <= 0 || - (Int)d0 > ArityOfFunctor((Functor) d1)) { - /* don't complain here for Prolog compatibility - if ((Int)d0 <= 0) { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, - MkIntegerTerm(d0),"arg 1 of arg/3"); - setregs(); - } - */ - FAIL(); - } - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(PREG, yxn); - INITIALIZE_PERMVAR(pt1,pt0[d0]); - ENDP(pt1); - GONext(); - ENDP(pt0); - } - else if (IsPairTerm(d1)) { - BEGP(pt0); - pt0 = RepPair(d1); - if (d0 != 1 && d0 != 2) { - if ((Int)d0 < 0) { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, - MkIntegerTerm(d0),"arg 1 of arg/3"); - setregs(); - } - FAIL(); - } - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(PREG, yxn); - INITIALIZE_PERMVAR(pt1,pt0[d0-1]); - ENDP(pt1); - GONext(); - ENDP(pt0); - } - else { - /* - don't complain here for SWI Prolog compatibility - saveregs(); - Yap_Error(TYPE_ERROR_COMPOUND, d1, "arg 2 of arg/3"); - setregs(); - */ - FAIL(); - } - - BEGP(pt0); - deref_body(d1, pt0, arg_y_arg2_vc_unk, arg_y_arg2_vc_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d1,"arg 2 of arg/3");; - setregs(); - ENDP(pt0); - FAIL(); - ENDD(d1); - - ENDD(d0); - ENDOp(); - - Op(p_func2s_vv, xxx); - /* A1 is a variable */ - restart_func2s: -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - RESET_VARIABLE(HR); - HR[1] = XREG(PREG->y_u.xxx.x1); - HR[2] = XREG(PREG->y_u.xxx.x2); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - } -#endif /* LOW_LEVEL_TRACE */ - /* We have to build the structure */ - BEGD(d0); - d0 = XREG(PREG->y_u.xxx.x1); - deref_head(d0, func2s_unk); - func2s_nvar: - /* we do, let's get the third argument */ - BEGD(d1); - d1 = XREG(PREG->y_u.xxx.x2); - deref_head(d1, func2s_unk2); - func2s_nvar2: - /* Uuuff, the second and third argument are bound */ - if (IsIntegerTerm(d1)) - d1 = IntegerOfTerm(d1); - else { - saveregs(); - if (IsBigIntTerm(d1)) { - Yap_Error(RESOURCE_ERROR_STACK, d1, "functor/3"); - } else { - Yap_Error(TYPE_ERROR_INTEGER, d1, "functor/3"); - } - setregs(); - FAIL(); - } - if (!IsAtomicTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - /* We made it!!!!! we got in d0 the name, in d1 the arity and - * in pt0 the variable to bind it to. */ - if (d0 == TermDot && d1 == 2) { - RESET_VARIABLE(HR); - RESET_VARIABLE(HR+1); - d0 = AbsPair(HR); - HR += 2; - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - XREG(PREG->y_u.xxx.x) = d0; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxx),Osbpp),l); - GONext(); - } - else if ((Int)d1 > 0) { - /* now let's build a compound term */ - if (!IsAtomTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - BEGP(pt1); - if (!IsAtomTerm(d0)) { - FAIL(); - } - else - d0 = (CELL) Yap_MkFunctor(AtomOfTerm(d0), (Int) d1); - pt1 = HR; - *pt1++ = d0; - d0 = AbsAppl(HR); - if (pt1+d1 > ENV || pt1+d1 > (CELL *)B) { - /* make sure we have something to show for our trouble */ - saveregs(); - if (!Yap_gcl((1+d1)*sizeof(CELL), 0, YREG, NEXTOP(NEXTOP(PREG,xxx),Osbpp))) { - Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); - setregs(); - JMPNext(); - } else { - setregs(); - } - goto restart_func2s; - } - while ((Int)d1--) { - RESET_VARIABLE(pt1); - pt1++; - } - HR = pt1; - /* done building the term */ - ENDP(pt1); - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - XREG(PREG->y_u.xxx.x) = d0; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxx),Osbpp),l); - GONext(); - } else if ((Int)d1 == 0) { - XREG(PREG->y_u.xxx.x) = d0; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxx),Osbpp),l); - GONext(); - } else { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO,MkIntegerTerm(d1),"functor/3"); - setregs(); - FAIL(); - } - - BEGP(pt1); - deref_body(d1, pt1, func2s_unk2, func2s_nvar2); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d1, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, third argument was unbound */ - FAIL(); - ENDD(d1); - - BEGP(pt1); - deref_body(d0, pt1, func2s_unk, func2s_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, second argument was unbound too */ - FAIL(); - ENDD(d0); - ENDOp(); - - Op(p_func2s_cv, xxc); - /* A1 is a variable */ - restart_func2s_cv: -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - RESET_VARIABLE(HR); - HR[1] = PREG->y_u.xxc.c; - HR[2] = XREG(PREG->y_u.xxc.xi); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - } -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - /* We have to build the structure */ - d0 = PREG->y_u.xxc.c; - /* we do, let's get the third argument */ - BEGD(d1); - d1 = XREG(PREG->y_u.xxc.xi); - deref_head(d1, func2s_unk2_cv); - func2s_nvar2_cv: - /* Uuuff, the second and third argument are bound */ - if (IsIntegerTerm(d1)) - d1 = IntegerOfTerm(d1); - else { - saveregs(); - if (IsBigIntTerm(d1)) { - Yap_Error(RESOURCE_ERROR_STACK, d1, "functor/3"); - } else { - Yap_Error(TYPE_ERROR_INTEGER,d1,"functor/3"); - } - setregs(); - FAIL(); - } - /* We made it!!!!! we got in d0 the name, in d1 the arity and - * in pt0 the variable to bind it to. */ - if (d0 == TermDot && d1 == 2) { - RESET_VARIABLE(HR); - RESET_VARIABLE(HR+1); - d0 = AbsPair(HR); - HR += 2; - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - XREG(PREG->y_u.xxc.x) = d0; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxc),Osbpp),l); - GONext(); - } else if ((Int)d1 > 0) { - /* now let's build a compound term */ - if (!IsAtomTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - BEGP(pt1); - if (!IsAtomTerm(d0)) { - FAIL(); - } - else - d0 = (CELL) Yap_MkFunctor(AtomOfTerm(d0), (Int) d1); - pt1 = HR; - *pt1++ = d0; - d0 = AbsAppl(HR); - if (pt1+d1 > ENV || pt1+d1 > (CELL *)B) { - /* make sure we have something to show for our trouble */ - saveregs(); - if (!Yap_gcl((1+d1)*sizeof(CELL), 0, YREG, NEXTOP(NEXTOP(PREG,xxc),Osbpp))) { - Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); - setregs(); - JMPNext(); - } else { - setregs(); - } - goto restart_func2s_cv; - } - while ((Int)d1--) { - RESET_VARIABLE(pt1); - pt1++; - } - /* done building the term */ - HR = pt1; - ENDP(pt1); - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - XREG(PREG->y_u.xxc.x) = d0; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxc),Osbpp),l); - GONext(); - } else if (d1 == 0) { - XREG(PREG->y_u.xxc.x) = d0; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxc),Osbpp),l); - GONext(); - } else { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO,MkIntegerTerm(d1),"functor/3"); - setregs(); - FAIL(); - } - - BEGP(pt1); - deref_body(d1, pt1, func2s_unk2_cv, func2s_nvar2_cv); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d1, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, third argument was unbound */ - FAIL(); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(p_func2s_vc, xxn); - /* A1 is a variable */ - restart_func2s_vc: -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - Term ti; - CELL *hi = HR; - - ti = MkIntegerTerm(PREG->y_u.xxn.c); - RESET_VARIABLE(HR); - HR[1] = XREG(PREG->y_u.xxn.xi); - HR[2] = ti; - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - HR = hi; - } -#endif /* LOW_LEVEL_TRACE */ - /* We have to build the structure */ - BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); - deref_head(d0, func2s_unk_vc); - func2s_nvar_vc: - BEGD(d1); - d1 = PREG->y_u.xxn.c; - if (!IsAtomicTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - /* We made it!!!!! we got in d0 the name, in d1 the arity and - * in pt0 the variable to bind it to. */ - if (d0 == TermDot && d1 == 2) { - RESET_VARIABLE(HR); - RESET_VARIABLE(HR+1); - d0 = AbsPair(HR); - HR += 2; - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - XREG(PREG->y_u.xxn.x) = d0; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxn),Osbpp),l); - GONext(); - } - /* now let's build a compound term */ - if (d1 == 0) { - XREG(PREG->y_u.xxn.x) = d0; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxn),Osbpp),l); - GONext(); - } - if (!IsAtomTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - BEGP(pt1); - if (!IsAtomTerm(d0)) { - FAIL(); - } - else - d0 = (CELL) Yap_MkFunctor(AtomOfTerm(d0), (Int) d1); - pt1 = HR; - *pt1++ = d0; - d0 = AbsAppl(HR); - if (pt1+d1 > ENV || pt1+d1 > (CELL *)B) { - /* make sure we have something to show for our trouble */ - saveregs(); - if (!Yap_gc(0, YREG, NEXTOP(NEXTOP(PREG,xxn),Osbpp))) { - Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); - setregs(); - JMPNext(); - } else { - setregs(); - } - goto restart_func2s_vc; - } - while ((Int)d1--) { - RESET_VARIABLE(pt1); - pt1++; - } - /* done building the term */ - HR = pt1; - ENDP(pt1); - ENDD(d1); - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - XREG(PREG->y_u.xxn.x) = d0; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxn),Osbpp),l); - GONext(); - - BEGP(pt1); - deref_body(d0, pt1, func2s_unk_vc, func2s_nvar_vc); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, second argument was unbound too */ - FAIL(); - ENDD(d0); - ENDOp(); - - Op(p_func2s_y_vv, yxx); - /* A1 is a variable */ - restart_func2s_y: -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - RESET_VARIABLE(HR); - HR[1] = XREG(PREG->y_u.yxx.x1); - HR[2] = XREG(PREG->y_u.yxx.x2); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - } -#endif /* LOW_LEVEL_TRACE */ - /* We have to build the structure */ - BEGD(d0); - d0 = XREG(PREG->y_u.yxx.x1); - deref_head(d0, func2s_y_unk); - func2s_y_nvar: - /* we do, let's get the third argument */ - BEGD(d1); - d1 = XREG(PREG->y_u.yxx.x2); - deref_head(d1, func2s_y_unk2); - func2s_y_nvar2: - /* Uuuff, the second and third argument are bound */ - if (IsIntegerTerm(d1)) - d1 = IntegerOfTerm(d1); - else { - saveregs(); - if (IsBigIntTerm(d1)) { - Yap_Error(RESOURCE_ERROR_STACK, d1, "functor/3"); - } else { - Yap_Error(TYPE_ERROR_INTEGER,d1,"functor/3"); - } - setregs(); - FAIL(); - } - if (!IsAtomicTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - /* We made it!!!!! we got in d0 the name, in d1 the arity and - * in pt0 the variable to bind it to. */ - if (d0 == TermDot && d1 == 2) { - RESET_VARIABLE(HR); - RESET_VARIABLE(HR+1); - d0 = AbsPair(HR); - HR += 2; - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxx.y; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxx),Osbpp),l); - INITIALIZE_PERMVAR(pt1,d0); - ENDP(pt1); - GONext(); - } else if ((Int)d1 > 0) { - /* now let's build a compound term */ - if (!IsAtomTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - BEGP(pt1); - if (!IsAtomTerm(d0)) { - FAIL(); - } - else - d0 = (CELL) Yap_MkFunctor(AtomOfTerm(d0), (Int) d1); - pt1 = HR; - *pt1++ = d0; - d0 = AbsAppl(HR); - if (pt1+d1 > ENV || pt1+d1 > (CELL *)B) { - /* make sure we have something to show for our trouble */ - saveregs(); - if (!Yap_gcl((1+d1)*sizeof(CELL), 0, YREG, NEXTOP(NEXTOP(PREG,yxx),Osbpp))) { - Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); - setregs(); - JMPNext(); - } else { - setregs(); - } - goto restart_func2s_y; - } - while ((Int)d1--) { - RESET_VARIABLE(pt1); - pt1++; - } - /* done building the term */ - HR = pt1; - ENDP(pt1); - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxx.y; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxx),Osbpp),l); - INITIALIZE_PERMVAR(pt1,d0); - ENDP(pt1); - GONext(); - } else if (d1 == 0) { - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxx.y; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxx),Osbpp),l); - INITIALIZE_PERMVAR(pt1,d0); - ENDP(pt1); - GONext(); - } else { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO,MkIntegerTerm(d1),"functor/3"); - setregs(); - FAIL(); - } - - BEGP(pt1); - deref_body(d1, pt1, func2s_y_unk2, func2s_y_nvar2); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d1, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, third argument was unbound */ - FAIL(); - ENDD(d1); - - BEGP(pt1); - deref_body(d0, pt1, func2s_y_unk, func2s_y_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, second argument was unbound too */ - FAIL(); - ENDD(d0); - ENDOp(); - - Op(p_func2s_y_cv, yxc); - /* A1 is a variable */ - restart_func2s_y_cv: -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - RESET_VARIABLE(HR); - HR[1] = PREG->y_u.yxc.c; - HR[2] = XREG(PREG->y_u.yxc.xi); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - } -#endif /* LOW_LEVEL_TRACE */ - /* We have to build the structure */ - BEGD(d0); - d0 = PREG->y_u.yxc.c; - /* we do, let's get the third argument */ - BEGD(d1); - d1 = XREG(PREG->y_u.yxc.xi); - deref_head(d1, func2s_y_unk_cv); - func2s_y_nvar_cv: - /* Uuuff, the second and third argument are bound */ - if (IsIntegerTerm(d1)) { - d1 = IntegerOfTerm(d1); - } else { - saveregs(); - if (IsBigIntTerm(d1)) { - Yap_Error(RESOURCE_ERROR_STACK, d1, "functor/3"); - } else { - Yap_Error(TYPE_ERROR_INTEGER,d1,"functor/3"); - } - setregs(); - FAIL(); - } - /* We made it!!!!! we got in d0 the name, in d1 the arity and - * in pt0 the variable to bind it to. */ - if (d0 == TermDot && d1 == 2) { - RESET_VARIABLE(HR); - RESET_VARIABLE(HR+1); - d0 = AbsPair(HR); - HR += 2; - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxc.y; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxc),Osbpp),l); - INITIALIZE_PERMVAR(pt1,d0); - ENDP(pt1); - GONext(); - } - else if ((Int)d1 > 0) { - /* now let's build a compound term */ - if (!IsAtomTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - if (!IsAtomTerm(d0)) { - FAIL(); - } - else - d0 = (CELL) Yap_MkFunctor(AtomOfTerm(d0), (Int) d1); - BEGP(pt1); - pt1 = HR; - *pt1++ = d0; - d0 = AbsAppl(HR); - if (pt1+d1 > ENV || pt1+d1 > (CELL *)B) { - /* make sure we have something to show for our trouble */ - saveregs(); - if (!Yap_gcl((1+d1)*sizeof(CELL), 0, YREG, NEXTOP(NEXTOP(PREG,yxc),Osbpp))) { - Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); - setregs(); - JMPNext(); - } else { - setregs(); - } - goto restart_func2s_y_cv; - } - while ((Int)d1--) { - RESET_VARIABLE(pt1); - pt1++; - } - /* done building the term */ - HR = pt1; - ENDP(pt1); - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxc.y; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxc),Osbpp),l); - INITIALIZE_PERMVAR(pt1,d0); - ENDP(pt1); - GONext(); - } else if (d1 == 0) { - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxc.y; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxc),Osbpp),l); - INITIALIZE_PERMVAR(pt1,d0); - ENDP(pt1); - GONext(); - } else { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO,MkIntegerTerm(d1),"functor/3"); - setregs(); - FAIL(); - } - - BEGP(pt1); - deref_body(d1, pt1, func2s_y_unk_cv, func2s_y_nvar_cv); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d1, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, third argument was unbound */ - FAIL(); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(p_func2s_y_vc, yxn); - /* A1 is a variable */ - restart_func2s_y_vc: -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - Term ti; - CELL *hi = HR; - - ti = MkIntegerTerm((Int)(PREG->y_u.yxn.c)); - RESET_VARIABLE(HR); - HR[1] = XREG(PREG->y_u.yxn.xi); - HR[2] = ti; - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - HR = hi; - } -#endif /* LOW_LEVEL_TRACE */ - /* We have to build the structure */ - BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); - deref_head(d0, func2s_y_unk_vc); - func2s_y_nvar_vc: - BEGD(d1); - d1 = PREG->y_u.yxn.c; - if (!IsAtomicTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - /* We made it!!!!! we got in d0 the name, in d1 the arity and - * in pt0 the variable to bind it to. */ - if (d0 == TermDot && d1 == 2) { - RESET_VARIABLE(HR); - RESET_VARIABLE(HR+1); - d0 = AbsPair(HR); - HR += 2; - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxn),Osbpp),l); - INITIALIZE_PERMVAR(pt1,d0); - ENDP(pt1); - GONext(); - } - if (d1 == 0) { - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxn),Osbpp),l); - INITIALIZE_PERMVAR(pt1,d0); - ENDP(pt1); - GONext(); - } - if (!IsAtomTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - /* now let's build a compound term */ - if (!IsAtomTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - BEGP(pt1); - if (!IsAtomTerm(d0)) { - FAIL(); - } - else - d0 = (CELL) Yap_MkFunctor(AtomOfTerm(d0), (Int) d1); - pt1 = HR; - *pt1++ = d0; - d0 = AbsAppl(HR); - if (pt1+d1 > ENV || pt1+d1 > (CELL *)B) { - /* make sure we have something to show for our trouble */ - saveregs(); - if (!Yap_gcl((1+d1)*sizeof(CELL), 0, YREG, NEXTOP(NEXTOP(PREG,yxn),Osbpp))) { - Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); - setregs(); - JMPNext(); - } else { - setregs(); - } - goto restart_func2s_y_vc; - } - while ((Int)d1--) { - RESET_VARIABLE(pt1); - pt1++; - } - /* done building the term */ - HR = pt1; - ENDP(pt1); - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxn),Osbpp),l); - INITIALIZE_PERMVAR(pt1,d0); - ENDP(pt1); - ENDD(d1); - GONext(); - - BEGP(pt1); - deref_body(d0, pt1, func2s_y_unk_vc, func2s_y_nvar_vc); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, second argument was unbound too */ - FAIL(); - ENDD(d0); - ENDOp(); - - Op(p_func2f_xx, xxx); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - HR[0] = XREG(PREG->y_u.xxx.x); - RESET_VARIABLE(HR+1); - RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - } -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - d0 = XREG(PREG->y_u.xxx.x); - deref_head(d0, func2f_xx_unk); - func2f_xx_nvar: - if (IsApplTerm(d0)) { - Functor d1 = FunctorOfTerm(d0); - if (IsExtensionFunctor(d1)) { - XREG(PREG->y_u.xxx.x1) = d0; - XREG(PREG->y_u.xxx.x2) = MkIntTerm(0); - PREG = NEXTOP(PREG, xxx); - GONext(); - } - XREG(PREG->y_u.xxx.x1) = MkAtomTerm(NameOfFunctor(d1)); - XREG(PREG->y_u.xxx.x2) = MkIntegerTerm(ArityOfFunctor(d1)); - PREG = NEXTOP(PREG, xxx); - GONext(); - } else if (IsPairTerm(d0)) { - XREG(PREG->y_u.xxx.x1) = TermDot; - XREG(PREG->y_u.xxx.x2) = MkIntTerm(2); - PREG = NEXTOP(PREG, xxx); - GONext(); - } else { - XREG(PREG->y_u.xxx.x1) = d0; - XREG(PREG->y_u.xxx.x2) = MkIntTerm(0); - PREG = NEXTOP(PREG, xxx); - GONext(); - } - - BEGP(pt1); - deref_body(d0, pt1, func2f_xx_unk, func2f_xx_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, second argument was unbound too */ - FAIL(); - ENDD(d0); - ENDOp(); - - Op(p_func2f_xy, xxy); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - HR[0] = XREG(PREG->y_u.xxy.x); - RESET_VARIABLE(HR+1); - RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - } -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - d0 = XREG(PREG->y_u.xxy.x); - deref_head(d0, func2f_xy_unk); - func2f_xy_nvar: - if (IsApplTerm(d0)) { - Functor d1 = FunctorOfTerm(d0); - CELL *pt0 = YREG+PREG->y_u.xxy.y2; - if (IsExtensionFunctor(d1)) { - XREG(PREG->y_u.xxy.x1) = d0; - PREG = NEXTOP(PREG, xxy); - INITIALIZE_PERMVAR(pt0, MkIntTerm(0)); - GONext(); - } - XREG(PREG->y_u.xxy.x1) = MkAtomTerm(NameOfFunctor(d1)); - PREG = NEXTOP(PREG, xxy); - INITIALIZE_PERMVAR(pt0, MkIntegerTerm(ArityOfFunctor(d1))); - GONext(); - } else if (IsPairTerm(d0)) { - CELL *pt0 = YREG+PREG->y_u.xxy.y2; - XREG(PREG->y_u.xxy.x1) = TermDot; - PREG = NEXTOP(PREG, xxy); - INITIALIZE_PERMVAR(pt0, MkIntTerm(2)); - GONext(); - } else { - CELL *pt0 = YREG+PREG->y_u.xxy.y2; - XREG(PREG->y_u.xxy.x1) = d0; - PREG = NEXTOP(PREG, xxy); - INITIALIZE_PERMVAR(pt0, MkIntTerm(0)); - GONext(); - } - - BEGP(pt1); - deref_body(d0, pt1, func2f_xy_unk, func2f_xy_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, second argument was unbound too */ - FAIL(); - ENDD(d0); - ENDOp(); - - Op(p_func2f_yx, yxx); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - HR[0] = XREG(PREG->y_u.yxx.x2); - RESET_VARIABLE(HR+1); - RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - } -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - d0 = XREG(PREG->y_u.yxx.x2); - deref_head(d0, func2f_yx_unk); - func2f_yx_nvar: - if (IsApplTerm(d0)) { - Functor d1 = FunctorOfTerm(d0); - CELL *pt0 = YREG+PREG->y_u.yxx.y; - if (IsExtensionFunctor(d1)) { - XREG(PREG->y_u.yxx.x1) = MkIntTerm(0); - PREG = NEXTOP(PREG, yxx); - INITIALIZE_PERMVAR(pt0, d0); - GONext(); - } - XREG(PREG->y_u.yxx.x1) = MkIntegerTerm(ArityOfFunctor(d1)); - PREG = NEXTOP(PREG, yxx); - INITIALIZE_PERMVAR(pt0, MkAtomTerm(NameOfFunctor(d1))); - GONext(); - } else if (IsPairTerm(d0)) { - CELL *pt0 = YREG+PREG->y_u.yxx.y; - XREG(PREG->y_u.yxx.x1) = MkIntTerm(2); - PREG = NEXTOP(PREG, yxx); - INITIALIZE_PERMVAR(pt0 ,TermDot); - GONext(); - } else { - CELL *pt0 = YREG+PREG->y_u.yxx.y; - XREG(PREG->y_u.yxx.x1) = MkIntTerm(0); - PREG = NEXTOP(PREG, yxx); - INITIALIZE_PERMVAR(pt0, d0); - GONext(); - } - - BEGP(pt1); - deref_body(d0, pt1, func2f_yx_unk, func2f_yx_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, second argument was unbound too */ - FAIL(); - ENDD(d0); - ENDOp(); - - Op(p_func2f_yy, yyx); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - HR[0] = XREG(PREG->y_u.yyx.x); - RESET_VARIABLE(HR+1); - RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - } -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - d0 = XREG(PREG->y_u.yyx.x); - deref_head(d0, func2f_yy_unk); - func2f_yy_nvar: - if (IsApplTerm(d0)) { - Functor d1 = FunctorOfTerm(d0); - CELL *pt0 = YREG+PREG->y_u.yyx.y1; - CELL *pt1 = YREG+PREG->y_u.yyx.y2; - if (IsExtensionFunctor(d1)) { - PREG = NEXTOP(PREG, yyx); - INITIALIZE_PERMVAR(pt0, d0); - INITIALIZE_PERMVAR(pt1, MkIntTerm(0)); - GONext(); - } - PREG = NEXTOP(PREG, yyx); - INITIALIZE_PERMVAR(pt0, MkAtomTerm(NameOfFunctor(d1))); - INITIALIZE_PERMVAR(pt1, MkIntegerTerm(ArityOfFunctor(d1))); - GONext(); - } else if (IsPairTerm(d0)) { - CELL *pt0 = YREG+PREG->y_u.yyx.y1; - CELL *pt1 = YREG+PREG->y_u.yyx.y2; - PREG = NEXTOP(PREG, yyx); - INITIALIZE_PERMVAR(pt0, TermDot); - INITIALIZE_PERMVAR(pt1, MkIntTerm(2)); - GONext(); - } else { - CELL *pt0 = YREG+PREG->y_u.yyx.y1; - CELL *pt1 = YREG+PREG->y_u.yyx.y2; - PREG = NEXTOP(PREG, yyx); - INITIALIZE_PERMVAR(pt0, d0); - INITIALIZE_PERMVAR(pt1, MkIntTerm(0)); - GONext(); - } - - BEGP(pt1); - deref_body(d0, pt1, func2f_yy_unk, func2f_yy_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, second argument was unbound too */ - FAIL(); - ENDD(d0); - ENDOp(); - - Op(p_functor, e); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),XREGS+1); -#endif /* LOW_LEVEL_TRACE */ - restart_functor: - BEGD(d0); - d0 = ARG1; - deref_head(d0, func_unk); - func_nvar: - /* A1 is bound */ - BEGD(d1); - if (IsApplTerm(d0)) { - d1 = *RepAppl(d0); - if (IsExtensionFunctor((Functor) d1)) { - if (d1 <= (CELL)FunctorDouble && d1 >= (CELL)FunctorLongInt ) { - d1 = MkIntTerm(0); - } else - FAIL(); - } else { - d0 = MkAtomTerm(NameOfFunctor((Functor) d1)); - d1 = MkIntTerm(ArityOfFunctor((Functor) d1)); - } - } - else if (IsPairTerm(d0)) { - d0 = TermDot; - d1 = MkIntTerm(2); - } - else { - d1 = MkIntTerm(0); - } - /* d1 and d0 now have the two arguments */ - /* let's go and bind them */ - { - register CELL arity = d1; - - d1 = ARG2; - deref_head(d1, func_nvar_unk); - func_nvar_nvar: - /* A2 was bound */ - if (d0 != d1) { - FAIL(); - } - /* I have to this here so that I don't have a jump to a closing bracket */ - d0 = arity; - goto func_bind_x3; - - BEGP(pt0); - deref_body(d1, pt0, func_nvar_unk, func_nvar_nvar); - /* A2 is a variable, go and bind it */ - YapBind(pt0, d0); - /* I have to this here so that I don't have a jump to a closing bracket */ - d0 = arity; - ENDP(pt0); - func_bind_x3: - /* now let's process A3 */ - d1 = ARG3; - deref_head(d1, func_nvar3_unk); - func_nvar3_nvar: - /* A3 was bound */ - if (d0 != d1) { - FAIL(); - } - /* Done */ - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, e),Osbmp),l); - GONext(); - - BEGP(pt0); - deref_body(d1, pt0, func_nvar3_unk, func_nvar3_nvar); - /* A3 is a variable, go and bind it */ - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, e),Osbmp),l); - YapBind(pt0, d0); - /* Done */ - GONext(); - - - ENDP(pt0); - - } - ENDD(d1); - - BEGP(pt0); - deref_body(d0, pt0, func_unk, func_nvar); - /* A1 is a variable */ - /* We have to build the structure */ - d0 = ARG2; - deref_head(d0, func_var_2unk); - func_var_2nvar: - /* we do, let's get the third argument */ - BEGD(d1); - d1 = ARG3; - deref_head(d1, func_var_3unk); - func_var_3nvar: - /* Uuuff, the second and third argument are bound */ - if (IsIntTerm(d1)) - d1 = IntOfTerm(d1); - else { - saveregs(); - Yap_Error(TYPE_ERROR_INTEGER,ARG3,"functor/3"); - setregs(); - FAIL(); - } - if (!IsAtomicTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } /* We made it!!!!! we got in d0 the name, in d1 the arity and - * in pt0 the variable to bind it to. */ - if (d0 == TermDot && d1 == 2) { - RESET_VARIABLE(HR); - RESET_VARIABLE(HR+1); - d0 = AbsPair(HR); - HR += 2; - } - else if ((Int)d1 > 0) { - /* now let's build a compound term */ - if (!IsAtomTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - BEGP(pt1); - if (!IsAtomTerm(d0)) { - FAIL(); - } - else - d0 = (CELL) Yap_MkFunctor(AtomOfTerm(d0), (Int) d1); - pt1 = HR; - *pt1++ = d0; - d0 = AbsAppl(HR); - if (pt1+d1 > ENV || pt1+d1 > (CELL *)B) { - /* make sure we have something to show for our trouble */ - saveregs(); - if (!Yap_gcl((1+d1)*sizeof(CELL), 3, YREG, NEXTOP(NEXTOP(PREG,e),Osbmp))) { - Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); - setregs(); - JMPNext(); - } else { - setregs(); - } - goto restart_functor; /* */ - } - while ((Int)d1--) { - RESET_VARIABLE(pt1); - pt1++; - } - /* done building the term */ - HR = pt1; - ENDP(pt1); - } else if ((Int)d1 < 0) { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO,MkIntegerTerm(d1),"functor/3"); - setregs(); - FAIL(); - } - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, e),Osbpp),l); - YapBind(pt0, d0); - GONext(); - - - BEGP(pt1); - deref_body(d1, pt1, func_var_3unk, func_var_3nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d1, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, third argument was unbound */ - FAIL(); - ENDD(d1); - - BEGP(pt1); - deref_body(d0, pt1, func_var_2unk, func_var_2nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, second argument was unbound too */ - FAIL(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - /* join all the meta-call code into a single procedure with three entry points */ - { - CACHE_Y_AS_ENV(YREG); - BEGD(d0); /* term to be meta-called */ - Term mod; /* module to be used */ - PredEntry *pen; /* predicate */ - choiceptr b_ptr; /* cut point */ - Functor f; - - /* we are doing the rhs of a , */ - BOp(p_execute_tail, Osbmp); - - FETCH_Y_FROM_ENV(YREG); - /* place to cut to */ - b_ptr = (choiceptr)ENV_YREG[E_CB]; - /* original goal */ - d0 = ENV_YREG[-EnvSizeInCells-1]; - /* predicate we had used */ - pen = RepPredProp((Prop)IntegerOfTerm(ENV_YREG[-EnvSizeInCells-2])); - /* current module at the time */ - mod = ENV_YREG[-EnvSizeInCells-3]; - /* set YREG */ - /* Try to preserve the environment */ - ENV_YREG = (CELL *) (((char *) YREG) + PREG->y_u.Osbmp.s); -#ifdef FROZEN_STACKS - { - choiceptr top_b = PROTECT_FROZEN_B(B); -#ifdef YAPOR_SBA - if (ENV_YREG > (CELL *) top_b || ENV_YREG < HR) ENV_YREG = (CELL *) top_b; -#else - if (ENV_YREG > (CELL *) top_b) ENV_YREG = (CELL *) top_b; -#endif /* YAPOR_SBA */ - } -#else - if (ENV_YREG > (CELL *) B) { - ENV_YREG = (CELL *) B; - } -#endif /* FROZEN_STACKS */ - /* now, jump to actual execution */ - if (pen->ArityOfPE) { - f = pen->FunctorOfPred; - /* reuse environment if we are continuining a comma, ie, (g1,g2,g3) */ - /* can only do it deterministically */ - /* broken - if (f == FunctorComma && (CELL *)B >= ENV) { - ENV_YREG = ENV; - ENV = (CELL *)ENV[E_E]; - } - */ - goto execute_pred_f; - } else - goto execute_pred_a; - ENDBOp(); - - /* fetch the module from ARG2 */ - BOp(p_execute2, Osbpp); - - mod = ARG2; - deref_head(mod, execute2_unk0); - execute2_nvar0: - if (!IsAtomTerm(mod)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM, mod, "call/2"); - setregs(); - } - goto start_execute; - - BEGP(pt1); - deref_body(mod, pt1, execute2_unk0, execute2_nvar0); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, mod, "call/2"); - setregs(); - ENDP(pt1); - /* Oops, second argument was unbound too */ - FAIL(); - ENDBOp(); - - BOp(p_execute, Osbmp); - /* fetch the module from PREG */ - mod = PREG->y_u.Osbmp.mod; - start_execute: - /* place to cut to */ - b_ptr = B; - /* we have mod, and ARG1 has the goal, let us roll */ - /* Try to preserve the environment */ - ENV_YREG = (CELL *) (((char *) YREG) + PREG->y_u.Osbmp.s); -#ifdef FROZEN_STACKS - { - choiceptr top_b = PROTECT_FROZEN_B(B); -#ifdef YAPOR_SBA - if (ENV_YREG > (CELL *) top_b || ENV_YREG < HR) ENV_YREG = (CELL *) top_b; -#else - if (ENV_YREG > (CELL *) top_b) ENV_YREG = (CELL *) top_b; -#endif /* YAPOR_SBA */ - } -#else - if (ENV_YREG > (CELL *) B) { - ENV_YREG = (CELL *) B; - } -#endif /* FROZEN_STACKS */ - d0 = ARG1; - if (PRED_GOAL_EXPANSION_ALL) { - goto execute_metacall; - } - restart_execute: - deref_head(d0, execute_unk); - execute_nvar: - if (IsApplTerm(d0)) { - f = FunctorOfTerm(d0); - if (IsExtensionFunctor(f)) { - goto execute_metacall; - } - pen = RepPredProp(PredPropByFunc(f, mod)); - execute_pred_f: - if (pen->PredFlags & (MetaPredFlag|GoalExPredFlag)) { - /* just strip all of M:G */ - if (f == FunctorModule) { - Term tmod = ArgOfTerm(1,d0); - /* loop on modules */ - if (!IsVarTerm(tmod) && IsAtomTerm(tmod)) { - d0 = ArgOfTerm(2,d0); - mod = tmod; - goto execute_nvar; - } - goto execute_metacall; - } - if (f == FunctorComma) { - Term nmod = mod; - - /* optimise conj */ - SREG = RepAppl(d0); - BEGD(d1); - d1 = SREG[2]; - /* create an environment to execute the call */ - deref_head(d1, execute_comma_unk); - execute_comma_nvar: - if (IsAtomTerm(d1)) { - /* atomic goal is simpler */ - ENV_YREG[-EnvSizeInCells-2] = MkIntegerTerm((Int)PredPropByAtom(AtomOfTerm(d1),nmod)); - } else if (IsApplTerm(d1)) { - Functor f1 = FunctorOfTerm(d1); - if (IsExtensionFunctor(f1)) { - goto execute_metacall; - } else { - /* check for modules when looking up */ - if (f1 == FunctorModule) { - Term tmod = ArgOfTerm(1,d1); - /* loop on modules */ - if (!IsVarTerm(tmod) && IsAtomTerm(tmod)) { - d1 = ArgOfTerm(2,d1); - nmod = tmod; - goto execute_comma_nvar; - } - goto execute_metacall; - } - ENV_YREG[-EnvSizeInCells-2] = MkIntegerTerm((Int)PredPropByFunc(f1,nmod)); - } - } else { - goto execute_metacall; - } - ENV_YREG[-EnvSizeInCells-3] = mod; - /* now, we can create the new environment for the meta-call */ - /* notice that we are at a call, so we should ignore CP */ - ENV_YREG[E_CP] = (CELL)NEXTOP(PREG,Osbmp); - ENV_YREG[E_CB] = (CELL)b_ptr; - ENV_YREG[E_E] = (CELL)ENV; -#ifdef DEPTH_LIMIT - ENV_YREG[E_DEPTH] = DEPTH; -#endif /* DEPTH_LIMIT */ - ENV_YREG[-EnvSizeInCells-1] = d1; - ENV = ENV_YREG; - ENV_YREG -= EnvSizeInCells+3; - CPREG = NEXTOP(PREG, Osbmp); - PREG = COMMA_CODE; - /* for profiler */ - save_pc(); - d0 = SREG[1]; - goto restart_execute; - - BEGP(pt1); - deref_body(d1, pt1, execute_comma_unk, execute_comma_nvar); - goto execute_metacall; - ENDP(pt1); - ENDD(d1); - } else if (mod != CurrentModule) { - goto execute_metacall; - } - } - - /* copy arguments of meta-call to XREGS */ - BEGP(pt1); - pt1 = RepAppl(d0); - BEGD(d2); - for (d2 = ArityOfFunctor(f); d2; d2--) { -#ifdef YAPOR_SBA - BEGD(d1); - d1 = pt1[d2]; - if (d1 == 0) { - XREGS[d2] = (CELL)(pt1+d2); - } else { - XREGS[d2] = d1; - } -#else - XREGS[d2] = pt1[d2]; -#endif - } - ENDD(d2); - ENDP(pt1); - CACHE_A1(); - } else if (IsAtomTerm(d0)) { - pen = RepPredProp(PredPropByAtom(AtomOfTerm(d0), mod)); - execute_pred_a: - /* handle extra pruning */ - if (pen->FunctorOfPred == (Functor)AtomCut) { - if (b_ptr != B) { - saveregs(); - prune(b_ptr PASS_REGS); - setregs(); - } - } - } else { - goto execute_metacall; - } - - /* execute, but test first for interrupts */ - execute_end: - /* code copied from call */ -#ifndef NO_CHECKING - check_stack(NoStackPExecute, HR); -#endif - execute_stack_checked: - CPREG = NEXTOP(PREG, Osbmp); - ALWAYS_LOOKAHEAD(pen->OpcodeOfPred); - PREG = pen->CodeOfPred; - /* for profiler */ - save_pc(); -#ifdef DEPTH_LIMIT - if (DEPTH <= MkIntTerm(1)) {/* I assume Module==0 is primitives */ - if (pen->ModuleOfPred) { - if (DEPTH == MkIntTerm(0)) - FAIL(); - else DEPTH = RESET_DEPTH(); - } - } else if (pen->ModuleOfPred) - DEPTH -= MkIntConstant(2); -#endif /* DEPTH_LIMIT */ -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) - low_level_trace(enter_pred,pen,XREGS+1); -#endif /* LOW_LEVEL_TRACER */ - WRITEBACK_Y_AS_ENV(); - /* setup GB */ - ENV_YREG[E_CB] = (CELL) B; -#ifdef YAPOR - SCH_check_requests(); -#endif /* YAPOR */ - CACHE_A1(); - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - - /* meta-call: Prolog to the rescue */ - BEGP(pt1); - deref_body(d0, pt1, execute_unk, execute_nvar); - execute_metacall: - ARG1 = ARG3 = d0; - pen = PredMetaCall; - ARG2 = Yap_cp_as_integer(b_ptr); - if (mod) - ARG4 = mod; - else - ARG4 = TermProlog; - goto execute_end; - ENDP(pt1); - - /* at this point, we have the arguments all set in the argument registers, pen says who is the current predicate. don't remove. */ - NoStackPExecute: - WRITEBACK_Y_AS_ENV(); -#ifdef SHADOW_S - Yap_REGS.S_ = SREG; -#endif - saveregs_and_ycache(); - d0 = interrupt_pexecute( pen PASS_REGS ); - setregs_and_ycache(); -#ifdef SHADOW_S - SREG = Yap_REGS.S_; -#endif - if (!d0) FAIL(); - if (d0 == 2) goto execute_stack_checked; - goto execute_end; - ENDBOp(); - - ENDD(d0); - ENDCACHE_Y_AS_ENV(); - } diff --git a/C/c_interface.c b/C/c_interface.c index 291c45978..63b60b7b6 100755 --- a/C/c_interface.c +++ b/C/c_interface.c @@ -330,6 +330,7 @@ */ +#define Bool int #define flt double #define C_INTERFACE @@ -375,20 +376,12 @@ #define strncat(X,Y,Z) strcat(X,Y) #endif -#ifndef X_API - #if defined(_MSC_VER) && defined(YAP_EXPORTS) #define X_API __declspec(dllexport) -#else -#define X_API #endif -#endif - -//! @{ - /** - @defgroup slotInterface Term Handles or Slots +@defgroup slotInterface Term Handles or Slots @ingroup ChYInterface @{ @@ -502,25 +495,25 @@ YAP_A(int i) return(Deref(XREGS[i])); } -X_API bool +X_API Bool YAP_IsIntTerm(Term t) { return IsIntegerTerm(t); } -X_API bool +X_API Bool YAP_IsNumberTerm(Term t) { return IsIntegerTerm(t) || IsIntTerm(t) || IsFloatTerm(t) || IsBigIntTerm(t); } -X_API bool +X_API Bool YAP_IsLongIntTerm(Term t) { return IsLongIntTerm(t); } -X_API bool +X_API Bool YAP_IsBigNumTerm(Term t) { #if USE_GMP @@ -536,7 +529,7 @@ YAP_IsBigNumTerm(Term t) #endif } -X_API bool +X_API Bool YAP_IsRationalTerm(Term t) { #if USE_GMP @@ -552,49 +545,49 @@ YAP_IsRationalTerm(Term t) #endif } -X_API bool +X_API Bool YAP_IsVarTerm(Term t) { return (IsVarTerm(t)); } -X_API bool +X_API Bool YAP_IsNonVarTerm(Term t) { return (IsNonVarTerm(t)); } -X_API bool +X_API Bool YAP_IsFloatTerm(Term t) { return (IsFloatTerm(t)); } -X_API bool +X_API Bool YAP_IsDbRefTerm(Term t) { return (IsDBRefTerm(t)); } -X_API bool +X_API Bool YAP_IsAtomTerm(Term t) { return (IsAtomTerm(t)); } -X_API bool +X_API Bool YAP_IsPairTerm(Term t) { return (IsPairTerm(t)); } -X_API bool +X_API Bool YAP_IsApplTerm(Term t) { return (IsApplTerm(t) && !IsExtensionFunctor(FunctorOfTerm(t))); } -X_API bool +X_API Bool YAP_IsCompoundTerm(Term t) { return (IsApplTerm(t) && !IsExtensionFunctor(FunctorOfTerm(t))) || @@ -638,7 +631,7 @@ YAP_MkBigNumTerm(void *big) #endif /* USE_GMP */ } -X_API bool +X_API int YAP_BigNumOfTerm(Term t, void *b) { #if USE_GMP @@ -668,7 +661,7 @@ YAP_MkRationalTerm(void *big) #endif /* USE_GMP */ } -X_API bool +X_API int YAP_RationalOfTerm(Term t, void *b) { #if USE_GMP @@ -760,7 +753,7 @@ YAP_AtomOfTerm(Term t) } -X_API bool +X_API int YAP_IsWideAtom(Atom a) { return IsWideAtom(a); @@ -1134,7 +1127,7 @@ YAP_cut_up(void) RECOVER_B(); } -X_API bool +X_API int YAP_Unify(Term t1, Term t2) { Int out; @@ -1584,15 +1577,12 @@ YAP_Execute(PredEntry *pe, CPredicate exec_code) if (pe->PredFlags & SWIEnvPredFlag) { CPredicateV codev = (CPredicateV)exec_code; struct foreign_context ctx; - UInt i, arity = pe->ArityOfPE; - yhandle_t sl = 0; + UInt i; + Int sl = 0; ctx.engine = NULL; - if (arity > 0) { - sl = Yap_NewSlots( arity ); - for (i= 0; i < arity; i++ ) { - Yap_PutInSlot(sl+i, XREGS[i+1] PASS_REGS); - } + for (i=pe->ArityOfPE; i > 0; i--) { + sl = Yap_InitSlot(XREGS[i] PASS_REGS); } PP = pe; ret = ((codev)(sl,0,&ctx)); @@ -1635,7 +1625,7 @@ YAP_ExecuteFirst(PredEntry *pe, CPredicate exec_code) CACHE_REGS CELL ocp = LCL0-(CELL *)B; /* for slots to work */ - yhandle_t CurSlot = Yap_StartSlots( PASS_REGS1 ); + Int CurSlot = Yap_StartSlots( PASS_REGS1 ); if (pe->PredFlags & (SWIEnvPredFlag|CArgsPredFlag|ModuleTransparentPredFlag)) { uintptr_t val; CPredicateV codev = (CPredicateV)exec_code; @@ -1703,7 +1693,7 @@ YAP_ExecuteOnCut(PredEntry *pe, CPredicate exec_code, struct cut_c_str *top) Int val; CPredicateV codev = (CPredicateV)exec_code; struct foreign_context *ctx = (struct foreign_context *)(&EXTRA_CBACK_ARG(pe->ArityOfPE,1)); - yhandle_t CurSlot; + Int CurSlot; CELL *args = B->cp_args; B = oB; @@ -1736,8 +1726,7 @@ YAP_ExecuteOnCut(PredEntry *pe, CPredicate exec_code, struct cut_c_str *top) return TRUE; } } else { - Int ret; - yhandle_t CurSlot; + Int ret, CurSlot; B = oB; /* for slots to work */ CurSlot = Yap_StartSlots( PASS_REGS1 ); @@ -1763,7 +1752,7 @@ YAP_ExecuteNext(PredEntry *pe, CPredicate exec_code) { CACHE_REGS /* for slots to work */ - yhandle_t CurSlot = Yap_StartSlots( PASS_REGS1 ); + Int CurSlot = Yap_StartSlots( PASS_REGS1 ); UInt ocp = LCL0-(CELL *)B; if (pe->PredFlags & (SWIEnvPredFlag|CArgsPredFlag)) { Int val; @@ -2289,7 +2278,7 @@ run_emulator(YAP_dogoalinfo *dgi USES_REGS) return out; } -X_API bool +X_API int YAP_EnterGoal(PredEntry *pe, Term *ptr, YAP_dogoalinfo *dgi) { CACHE_REGS @@ -2316,7 +2305,7 @@ YAP_EnterGoal(PredEntry *pe, Term *ptr, YAP_dogoalinfo *dgi) return out; } -X_API bool +X_API int YAP_RetryGoal(YAP_dogoalinfo *dgi) { CACHE_REGS @@ -2343,7 +2332,7 @@ YAP_RetryGoal(YAP_dogoalinfo *dgi) return out; } -X_API bool +X_API int YAP_LeaveGoal(int backtrack, YAP_dogoalinfo *dgi) { CACHE_REGS @@ -2447,7 +2436,7 @@ YAP_AllocExternalDataInStack(size_t bytes) return t; } -X_API bool +X_API Bool YAP_IsExternalDataInStackTerm(Term t) { return IsExternalBlobTerm(t, EXTERNAL_BLOB); @@ -2486,7 +2475,7 @@ Term YAP_NewOpaqueObject(YAP_opaque_tag_t tag, size_t bytes) return t; } -X_API bool +X_API Bool YAP_IsOpaqueObjectTerm(Term t, YAP_opaque_tag_t tag) { return IsExternalBlobTerm(t, (CELL)tag); @@ -2504,10 +2493,9 @@ YAP_HeapStoreOpaqueTerm(Term t) return Yap_HeapStoreOpaqueTerm(t); } -Int -Yap_RunGoalOnce(Term t) +X_API Int +YAP_RunGoalOnce(Term t) { - return Yap_RunGoalOnce( t ); CACHE_REGS Term out; yamop *old_CP = CP; @@ -2559,13 +2547,7 @@ Yap_RunGoalOnce(Term t) return out; } -X_API Int -YAP_RunGoalOnce(Term t) -{ - return Yap_RunGoalOnce( t ); -} - -X_API bool +X_API int YAP_RestartGoal(void) { CACHE_REGS @@ -2588,7 +2570,7 @@ YAP_RestartGoal(void) return(out); } -X_API bool +X_API int YAP_ShutdownGoal(int backtrack) { CACHE_REGS @@ -2632,7 +2614,7 @@ YAP_ShutdownGoal(int backtrack) return TRUE; } -X_API bool +X_API int YAP_ContinueGoal(void) { CACHE_REGS @@ -2669,7 +2651,7 @@ YAP_PruneGoal(YAP_dogoalinfo *gi) RECOVER_B(); } -X_API bool +X_API int YAP_GoalHasException(Term *t) { CACHE_REGS diff --git a/C/cdmgr.c b/C/cdmgr.c index abcdf7bee..d3e661436 100644 --- a/C/cdmgr.c +++ b/C/cdmgr.c @@ -660,13 +660,13 @@ Yap_ResetConsultStack( void ) /****************************************************************** - + EXECUTING PROLOG CLAUSES - + ******************************************************************/ -static int +static int static_in_use(PredEntry *p, int check_everything) { #if defined(YAPOR) || defined(THREADS) @@ -686,9 +686,9 @@ static_in_use(PredEntry *p, int check_everything) } /****************************************************************** - + ADDING AND REMOVE INFO TO A PROCEDURE - + ******************************************************************/ @@ -697,7 +697,7 @@ static_in_use(PredEntry *p, int check_everything) * static CompiledPredFlag fast FastPredFlag all the * database predicates are supported for dynamic predicates only abolish and * assertz are supported for static predicates no database predicates are - * supportted for fast predicates + * supportted for fast predicates */ #define is_dynamic(pe) (pe->PredFlags & DynamicPredFlag) @@ -707,20 +707,15 @@ static_in_use(PredEntry *p, int check_everything) #define is_tabled(pe) (pe->PredFlags & TabledPredFlag) #endif /* TABLING */ -/** - * @short Given a Prolog term and a module, return the - * corresponding predicate. - * - * returns NULL in error. - */ -PredEntry * -Yap_getPred(Term t, Term tmod, char *msg) + +static PredEntry * +get_pred(Term t, Term tmod, char *pname) { Term t0 = t; restart: if (IsVarTerm(t)) { - Yap_Error(INSTANTIATION_ERROR, t0, msg); + Yap_Error(INSTANTIATION_ERROR, t0, pname); return NULL; } else if (IsAtomTerm(t)) { return RepPredProp(Yap_GetPredPropByAtom(AtomOfTerm(t), tmod)); @@ -729,17 +724,17 @@ Yap_getPred(Term t, Term tmod, char *msg) } else if (IsApplTerm(t)) { Functor fun = FunctorOfTerm(t); if (IsExtensionFunctor(fun)) { - Yap_Error(TYPE_ERROR_CALLABLE, Yap_PredicateIndicator(t, tmod), msg); + Yap_Error(TYPE_ERROR_CALLABLE, Yap_PredicateIndicator(t, tmod), pname); return NULL; } if (fun == FunctorModule) { Term tmod = ArgOfTerm(1, t); if (IsVarTerm(tmod) ) { - Yap_Error(INSTANTIATION_ERROR, t0, msg); + Yap_Error(INSTANTIATION_ERROR, t0, pname); return NULL; } if (!IsAtomTerm(tmod) ) { - Yap_Error(TYPE_ERROR_ATOM, t0, msg); + Yap_Error(TYPE_ERROR_ATOM, t0, pname); return NULL; } t = ArgOfTerm(2, t); @@ -750,52 +745,15 @@ Yap_getPred(Term t, Term tmod, char *msg) return NULL; } -PredEntry * -Yap_Pred(Term t, Term tmod, char *msg) -{ - Term t0 = t; - - restart: - if (IsVarTerm(t)) { - Yap_Error(INSTANTIATION_ERROR, t0, msg); - return NULL; - } else if (IsAtomTerm(t)) { - return RepPredProp(PredPropByAtom(AtomOfTerm(t), tmod)); - } else if (IsIntegerTerm(t) && tmod == IDB_MODULE) { - return Yap_FindLUIntKey(IntegerOfTerm(t)); - } else if (IsApplTerm(t)) { - Functor fun = FunctorOfTerm(t); - if (IsExtensionFunctor(fun)) { - Yap_Error(TYPE_ERROR_CALLABLE, Yap_PredicateIndicator(t, tmod), msg); - return NULL; - } - if (fun == FunctorModule) { - Term tmod = ArgOfTerm(1, t); - if (IsVarTerm(tmod) ) { - Yap_Error(INSTANTIATION_ERROR, t0, msg); - return NULL; - } - if (!IsAtomTerm(tmod) ) { - Yap_Error(TYPE_ERROR_ATOM, t0, msg); - return NULL; - } - t = ArgOfTerm(2, t); - goto restart; - } - return RepPredProp(PredPropByFunc(fun, tmod)); - } else - return NULL; -} - /****************************************************************** Mega Clauses - + ******************************************************************/ -#define OrArgAdjust(P) -#define TabEntryAdjust(P) +#define OrArgAdjust(P) +#define TabEntryAdjust(P) #define DoubleInCodeAdjust(D) #define IntegerInCodeAdjust(D) #define IntegerAdjust(D) (D) @@ -815,7 +773,7 @@ Yap_Pred(Term t, Term tmod, char *msg) #define OpcodeAdjust(X) (X) #define ModuleAdjust(X) (X) #define ExternalFunctionAdjust(X) (X) -#define AdjustSwitchTable(X,Y,Z) +#define AdjustSwitchTable(X,Y,Z) #define DBGroundTermAdjust(X) (X) #define rehash(A,B,C) @@ -997,15 +955,15 @@ split_megaclause(PredEntry *ap) /****************************************************************** - + Indexation Info - + ******************************************************************/ #define ByteAdr(X) ((Int) &(X)) /* Index a prolog pred, given its predicate entry */ /* ap is already locked. */ -static void +static void IPred(PredEntry *ap, UInt NSlots, yamop *next_pc) { yamop *BaseAddr; @@ -1058,13 +1016,13 @@ IPred(PredEntry *ap, UInt NSlots, yamop *next_pc) } if (ap->PredFlags & (SpiedPredFlag|CountPredFlag|ProfiledPredFlag)) { ap->OpcodeOfPred = Yap_opcode(_spy_pred); - ap->CodeOfPred = (yamop *)(&(ap->OpcodeOfPred)); + ap->CodeOfPred = (yamop *)(&(ap->OpcodeOfPred)); #if defined(YAPOR) || defined(THREADS) } else if (ap->PredFlags & LogUpdatePredFlag && !(ap->PredFlags & ThreadLocalPredFlag) && ap->ModuleOfPred != IDB_MODULE) { ap->OpcodeOfPred = LOCKPRED_OPCODE; - ap->CodeOfPred = (yamop *)(&(ap->OpcodeOfPred)); + ap->CodeOfPred = (yamop *)(&(ap->OpcodeOfPred)); #endif } else { ap->CodeOfPred = ap->cs.p_code.TrueCodeOfPred; @@ -1076,7 +1034,7 @@ IPred(PredEntry *ap, UInt NSlots, yamop *next_pc) #endif } -void +void Yap_IPred(PredEntry *p, UInt NSlots, yamop *next_pc) { IPred(p, NSlots, next_pc); @@ -1098,14 +1056,14 @@ RemoveMainIndex(PredEntry *ap) } if (First != NULL && spied) { ap->OpcodeOfPred = Yap_opcode(_spy_pred); - ap->CodeOfPred = (yamop *)(&(ap->OpcodeOfPred)); + ap->CodeOfPred = (yamop *)(&(ap->OpcodeOfPred)); } else if (ap->cs.p_code.NOfClauses > 1 #ifdef TABLING ||ap->PredFlags & TabledPredFlag #endif /* TABLING */ ) { ap->OpcodeOfPred = INDEX_OPCODE; - ap->CodeOfPred = ap->cs.p_code.TrueCodeOfPred = (yamop *)(&(ap->OpcodeOfPred)); + ap->CodeOfPred = ap->cs.p_code.TrueCodeOfPred = (yamop *)(&(ap->OpcodeOfPred)); } else { ap->OpcodeOfPred = ap->cs.p_code.TrueCodeOfPred->opc; ap->CodeOfPred = ap->cs.p_code.TrueCodeOfPred; @@ -1115,8 +1073,8 @@ RemoveMainIndex(PredEntry *ap) !(ap->PredFlags & ThreadLocalPredFlag) && ap->ModuleOfPred != IDB_MODULE) { ap->OpcodeOfPred = LOCKPRED_OPCODE; - ap->CodeOfPred = (yamop *)(&(ap->OpcodeOfPred)); - } + ap->CodeOfPred = (yamop *)(&(ap->OpcodeOfPred)); + } #endif } @@ -1329,7 +1287,7 @@ cleanup_dangling_indices(yamop *ipc, yamop *beg, yamop *end, yamop *suspend_code } #if defined(YAPOR) || defined(THREADS) ipc = (yamop *)((CELL)ipc & ~1); -#endif +#endif } } @@ -1480,7 +1438,7 @@ kill_first_log_iblock(LogUpdIndex *c, LogUpdIndex *parent, PredEntry *ap) /* try to move up, so that we don't hold a switch table */ if (parent != NULL && parent->ClFlags & SwitchTableMask) { - + c->ParentIndex = parent->ParentIndex; parent->ParentIndex->ClRefCount++; parent->ClRefCount--; @@ -1566,9 +1524,9 @@ Yap_ErLogUpdIndex(LogUpdIndex *clau) /* Routine used when wanting to remove the indexation */ /* ap is known to already have been locked for WRITING */ -static int +static int RemoveIndexation(PredEntry *ap) -{ +{ if (ap->OpcodeOfPred == INDEX_OPCODE) { return TRUE; } @@ -1579,21 +1537,21 @@ RemoveIndexation(PredEntry *ap) cl = ClauseCodeToStaticIndex(ap->cs.p_code.TrueCodeOfPred); - kill_top_static_iblock(cl, ap); - + kill_top_static_iblock(cl, ap); + } return TRUE; } -int +int Yap_RemoveIndexation(PredEntry *ap) { return RemoveIndexation(ap); } /****************************************************************** - + Adding clauses - + ******************************************************************/ @@ -1602,21 +1560,21 @@ Yap_RemoveIndexation(PredEntry *ap) #define asserta 2 /* p is already locked */ -static void +static void retract_all(PredEntry *p, int in_use) { yamop *q; q = p->cs.p_code.FirstClause; if (q != NULL) { - if (p->PredFlags & LogUpdatePredFlag) { + if (p->PredFlags & LogUpdatePredFlag) { LogUpdClause *cl = ClauseCodeToLogUpdClause(q); do { LogUpdClause *ncl = cl->ClNext; Yap_ErLogUpdCl(cl); cl = ncl; } while (cl != NULL); - } else if (p->PredFlags & MegaClausePredFlag) { + } else if (p->PredFlags & MegaClausePredFlag) { MegaClause *cl = ClauseCodeToMegaClause(q); if (in_use || cl->ClFlags & HasBlobsMask) { @@ -1690,7 +1648,7 @@ source_pred(PredEntry *p, yamop *q) } /* p is already locked */ -static void +static void add_first_static(PredEntry *p, yamop *cp, int spy_flag) { CACHE_REGS @@ -1705,7 +1663,7 @@ add_first_static(PredEntry *p, yamop *cp, int spy_flag) #ifdef TABLING if (is_tabled(p)) { p->OpcodeOfPred = INDEX_OPCODE; - p->cs.p_code.TrueCodeOfPred = p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); + p->cs.p_code.TrueCodeOfPred = p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); } #endif /* TABLING */ } @@ -1717,7 +1675,7 @@ add_first_static(PredEntry *p, yamop *cp, int spy_flag) !(p->PredFlags & ThreadLocalPredFlag) && p->ModuleOfPred != IDB_MODULE) { p->OpcodeOfPred = LOCKPRED_OPCODE; - p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); + p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); } else #endif p->CodeOfPred = pt; @@ -1739,7 +1697,7 @@ add_first_static(PredEntry *p, yamop *cp, int spy_flag) } if (spy_flag) { p->OpcodeOfPred = Yap_opcode(_spy_pred); - p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); + p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); } if (source_pred(p, cp)) { p->PredFlags |= SourcePredFlag; @@ -1751,7 +1709,7 @@ add_first_static(PredEntry *p, yamop *cp, int spy_flag) } /* p is already locked */ -static void +static void add_first_dynamic(PredEntry *p, yamop *cp, int spy_flag) { CACHE_REGS @@ -1814,7 +1772,7 @@ add_first_dynamic(PredEntry *p, yamop *cp, int spy_flag) !(p->PredFlags & ThreadLocalPredFlag) && p->ModuleOfPred != IDB_MODULE) { p->OpcodeOfPred = LOCKPRED_OPCODE; - p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); + p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); } #endif /* set the first clause to have a retry and mark which will @@ -1852,7 +1810,7 @@ add_first_dynamic(PredEntry *p, yamop *cp, int spy_flag) } /* p is already locked */ -static void +static void asserta_stat_clause(PredEntry *p, yamop *q, int spy_flag) { StaticClause *cl = ClauseCodeToStaticClause(q); @@ -1868,16 +1826,16 @@ asserta_stat_clause(PredEntry *p, yamop *q, int spy_flag) p->cs.p_code.FirstClause = q; if (p->PredFlags & (SpiedPredFlag|CountPredFlag|ProfiledPredFlag)) { p->OpcodeOfPred = Yap_opcode(_spy_pred); - p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); + p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); } else if (!(p->PredFlags & IndexedPredFlag)) { p->OpcodeOfPred = INDEX_OPCODE; - p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); + p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); } #if defined(YAPOR) || defined(THREADS) if (p->ModuleOfPred != IDB_MODULE && !(p->PredFlags & ThreadLocalPredFlag)) { p->OpcodeOfPred = LOCKPRED_OPCODE; - p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); + p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); } #endif return; @@ -1887,15 +1845,15 @@ asserta_stat_clause(PredEntry *p, yamop *q, int spy_flag) p->cs.p_code.TrueCodeOfPred = q; if (p->PredFlags & (SpiedPredFlag|CountPredFlag|ProfiledPredFlag)) { p->OpcodeOfPred = Yap_opcode(_spy_pred); - p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); + p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); } else if (!(p->PredFlags & IndexedPredFlag)) { p->OpcodeOfPred = INDEX_OPCODE; - p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); + p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); } } /* p is already locked */ -static void +static void asserta_dynam_clause(PredEntry *p, yamop *cp) { yamop *q; @@ -1927,7 +1885,7 @@ asserta_dynam_clause(PredEntry *p, yamop *cp) } /* p is already locked */ -static void +static void assertz_stat_clause(PredEntry *p, yamop *cp, int spy_flag) { yamop *pt; @@ -1945,19 +1903,19 @@ assertz_stat_clause(PredEntry *p, yamop *cp, int spy_flag) p->cs.p_code.LastClause = cp; if (!(p->PredFlags & IndexedPredFlag)) { p->OpcodeOfPred = INDEX_OPCODE; - p->cs.p_code.TrueCodeOfPred = p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); + p->cs.p_code.TrueCodeOfPred = p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); } #if defined(YAPOR) || defined(THREADS) if (p->ModuleOfPred != IDB_MODULE && !(p->PredFlags & ThreadLocalPredFlag)) { p->OpcodeOfPred = LOCKPRED_OPCODE; - p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); + p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); } #endif if (p->PredFlags & (SpiedPredFlag|CountPredFlag|ProfiledPredFlag)) { p->OpcodeOfPred = Yap_opcode(_spy_pred); - p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); - } + p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); + } return; } else { StaticClause *cl = ClauseCodeToStaticClause(pt); @@ -1967,14 +1925,14 @@ assertz_stat_clause(PredEntry *p, yamop *cp, int spy_flag) if (p->cs.p_code.FirstClause == p->cs.p_code.LastClause) { if (!(p->PredFlags & (SpiedPredFlag|CountPredFlag|ProfiledPredFlag))) { p->OpcodeOfPred = INDEX_OPCODE; - p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); + p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); } } p->cs.p_code.LastClause = cp; } /* p is already locked */ -static void +static void assertz_dynam_clause(PredEntry *p, yamop *cp) { yamop *q; @@ -2001,7 +1959,7 @@ assertz_dynam_clause(PredEntry *p, yamop *cp) p->cs.p_code.NOfClauses++; } -void +void Yap_AssertzClause(PredEntry *p, yamop *cp) { if (p->PredFlags & DynamicPredFlag) { @@ -2049,7 +2007,7 @@ static void expand_consult( void ) LOCAL_ConsultLow = new_cl; } -static int +static int not_was_reconsulted(PredEntry *p, Term t, int mode) { CACHE_REGS @@ -2072,7 +2030,7 @@ not_was_reconsulted(PredEntry *p, Term t, int mode) if (fp != LOCAL_ConsultBase) { return FALSE; } else if (mode) { // consulting again a predicate in the original file. - if ((p->cs.p_code.NOfClauses && + if ((p->cs.p_code.NOfClauses && p->src.OwnerFile == Yap_ConsultingFile( PASS_REGS1 ) && p->src.OwnerFile != AtomNil && !(p->PredFlags & MultiFileFlag) && @@ -2091,7 +2049,7 @@ not_was_reconsulted(PredEntry *p, Term t, int mode) } --LOCAL_ConsultSp; LOCAL_ConsultSp->p = p0; - if (LOCAL_ConsultBase[1].mode && + if (LOCAL_ConsultBase[1].mode && !(p->PredFlags & MultiFileFlag)) /* we are in reconsult mode */ { retract_all(p, static_in_use(p,TRUE)); } @@ -2101,7 +2059,7 @@ not_was_reconsulted(PredEntry *p, Term t, int mode) } static void -addcl_permission_error(AtomEntry *ap, Int Arity, int in_use) +addcl_permission_error(AtomEntry *ap, Int Arity, int in_use) { CACHE_REGS Term t, ti[2]; @@ -2200,7 +2158,7 @@ Yap_multiple( PredEntry *ap USES_REGS ) return FALSE; if (ap == LOCAL_LastAssertedPred) return FALSE; - return + return ap->cs.p_code.NOfClauses > 0 && Yap_ConsultingFile( PASS_REGS1 ) != ap->src.OwnerFile; } @@ -2234,7 +2192,7 @@ mark_preds_with_this_func(Functor f, Prop p0) while (p) { Prop nextp = p->NextOfPE; if (p->FunctorOfPred == f) - p->PredFlags |= GoalExPredFlag; + p->PredFlags |= GoalExPredFlag; p = RepPredProp(nextp); } } @@ -2246,7 +2204,7 @@ mark_preds_with_this_atom(Prop p) while (p) { Prop nextp = p->NextOfPE; if (p->KindOfPE == PEProp) - RepPredProp(p)->PredFlags |= GoalExPredFlag; + RepPredProp(p)->PredFlags |= GoalExPredFlag; p = nextp; } } @@ -2261,7 +2219,7 @@ goal_expansion_support(PredEntry *p, Term tf) if (IsVarTerm(tg) || IsVarTerm(tm)) { if (!IsVarTerm(tg)) { /* this is the complicated case, first I need to inform - predicates for this functor */ + predicates for this functor */ PRED_GOAL_EXPANSION_FUNC = TRUE; if (IsAtomTerm(tg)) { AtomEntry *ae = RepAtom(AtomOfTerm(tg)); @@ -2278,7 +2236,7 @@ goal_expansion_support(PredEntry *p, Term tf) } if (!found) { PredEntry *npe = RepPredProp(PredPropByAtom(AtomOfTerm(tg),IDB_MODULE)); - npe->PredFlags |= GoalExPredFlag; + npe->PredFlags |= GoalExPredFlag; } } else if (IsApplTerm(tg)) { FunctorEntry *fe = (FunctorEntry *)FunctorOfTerm(tg); @@ -2294,7 +2252,7 @@ goal_expansion_support(PredEntry *p, Term tf) if (CurrentModule == PROLOG_MODULE) mod = IDB_MODULE; npe = RepPredProp(PredPropByFunc(fe,mod)); - npe->PredFlags |= GoalExPredFlag; + npe->PredFlags |= GoalExPredFlag; } } } else { @@ -2327,7 +2285,7 @@ goal_expansion_support(PredEntry *p, Term tf) PRED_GOAL_EXPANSION_FUNC = TRUE; } npe = RepPredProp(PredPropByFunc(fe,p->ModuleOfPred)); - npe->PredFlags |= GoalExPredFlag; + npe->PredFlags |= GoalExPredFlag; } else if (IsAtomTerm(tg)) { Atom at = AtomOfTerm(tg); Prop p0; @@ -2339,7 +2297,7 @@ goal_expansion_support(PredEntry *p, Term tf) PRED_GOAL_EXPANSION_FUNC = TRUE; } npe = RepPredProp(PredPropByAtom(at,p->ModuleOfPred)); - npe->PredFlags |= GoalExPredFlag; + npe->PredFlags |= GoalExPredFlag; } } } @@ -2384,7 +2342,7 @@ addclause(Term t, yamop *cp, int mode, Term mod, Term *t4ref) if (!(p->PredFlags & SysExportPredFlag) && ( (pflags & (UserCPredFlag|CArgsPredFlag|NumberDBPredFlag|AtomDBPredFlag|TestPredFlag|AsmPredFlag|CPredFlag|BinaryPredFlag)) || - (p->ModuleOfPred == PROLOG_MODULE && + (p->ModuleOfPred == PROLOG_MODULE && mod != TermProlog && mod) ) ) { @@ -2406,7 +2364,7 @@ addclause(Term t, yamop *cp, int mode, Term mod, Term *t4ref) if (pflags & (SpiedPredFlag|CountPredFlag|ProfiledPredFlag)) spy_flag = TRUE; goal_expansion_support(p, tf); - if (mode == consult) + if (mode == consult) not_was_reconsulted(p, t, TRUE); /* always check if we have a valid error first */ if (LOCAL_ErrorMessage && LOCAL_Error_TYPE == PERMISSION_ERROR_MODIFY_STATIC_PROCEDURE) { @@ -2451,7 +2409,7 @@ addclause(Term t, yamop *cp, int mode, Term mod, Term *t4ref) !(p->PredFlags & ThreadLocalPredFlag) && p->ModuleOfPred != IDB_MODULE) { p->OpcodeOfPred = LOCKPRED_OPCODE; - p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); + p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); } #endif } else { @@ -2476,7 +2434,7 @@ addclause(Term t, yamop *cp, int mode, Term mod, Term *t4ref) !(p->PredFlags & ThreadLocalPredFlag) && p->ModuleOfPred != IDB_MODULE) { p->OpcodeOfPred = LOCKPRED_OPCODE; - p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); + p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred)); } #endif } @@ -2543,7 +2501,7 @@ Yap_EraseStaticClause(StaticClause *cl, PredEntry *ap, Term mod) { ap->cs.p_code.LastClause = ap->cs.p_code.FirstClause = NULL; ap->OpcodeOfPred = UNDEF_OPCODE; ap->cs.p_code.TrueCodeOfPred = - (yamop *)(&(ap->OpcodeOfPred)); + (yamop *)(&(ap->OpcodeOfPred)); } else { yamop *ncl = cl->ClNext->ClCode; ap->cs.p_code.FirstClause = ncl; @@ -2581,14 +2539,14 @@ Yap_EraseStaticClause(StaticClause *cl, PredEntry *ap, Term mod) { Yap_FreeCodeSpace((char *)cl); } if (ap->cs.p_code.NOfClauses == 0) { - ap->CodeOfPred = + ap->CodeOfPred = ap->cs.p_code.TrueCodeOfPred; } else if (ap->cs.p_code.NOfClauses > 1) { ap->OpcodeOfPred = INDEX_OPCODE; - ap->CodeOfPred = ap->cs.p_code.TrueCodeOfPred = (yamop *)(&(ap->OpcodeOfPred)); + ap->CodeOfPred = ap->cs.p_code.TrueCodeOfPred = (yamop *)(&(ap->OpcodeOfPred)); } else if (ap->PredFlags & (SpiedPredFlag|CountPredFlag|ProfiledPredFlag)) { ap->OpcodeOfPred = Yap_opcode(_spy_pred); - ap->CodeOfPred = ap->cs.p_code.TrueCodeOfPred = (yamop *)(&(ap->OpcodeOfPred)); + ap->CodeOfPred = ap->cs.p_code.TrueCodeOfPred = (yamop *)(&(ap->OpcodeOfPred)); } else { ap->CodeOfPred = ap->cs.p_code.TrueCodeOfPred; } @@ -2597,7 +2555,7 @@ Yap_EraseStaticClause(StaticClause *cl, PredEntry *ap, Term mod) { !(ap->PredFlags & ThreadLocalPredFlag) && ap->ModuleOfPred != IDB_MODULE) { ap->OpcodeOfPred = LOCKPRED_OPCODE; - ap->CodeOfPred = (yamop *)(&(ap->OpcodeOfPred)); + ap->CodeOfPred = (yamop *)(&(ap->OpcodeOfPred)); } #endif } @@ -2619,12 +2577,12 @@ Yap_add_logupd_clause(PredEntry *pe, LogUpdClause *cl, int mode) { !(pe->PredFlags & ThreadLocalPredFlag) && pe->ModuleOfPred != IDB_MODULE) { pe->OpcodeOfPred = LOCKPRED_OPCODE; - pe->CodeOfPred = (yamop *)(&(pe->OpcodeOfPred)); + pe->CodeOfPred = (yamop *)(&(pe->OpcodeOfPred)); } else { #endif pe->CodeOfPred = pe->cs.p_code.TrueCodeOfPred; pe->OpcodeOfPred = ((yamop *)(pe->CodeOfPred))->opc; -#if defined(YAPOR) || defined(THREADS) +#if defined(YAPOR) || defined(THREADS) } #endif } @@ -2635,7 +2593,7 @@ Yap_add_logupd_clause(PredEntry *pe, LogUpdClause *cl, int mode) { } } -static Int +static Int p_compile( USES_REGS1 ) { /* '$compile'(+C,+Flags, Mod) */ Term t = Deref(ARG1); @@ -2671,7 +2629,7 @@ p_compile( USES_REGS1 ) return TRUE; } -static Int +static Int p_compile_dynamic( USES_REGS1 ) { /* '$compile_dynamic'(+C,+Flags,Mod,-Ref) */ Term t = Deref(ARG1); @@ -2686,11 +2644,11 @@ p_compile_dynamic( USES_REGS1 ) return FALSE; if (IsAtomTerm(t1)) { if (RepAtom(AtomOfTerm(t1))->StrOfAE[0] == 'f') mode = asserta; - else mode = assertz; + else mode = assertz; } else mode = IntegerOfTerm(t1); /* separate assert in current file from reconsult if (mode == assertz && LOCAL_consult_level && mod == CurrentModule) - mode = consult; + mode = consult; */ old_optimize = optimizer_on; optimizer_on = FALSE; @@ -2699,11 +2657,11 @@ p_compile_dynamic( USES_REGS1 ) cclause() in case there is a overflow */ t = Deref(ARG1); /* just in case there was an heap overflow */ if (!LOCAL_ErrorMessage) { - - + + optimizer_on = old_optimize; addclause(t, code_adr, mode , mod, &ARG5); - } + } if (LOCAL_ErrorMessage) { if (!LOCAL_Error_Term) LOCAL_Error_Term = TermNil; @@ -2754,20 +2712,20 @@ Yap_init_consult(int mode, const char *file) init_consult(mode,file); } -static Int +static Int p_startconsult( USES_REGS1 ) { /* '$start_consult'(+Mode) */ Term t; char *smode = RepAtom(AtomOfTerm(Deref(ARG1)))->StrOfAE; int mode; - + mode = strcmp("consult",smode); init_consult(mode, RepAtom(AtomOfTerm(Deref(ARG2)))->StrOfAE); t = MkIntTerm(LOCAL_consult_level); return (Yap_unify_constant(ARG3, t)); } -static Int +static Int p_showconslultlev( USES_REGS1 ) { Term t; @@ -2797,7 +2755,7 @@ Yap_end_consult( void ) { } -static Int +static Int p_endconsult( USES_REGS1 ) { /* '$end_consult' */ end_consult( PASS_REGS1 ); @@ -2825,14 +2783,14 @@ Yap_Abolish(PredEntry *pred) pred->src.OwnerFile = AtomNil; } -static Int +static Int p_purge_clauses( USES_REGS1 ) { /* '$purge_clauses'(+Func) */ PredEntry *pred; Term t = Deref(ARG1); Term mod = Deref(ARG2); MegaClause *before = DeadMegaClauses; - + Yap_PutValue(AtomAbol, MkAtomTerm(AtomNil)); if (IsVarTerm(t)) return FALSE; @@ -2867,7 +2825,7 @@ p_purge_clauses( USES_REGS1 ) } -static Int +static Int p_sys_export( USES_REGS1 ) { /* '$set_spy'(+Fun,+M) */ PredEntry *pred; @@ -2888,7 +2846,7 @@ p_sys_export( USES_REGS1 ) } else { return (FALSE); } - PELOCK(100,pred); + PELOCK(100,pred); pred->PredFlags |= SysExportPredFlag; UNLOCKPE(100,pred); return TRUE; @@ -2896,17 +2854,17 @@ p_sys_export( USES_REGS1 ) /****************************************************************** - + MANAGING SPY-POINTS - + ******************************************************************/ -static Int +static Int p_is_no_trace( USES_REGS1 ) { /* '$undefined'(P,Mod) */ PredEntry *pe; - pe = Yap_getPred(Deref(ARG1), Deref(ARG2), "undefined/1"); + pe = get_pred(Deref(ARG1), Deref(ARG2), "undefined/1"); if (EndOfPAEntr(pe)) return TRUE; PELOCK(36,pe); @@ -2919,12 +2877,12 @@ p_is_no_trace( USES_REGS1 ) } -static Int +static Int p_set_no_trace( USES_REGS1 ) { /* '$set_no_trace'(+Fun,+M) */ PredEntry *pe; - pe = Yap_getPred(Deref(ARG1), Deref(ARG2), "undefined/1"); + pe = get_pred(Deref(ARG1), Deref(ARG2), "undefined/1"); if (EndOfPAEntr(pe)) return FALSE; PELOCK(36,pe); @@ -2939,7 +2897,7 @@ Yap_SetNoTrace(char *name, arity_t arity, Term tmod) PredEntry *pe; if (arity == 0) { - pe = Yap_getPred(MkAtomTerm(Yap_LookupAtom(name)), tmod, "no_trace"); + pe = get_pred(MkAtomTerm(Yap_LookupAtom(name)), tmod, "no_trace"); } else { pe = RepPredProp(PredPropByFunc(Yap_MkFunctor(Yap_LookupAtom(name), arity),tmod)); } @@ -2952,7 +2910,7 @@ Yap_SetNoTrace(char *name, arity_t arity, Term tmod) } -static Int +static Int p_setspy( USES_REGS1 ) { /* '$set_spy'(+Fun,+M) */ Atom at; @@ -3004,14 +2962,14 @@ p_setspy( USES_REGS1 ) Yap_opcode(_spy_or_trymark); } else { pred->OpcodeOfPred = Yap_opcode(_spy_pred); - pred->CodeOfPred = (yamop *)(&(pred->OpcodeOfPred)); + pred->CodeOfPred = (yamop *)(&(pred->OpcodeOfPred)); } pred->PredFlags |= SpiedPredFlag; UNLOCKPE(37,pred); return TRUE; } -static Int +static Int p_rmspy( USES_REGS1 ) { /* '$rm_spy'(+T,+Mod) */ Atom at; @@ -3044,7 +3002,7 @@ p_rmspy( USES_REGS1 ) pred->PredFlags ^= SpiedPredFlag; UNLOCKPE(39,pred); return TRUE; - } + } #endif if (!(pred->PredFlags & (CountPredFlag|ProfiledPredFlag))) { if (!(pred->PredFlags & DynamicPredFlag)) { @@ -3053,7 +3011,7 @@ p_rmspy( USES_REGS1 ) !(pred->PredFlags & ThreadLocalPredFlag) && pred->ModuleOfPred != IDB_MODULE) { pred->OpcodeOfPred = LOCKPRED_OPCODE; - pred->CodeOfPred = (yamop *)(&(pred->OpcodeOfPred)); + pred->CodeOfPred = (yamop *)(&(pred->OpcodeOfPred)); } else { #endif pred->CodeOfPred = pred->cs.p_code.TrueCodeOfPred; @@ -3075,12 +3033,12 @@ p_rmspy( USES_REGS1 ) /****************************************************************** - + INFO ABOUT PREDICATES - + ******************************************************************/ -static Int +static Int p_number_of_clauses( USES_REGS1 ) { /* '$number_of_clauses'(Predicate,M,N) */ Term t = Deref(ARG1); @@ -3108,13 +3066,13 @@ p_number_of_clauses( USES_REGS1 ) return (Yap_unify_constant(ARG3, MkIntegerTerm(ncl))); } -static Int +static Int p_in_use( USES_REGS1 ) { /* '$in_use'(+P,+Mod) */ PredEntry *pe; Int out; - pe = Yap_getPred(Deref(ARG1), Deref(ARG2), "$in_use"); + pe = get_pred(Deref(ARG1), Deref(ARG2), "$in_use"); if (EndOfPAEntr(pe)) return FALSE; PELOCK(25,pe); @@ -3123,7 +3081,7 @@ p_in_use( USES_REGS1 ) return(out); } -static Int +static Int p_new_multifile( USES_REGS1 ) { /* '$new_multifile'(+N,+Ar,+Mod) */ Atom at; @@ -3145,9 +3103,9 @@ p_new_multifile( USES_REGS1 ) arity = IntOfTerm(t); else return FALSE; - if (arity == 0) + if (arity == 0) pe = RepPredProp(PredPropByAtom(at, mod)); - else + else pe = RepPredProp(PredPropByFunc(Yap_MkFunctor(at, arity),mod)); PELOCK(26,pe); pe->PredFlags |= MultiFileFlag; @@ -3164,13 +3122,13 @@ p_new_multifile( USES_REGS1 ) } -static Int +static Int p_is_multifile( USES_REGS1 ) { /* '$is_multifile'(+S,+Mod) */ PredEntry *pe; bool out; - pe = Yap_getPred(Deref(ARG1), Deref(ARG2), "$is_multifile"); + pe = get_pred(Deref(ARG1), Deref(ARG2), "$is_multifile"); if (EndOfPAEntr(pe)) return FALSE; PELOCK(27,pe); @@ -3179,7 +3137,7 @@ p_is_multifile( USES_REGS1 ) return(out); } -static Int +static Int p_new_discontiguous( USES_REGS1 ) { /* '$new_discontiguous'(+N,+Ar,+Mod) */ Atom at; @@ -3201,9 +3159,9 @@ p_new_discontiguous( USES_REGS1 ) arity = IntOfTerm(t); else return FALSE; - if (arity == 0) + if (arity == 0) pe = RepPredProp(PredPropByAtom(at, mod)); - else + else pe = RepPredProp(PredPropByFunc(Yap_MkFunctor(at, arity),mod)); PELOCK(26,pe); pe->PredFlags |= DiscontiguousPredFlag; @@ -3215,13 +3173,13 @@ p_new_discontiguous( USES_REGS1 ) } -static Int +static Int p_is_discontiguous( USES_REGS1 ) { /* '$is_multifile'(+S,+Mod) */ PredEntry *pe; bool out; - pe = Yap_getPred(Deref(ARG1), Deref(ARG2), "discontiguous"); + pe = get_pred(Deref(ARG1), Deref(ARG2), "discontiguous"); if (EndOfPAEntr(pe)) return FALSE; PELOCK(27,pe); @@ -3230,13 +3188,13 @@ p_is_discontiguous( USES_REGS1 ) return(out); } -static Int +static Int p_is_thread_local( USES_REGS1 ) { /* '$is_dynamic'(+P) */ PredEntry *pe; bool out; - pe = Yap_getPred(Deref(ARG1), Deref(ARG2), "$is_log_updatable"); + pe = get_pred(Deref(ARG1), Deref(ARG2), "$is_log_updatable"); if (EndOfPAEntr(pe)) return FALSE; PELOCK(27,pe); @@ -3245,13 +3203,13 @@ p_is_thread_local( USES_REGS1 ) return(out); } -static Int +static Int p_is_log_updatable( USES_REGS1 ) { /* '$is_dynamic'(+P) */ PredEntry *pe; bool out; - pe = Yap_getPred(Deref(ARG1), Deref(ARG2), "$is_log_updatable"); + pe = get_pred(Deref(ARG1), Deref(ARG2), "$is_log_updatable"); if (EndOfPAEntr(pe)) return FALSE; PELOCK(27,pe); @@ -3260,13 +3218,13 @@ p_is_log_updatable( USES_REGS1 ) return(out); } -static Int +static Int p_is_source( USES_REGS1 ) { /* '$is_dynamic'(+P) */ PredEntry *pe; bool out; - pe = Yap_getPred(Deref(ARG1), Deref(ARG2), "$is_source"); + pe = get_pred(Deref(ARG1), Deref(ARG2), "$is_source"); if (EndOfPAEntr(pe)) return FALSE; PELOCK(28,pe); @@ -3275,14 +3233,14 @@ p_is_source( USES_REGS1 ) return(out); } -static Int +static Int p_is_exo( USES_REGS1 ) { /* '$is_dynamic'(+P) */ PredEntry *pe; bool out; MegaClause *mcl; - pe = Yap_getPred(Deref(ARG1), Deref(ARG2), "$is_exo"); + pe = get_pred(Deref(ARG1), Deref(ARG2), "$is_exo"); if (EndOfPAEntr(pe)) return FALSE; PELOCK(28,pe); @@ -3296,13 +3254,13 @@ p_is_exo( USES_REGS1 ) return(out); } -static Int +static Int p_owner_file( USES_REGS1 ) { /* '$owner_file'(+P,M,F) */ PredEntry *pe; Atom owner; - pe = Yap_getPred(Deref(ARG1), Deref(ARG2), "$is_source"); + pe = get_pred(Deref(ARG1), Deref(ARG2), "$is_source"); if (EndOfPAEntr(pe)) return FALSE; PELOCK(29,pe); @@ -3321,12 +3279,12 @@ p_owner_file( USES_REGS1 ) return Yap_unify(ARG3, MkAtomTerm(owner)); } -static Int +static Int p_set_owner_file( USES_REGS1 ) { /* '$owner_file'(+P,M,F) */ PredEntry *pe; - pe = Yap_getPred(Deref(ARG1), Deref(ARG2), "$is_source"); + pe = get_pred(Deref(ARG1), Deref(ARG2), "$is_source"); if (EndOfPAEntr(pe)) return FALSE; PELOCK(29,pe); @@ -3343,12 +3301,12 @@ p_set_owner_file( USES_REGS1 ) return TRUE; } -static Int +static Int p_mk_d( USES_REGS1 ) { /* '$is_dynamic'(+P) */ PredEntry *pe; - pe = Yap_getPred(Deref(ARG1), Deref(ARG2), "$is_source"); + pe = get_pred(Deref(ARG1), Deref(ARG2), "$is_source"); if (EndOfPAEntr(pe)) return FALSE; PELOCK(30,pe); @@ -3360,13 +3318,13 @@ p_mk_d( USES_REGS1 ) return TRUE; } -static Int +static Int p_is_dynamic( USES_REGS1 ) { /* '$is_dynamic'(+P) */ PredEntry *pe; bool out; - pe = Yap_getPred(Deref(ARG1), Deref(ARG2), "$is_dynamic"); + pe = get_pred(Deref(ARG1), Deref(ARG2), "$is_dynamic"); if (EndOfPAEntr(pe)) return FALSE; PELOCK(31,pe); @@ -3375,13 +3333,13 @@ p_is_dynamic( USES_REGS1 ) return(out); } -static Int +static Int p_is_metapredicate( USES_REGS1 ) { /* '$is_metapredicate'(+P) */ PredEntry *pe; bool out; - pe = Yap_getPred(Deref(ARG1), Deref(ARG2), "$is_meta"); + pe = get_pred(Deref(ARG1), Deref(ARG2), "$is_meta"); if (EndOfPAEntr(pe)) return FALSE; PELOCK(32,pe); @@ -3390,7 +3348,7 @@ p_is_metapredicate( USES_REGS1 ) return out; } -static Int +static Int p_is_expandgoalormetapredicate( USES_REGS1 ) { /* '$is_expand_goal_predicate'(+P) */ PredEntry *pe; @@ -3453,13 +3411,13 @@ p_is_expandgoalormetapredicate( USES_REGS1 ) return(out); } -static Int +static Int p_pred_exists( USES_REGS1 ) { /* '$pred_exists'(+P,+M) */ PredEntry *pe; bool out; - pe = Yap_getPred(Deref(ARG1), Deref(ARG2), "$exists"); + pe = get_pred(Deref(ARG1), Deref(ARG2), "$exists"); if (EndOfPAEntr(pe)) return FALSE; PELOCK(34,pe); @@ -3472,12 +3430,12 @@ p_pred_exists( USES_REGS1 ) return out; } -static Int +static Int p_set_pred_module( USES_REGS1 ) { /* '$set_pred_module'(+P,+Mod) */ PredEntry *pe; - pe = Yap_getPred(Deref(ARG1), CurrentModule, "set_pred_module/1"); + pe = get_pred(Deref(ARG1), CurrentModule, "set_pred_module/1"); if (EndOfPAEntr(pe)) return FALSE; PELOCK(35,pe); @@ -3486,13 +3444,13 @@ p_set_pred_module( USES_REGS1 ) return(TRUE); } -static Int +static Int p_set_pred_owner( USES_REGS1 ) { /* '$set_pred_module'(+P,+File) */ PredEntry *pe; Term a2 = Deref( ARG2 ); - pe = Yap_getPred(Deref(ARG1), CurrentModule, "set_pred_module/1"); + pe = get_pred(Deref(ARG1), CurrentModule, "set_pred_module/1"); if (EndOfPAEntr(pe)) return FALSE; PELOCK(35,pe); @@ -3515,12 +3473,12 @@ p_set_pred_owner( USES_REGS1 ) return(TRUE); } -static Int +static Int p_undefined( USES_REGS1 ) { /* '$undefined'(P,Mod) */ PredEntry *pe; - pe = Yap_getPred(Deref(ARG1), Deref(ARG2), "undefined/1"); + pe = get_pred(Deref(ARG1), Deref(ARG2), "undefined/1"); if (EndOfPAEntr(pe)) return TRUE; PELOCK(36,pe); @@ -3538,15 +3496,15 @@ p_undefined( USES_REGS1 ) /* * this predicate should only be called when all clauses for the dynamic - * predicate were remove, otherwise chaos will follow!! + * predicate were remove, otherwise chaos will follow!! */ -static Int +static Int p_kill_dynamic( USES_REGS1 ) { /* '$kill_dynamic'(P,M) */ PredEntry *pe; - pe = Yap_getPred(Deref(ARG1), Deref(ARG2), "kill_dynamic/1"); + pe = get_pred(Deref(ARG1), Deref(ARG2), "kill_dynamic/1"); if (EndOfPAEntr(pe)) return TRUE; PELOCK(37,pe); @@ -3560,27 +3518,27 @@ p_kill_dynamic( USES_REGS1 ) } pe->cs.p_code.LastClause = pe->cs.p_code.FirstClause = NULL; pe->OpcodeOfPred = UNDEF_OPCODE; - pe->cs.p_code.TrueCodeOfPred = pe->CodeOfPred = (yamop *)(&(pe->OpcodeOfPred)); + pe->cs.p_code.TrueCodeOfPred = pe->CodeOfPred = (yamop *)(&(pe->OpcodeOfPred)); pe->PredFlags = pe->PredFlags & GoalExPredFlag; UNLOCKPE(62,pe); return (TRUE); } -static Int +static Int p_optimizer_on( USES_REGS1 ) { /* '$optimizer_on' */ optimizer_on = TRUE; return (TRUE); } -static Int +static Int p_optimizer_off( USES_REGS1 ) { /* '$optimizer_off' */ optimizer_on = FALSE; return (TRUE); } -static Int +static Int p_compile_mode( USES_REGS1 ) { /* $compile_mode(Old,New) */ Term t2, t3 = MkIntTerm(compile_mode); @@ -3642,7 +3600,7 @@ search_for_static_predicate_in_use(PredEntry *p, int check_everything) /* check first environments that are younger than our latest choicepoint */ if (check_everything && env_ptr) { - /* + /* I do not need to check environments for asserts, only for retracts */ @@ -3657,7 +3615,7 @@ search_for_static_predicate_in_use(PredEntry *p, int check_everything) } } /* now mark the choicepoint */ - + if (b_ptr) pe = PredForChoicePt(b_ptr->cp_ap); else @@ -3674,11 +3632,11 @@ search_for_static_predicate_in_use(PredEntry *p, int check_everything) if (p->PredFlags & LogUpdatePredFlag) { LogUpdIndex *cl = ClauseCodeToLogUpdIndex(code_beg); - if (find_owner_log_index(cl, code_p)) + if (find_owner_log_index(cl, code_p)) b_ptr->cp_ap = cur_log_upd_clause(pe, b_ptr->cp_ap->y_u.Otapl.d); } else if (p->PredFlags & MegaClausePredFlag) { StaticIndex *cl = ClauseCodeToStaticIndex(code_beg); - if (find_owner_static_index(cl, code_p)) + if (find_owner_static_index(cl, code_p)) b_ptr->cp_ap = cur_clause(pe, b_ptr->cp_ap->y_u.Otapl.d); } else { /* static clause */ @@ -3712,7 +3670,7 @@ mark_pred(int mark, PredEntry *pe) } /* go up the chain of choice_points and environments, - marking all static predicates that current execution is depending + marking all static predicates that current execution is depending upon */ static void do_toggle_static_predicates_in_use(int mask) @@ -3728,7 +3686,7 @@ do_toggle_static_predicates_in_use(int mask) /* check first environments that are younger than our latest choicepoint */ while (b_ptr > (choiceptr)env_ptr) { PredEntry *pe = EnvPreg((yamop *)env_ptr[E_CP]); - + mark_pred(mask, pe); env_ptr = (CELL *)(env_ptr[E_E]); } @@ -3752,7 +3710,7 @@ find_owner_log_index(LogUpdIndex *cl, yamop *code_p) { yamop *code_beg = cl->ClCode; yamop *code_end = (yamop *)((char *)cl + cl->ClSize); - + if (code_p >= code_beg && code_p <= code_end) { return cl; } @@ -3772,7 +3730,7 @@ find_owner_static_index(StaticIndex *cl, yamop *code_p) { yamop *code_beg = cl->ClCode; yamop *code_end = (yamop *)((char *)cl + cl->ClSize); - + if (code_p >= code_beg && code_p <= code_end) { return cl; } @@ -3806,7 +3764,7 @@ all_envs(CELL *env_ptr USES_REGS) Term tf = AbsPair(HR); CELL *start = HR; CELL *bp = NULL; - + /* walk the environment chain */ while (env_ptr) { bp = HR; @@ -3818,13 +3776,13 @@ all_envs(CELL *env_ptr USES_REGS) LOCAL_Error_Size = (ASP-1024)-HR; while (env_ptr) { LOCAL_Error_Size += 2; - env_ptr = (CELL *)(env_ptr[E_E]); + env_ptr = (CELL *)(env_ptr[E_E]); } return 0L; } else { bp[1] = AbsPair(HR); } - env_ptr = (CELL *)(env_ptr[E_E]); + env_ptr = (CELL *)(env_ptr[E_E]); } bp[1] = TermNil; return tf; @@ -3938,7 +3896,7 @@ p_toggle_static_predicates_in_use( USES_REGS1 ) #if !defined(YAPOR) && !defined(THREADS) Term t = Deref(ARG1); Int mask; - + /* find out whether we need to mark or unmark */ if (IsVarTerm(t)) { Yap_Error(INSTANTIATION_ERROR,t,"toggle_static_predicates_in_use/1"); @@ -3974,7 +3932,7 @@ clause_was_found(PredEntry *pp, Atom *pat, arity_t *parity) { *pat = NameOfFunctor(pp->FunctorOfPred); } else { *pat = (Atom)(pp->FunctorOfPred); - } + } } } @@ -4040,7 +3998,7 @@ find_code_in_clause(PredEntry *pp, yamop *codeptr, CODEADDR *startp, CODEADDR *e } else if (pp->PredFlags & DynamicPredFlag) { do { DynamicClause *cl; - + cl = ClauseCodeToDynamicClause(clcode); if (IN_BLOCK(codeptr,cl,cl->ClSize)) { if (startp) @@ -4056,7 +4014,7 @@ find_code_in_clause(PredEntry *pp, yamop *codeptr, CODEADDR *startp, CODEADDR *e } while (TRUE); } else if (pp->PredFlags & MegaClausePredFlag) { MegaClause *cl; - + cl = ClauseCodeToMegaClause(clcode); if (IN_BLOCK(codeptr,cl,cl->ClSize)) { if (startp) @@ -4067,7 +4025,7 @@ find_code_in_clause(PredEntry *pp, yamop *codeptr, CODEADDR *startp, CODEADDR *e } } else { StaticClause *cl; - + cl = ClauseCodeToStaticClause(clcode); do { if (IN_BLOCK(codeptr,cl,cl->ClSize)) { @@ -4122,7 +4080,7 @@ cl_code_in_pred(PredEntry *pp, yamop *codeptr, CODEADDR *startp, CODEADDR *endp) } else { out = find_code_in_clause(pp, codeptr, startp, endp); } - UNLOCK(pp->PELock); + UNLOCK(pp->PELock); if (out) return TRUE; return FALSE; } @@ -4191,7 +4149,7 @@ Yap_PredForCode(yamop *codeptr, find_pred_type where_from, Atom *pat, arity_t *p *pmodule = TermProlog; else *pmodule = p->ModuleOfPred; - out = find_code_in_clause(p, codeptr, NULL, NULL); + out = find_code_in_clause(p, codeptr, NULL, NULL); clause_was_found(p, pat, parity); return out; } @@ -4651,13 +4609,13 @@ p_system_pred( USES_REGS1 ) Functor funt = FunctorOfTerm(t1); if (IsExtensionFunctor(funt)) { return FALSE; - } + } if (funt == FunctorModule) { Term nmod = ArgOfTerm(1, t1); if (IsVarTerm(nmod)) { Yap_Error(INSTANTIATION_ERROR,ARG1,"system_predicate/1"); return FALSE; - } + } if (!IsAtomTerm(nmod)) { Yap_Error(TYPE_ERROR_ATOM,ARG1,"system_predicate/1"); return FALSE; @@ -4696,13 +4654,13 @@ p_all_system_pred( USES_REGS1 ) Functor funt = FunctorOfTerm(t1); if (IsExtensionFunctor(funt)) { return FALSE; - } + } if (funt == FunctorModule) { Term nmod = ArgOfTerm(1, t1); if (IsVarTerm(nmod)) { Yap_Error(INSTANTIATION_ERROR,ARG1,"system_predicate/1"); return FALSE; - } + } if (!IsAtomTerm(nmod)) { Yap_Error(TYPE_ERROR_ATOM,ARG1,"system_predicate/1"); return FALSE; @@ -4723,7 +4681,7 @@ p_all_system_pred( USES_REGS1 ) } else { if (!Yap_unify(ARG3,TermProlog)) return FALSE; - } + } return(!pe->ModuleOfPred || /* any predicate in prolog module */ /* any C-pred */ pe->PredFlags & (UserCPredFlag|CPredFlag|BinaryPredFlag|AsmPredFlag|TestPredFlag) || @@ -4732,59 +4690,126 @@ p_all_system_pred( USES_REGS1 ) } void -Yap_HidePred(PredEntry *pe, bool offline) +Yap_HidePred(PredEntry *pe) { - if (offline) { - Prop p0 = AbsPredProp(pe); - if(pe->ArityOfPE == 0) { - Atom a = (Atom)pe->FunctorOfPred; + Prop p0 = AbsPredProp(pe); + if (pe->ArityOfPE == 0) { + Atom a = (Atom)pe->FunctorOfPred; - p0 = RepAtom(a)->PropsOfAE; - if (p0 == AbsPredProp(pe)) { - RepAtom(a)->PropsOfAE = pe->NextOfPE; - } else { - while (p0->NextOfPE != AbsPredProp(pe)) - p0 = p0->NextOfPE; - if (p0 == NIL) - return; - } + p0 = RepAtom(a)->PropsOfAE; + if (p0 == AbsPredProp(pe)) { + RepAtom(a)->PropsOfAE = pe->NextOfPE; } else { - Functor funt = pe->FunctorOfPred; - - p0 = funt->PropsOfFE; - if (p0 == AbsPredProp(pe)) { - funt->PropsOfFE = pe->NextOfPE; - } else { - while (p0->NextOfPE != AbsPredProp(pe)) - p0 = p0->NextOfPE; - if (p0 == NIL) - return; - } + while (p0->NextOfPE != AbsPredProp(pe)) + p0 = p0->NextOfPE; + if (p0 == NIL) + return; + p0->NextOfPE = pe->NextOfPE; + } + } else { + Functor funt = pe->FunctorOfPred; + + p0 = funt->PropsOfFE; + if (p0 == AbsPredProp(pe)) { + funt->PropsOfFE = pe->NextOfPE; + } else { + while (p0->NextOfPE != AbsPredProp(pe)) + p0 = p0->NextOfPE; + if (p0 == NIL) + return; + p0->NextOfPE = pe->NextOfPE; } - p0->NextOfPE = pe->NextOfPE; - pe->NextOfPE = HIDDEN_PREDICATES; - HIDDEN_PREDICATES = AbsPredProp(pe); } - pe->PredFlags |= (HiddenPredFlag|NoTracePredFlag|NoSpyPredFlag); + pe->NextOfPE = HIDDEN_PREDICATES; + HIDDEN_PREDICATES = AbsPredProp(pe); + pe->PredFlags |= HiddenPredFlag; } static Int /* $system_predicate(P) */ p_stash_predicate( USES_REGS1 ) { - PredEntry *pe = Yap_getPred( Deref(ARG1), Deref(ARG2), "stash_predicate/1" ); + PredEntry *pe; + + Term t1 = Deref(ARG1); + Term mod = Deref(ARG2); + + restart_system_pred: + if (IsVarTerm(t1)) + return (FALSE); + if (IsAtomTerm(t1)) { + Atom a = AtomOfTerm(t1); + + pe = RepPredProp(Yap_GetPredPropByAtom(a, mod)); + } else if (IsApplTerm(t1)) { + Functor funt = FunctorOfTerm(t1); + if (IsExtensionFunctor(funt)) { + return(FALSE); + } + if (funt == FunctorModule) { + Term nmod = ArgOfTerm(1, t1); + if (IsVarTerm(nmod)) { + Yap_Error(INSTANTIATION_ERROR,ARG1,"hide_predicate/1"); + return(FALSE); + } + if (!IsAtomTerm(nmod)) { + Yap_Error(TYPE_ERROR_ATOM,ARG1,"hide_predicate/1"); + return(FALSE); + } + t1 = ArgOfTerm(2, t1); + goto restart_system_pred; + } + pe = RepPredProp(Yap_GetPredPropByFunc(funt, mod)); + } else if (IsPairTerm(t1)) { + return TRUE; + } else + return FALSE; if (EndOfPAEntr(pe)) return FALSE; - Yap_HidePred(pe, true); + Yap_HidePred(pe); return TRUE; } static Int /* $system_predicate(P) */ p_hide_predicate( USES_REGS1 ) { - PredEntry *pe = Yap_getPred( Deref(ARG1), Deref(ARG2), "hide_predicate/1" ); + PredEntry *pe; + + Term t1 = Deref(ARG1); + Term mod = Deref(ARG2); + + restart_system_pred: + if (IsVarTerm(t1)) + return (FALSE); + if (IsAtomTerm(t1)) { + Atom a = AtomOfTerm(t1); + + pe = RepPredProp(Yap_GetPredPropByAtom(a, mod)); + } else if (IsApplTerm(t1)) { + Functor funt = FunctorOfTerm(t1); + if (IsExtensionFunctor(funt)) { + return(FALSE); + } + if (funt == FunctorModule) { + Term nmod = ArgOfTerm(1, t1); + if (IsVarTerm(nmod)) { + Yap_Error(INSTANTIATION_ERROR,ARG1,"hide_predicate/1"); + return(FALSE); + } + if (!IsAtomTerm(nmod)) { + Yap_Error(TYPE_ERROR_ATOM,ARG1,"hide_predicate/1"); + return(FALSE); + } + t1 = ArgOfTerm(2, t1); + goto restart_system_pred; + } + pe = RepPredProp(Yap_GetPredPropByFunc(funt, mod)); + } else if (IsPairTerm(t1)) { + return TRUE; + } else + return FALSE; if (EndOfPAEntr(pe)) return FALSE; - Yap_HidePred(pe, false); + pe->PredFlags |= HiddenPredFlag; return TRUE; } @@ -4792,10 +4817,42 @@ p_hide_predicate( USES_REGS1 ) static Int /* $hidden_predicate(P) */ p_hidden_predicate( USES_REGS1 ) { - PredEntry *pe = Yap_getPred( Deref(ARG1), Deref(ARG2), "hidden_predicate/1" ); + PredEntry *pe; + + Term t1 = Deref(ARG1); + Term mod = Deref(ARG2); + + restart_system_pred: + if (IsVarTerm(t1)) + return (FALSE); + if (IsAtomTerm(t1)) { + pe = RepPredProp(Yap_GetPredPropByAtom(AtomOfTerm(t1), mod)); + } else if (IsApplTerm(t1)) { + Functor funt = FunctorOfTerm(t1); + if (IsExtensionFunctor(funt)) { + return(FALSE); + } + if (funt == FunctorModule) { + Term nmod = ArgOfTerm(1, t1); + if (IsVarTerm(nmod)) { + Yap_Error(INSTANTIATION_ERROR,ARG1,"hide_predicate/1"); + return(FALSE); + } + if (!IsAtomTerm(nmod)) { + Yap_Error(TYPE_ERROR_ATOM,ARG1,"hide_predicate/1"); + return(FALSE); + } + t1 = ArgOfTerm(2, t1); + goto restart_system_pred; + } + pe = RepPredProp(Yap_GetPredPropByFunc(funt, mod)); + } else if (IsPairTerm(t1)) { + return (TRUE); + } else + return (FALSE); if (EndOfPAEntr(pe)) - return FALSE; - return pe->PredFlags & HiddenPredFlag; + return(FALSE); + return(pe->PredFlags & HiddenPredFlag); } static Int @@ -4857,7 +4914,7 @@ fetch_next_lu_clause(PredEntry *pe, yamop *i_code, Term th, Term tb, Term tr, ya #if defined(YAPOR) || defined(THREADS) if (pe->PredFlags & ThreadLocalPredFlag) { /* we don't actually need to execute code */ - UNLOCK(pe->PELock); + UNLOCK(pe->PELock); } else { PP = pe; } @@ -4928,7 +4985,7 @@ p_log_update_clause( USES_REGS1 ) } else { new_cp = P; } - pe = Yap_getPred(t1, Deref(ARG2), "clause/3"); + pe = get_pred(t1, Deref(ARG2), "clause/3"); if (pe == NULL || EndOfPAEntr(pe)) return FALSE; PELOCK(41,pe); @@ -5004,7 +5061,7 @@ fetch_next_lu_clause_erase(PredEntry *pe, yamop *i_code, Term th, Term tb, Term #if defined(YAPOR) || defined(THREADS) if (pe->PredFlags & ThreadLocalPredFlag) { /* we don't actually need to execute code */ - UNLOCK(pe->PELock); + UNLOCK(pe->PELock); } else { PP = pe; } @@ -5079,7 +5136,7 @@ p_log_update_clause_erase( USES_REGS1 ) } else { new_cp = P; } - pe = Yap_getPred(t1, Deref(ARG2), "clause/3"); + pe = get_pred(t1, Deref(ARG2), "clause/3"); if (pe == NULL || EndOfPAEntr(pe)) return FALSE; PELOCK(43,pe); @@ -5127,7 +5184,7 @@ replace_integer(Term orig, UInt new) { CELL *pt; - if (IntInBnd((Int)new)) + if (IntInBnd((Int)new)) return MkIntTerm(new); /* should create an old integer */ if (!IsApplTerm(orig)) { @@ -5349,7 +5406,7 @@ fetch_next_static_clause(PredEntry *pe, yamop *i_code, Term th, Term tb, Term tr return TRUE; } else { Term t; - + if (!(pe->PredFlags & SourcePredFlag)) { /* no source */ rtn = Yap_MkStaticRefTerm(cl, pe); @@ -5426,7 +5483,7 @@ p_static_clause( USES_REGS1 ) } else { new_cp = P; } - pe = Yap_getPred(t1, Deref(ARG2), "clause/3"); + pe = get_pred(t1, Deref(ARG2), "clause/3"); if (pe == NULL || EndOfPAEntr(pe)) return FALSE; PELOCK(46,pe); @@ -5500,7 +5557,7 @@ add_code_in_pred(PredEntry *pp) { StaticIndex *cl = ClauseCodeToStaticIndex(clcode); add_code_in_static_index(cl, pp); } - } + } clcode = pp->cs.p_code.FirstClause; if (clcode != NULL) { if (pp->PredFlags & LogUpdatePredFlag) { @@ -5537,7 +5594,7 @@ add_code_in_pred(PredEntry *pp) { } while (TRUE); } } - UNLOCK(pp->PELock); + UNLOCK(pp->PELock); } @@ -5648,7 +5705,7 @@ p_static_pred_statistics( USES_REGS1 ) Int out; PredEntry *pe; - pe = Yap_getPred( Deref(ARG1), Deref(ARG2), "predicate_statistics"); + pe = get_pred( Deref(ARG1), Deref(ARG2), "predicate_statistics"); if (pe == NIL) return (FALSE); PELOCK(50,pe); @@ -5673,7 +5730,7 @@ p_predicate_erased_statistics( USES_REGS1 ) Term tpred = ArgOfTerm(2,Deref(ARG1)); Term tmod = ArgOfTerm(1,Deref(ARG1)); - if (EndOfPAEntr(pe=Yap_getPred(tpred, tmod, "predicate_erased_statistics"))) + if (EndOfPAEntr(pe=get_pred(tpred, tmod, "predicate_erased_statistics"))) return FALSE; while (cl) { if (cl->ClPred == pe) { @@ -5783,7 +5840,7 @@ UnifyPredInfo(PredEntry *pe, int start_arg USES_REGS) { tname = MkAtomTerm(NameOfFunctor(f)); } } - + return Yap_unify(XREGS[start_arg], tmod) && Yap_unify(XREGS[start_arg+1],tname) && Yap_unify(XREGS[start_arg+2],MkIntegerTerm(arity)); @@ -5804,12 +5861,12 @@ p_env_info( USES_REGS1 ) CELL *env = LCL0-IntegerOfTerm(Deref(ARG1)); yamop *env_cp; Term env_b, taddr; - + if (!env) return FALSE; env_b = MkIntegerTerm((Int)(LCL0-(CELL *)env[E_CB])); env_cp = (yamop *)env[E_CP]; - + /* pe = PREVOP(env_cp,Osbpp)->y_u.Osbpp.p0; */ taddr = MkIntegerTerm((Int)env); return Yap_unify(ARG3,MkIntegerTerm((Int)env_cp)) && @@ -5837,7 +5894,7 @@ p_choicepoint_info( USES_REGS1 ) yamop *ipc = cptr->cp_ap; yamop *ncl = NULL; Term t = TermNil, taddr; - + taddr = MkIntegerTerm((Int)cptr); while (go_on) { op_numbers opnum = Yap_op_from_opcode(ipc->opc); @@ -5995,9 +6052,9 @@ p_choicepoint_info( USES_REGS1 ) ncl = NULL; pe = ipc->y_u.lp.p; t = BuildActivePred(pe, cptr->cp_args); - break; + break; case _Nstop: - { + { Atom at = AtomLive; t = MkAtomTerm(at); pe = RepPredProp(PredPropByAtom(at, CurrentModule)); @@ -6037,7 +6094,7 @@ compute_dbcl_size(arity_t arity) break; default: sz = arity*(UInt)NEXTOP((yamop *)NULL,xc); - break; + break; } return (UInt)NEXTOP((yamop *)sz,p); } @@ -6045,7 +6102,7 @@ compute_dbcl_size(arity_t arity) #define DerefAndCheck(t, V) \ t = Deref(V); if(IsVarTerm(t) || !(IsAtomOrIntTerm(t))) Yap_Error(TYPE_ERROR_ATOM, t0, "load_db"); -static int +static int store_dbcl_size(yamop *pc, arity_t arity, Term t0, PredEntry *pe) { Term t; @@ -6127,14 +6184,14 @@ store_dbcl_size(yamop *pc, arity_t arity, Term t0, PredEntry *pe) pc = NEXTOP(pc,xc); } } - break; + break; } pc->opc = Yap_opcode(_procceed); pc->y_u.p.p = pe; return TRUE; } -static Int +static Int p_dbload_get_space( USES_REGS1 ) { /* '$number_of_clauses'(Predicate,M,N) */ Term t = Deref(ARG1); @@ -6212,13 +6269,13 @@ p_dbload_get_space( USES_REGS1 ) } else { ap->OpcodeOfPred = INDEX_OPCODE; } - ap->CodeOfPred = ap->cs.p_code.TrueCodeOfPred = (yamop *)(&(ap->OpcodeOfPred)); + ap->CodeOfPred = ap->cs.p_code.TrueCodeOfPred = (yamop *)(&(ap->OpcodeOfPred)); ptr = (yamop *)((ADDR)mcl->ClCode+ncls*sz); ptr->opc = Yap_opcode(_Ystop); return Yap_unify(ARG4, MkIntegerTerm((Int)mcl)); } -static Int +static Int p_dbassert( USES_REGS1 ) { /* '$number_of_clauses'(Predicate,M,N) */ Term thandle = Deref(ARG2); @@ -6248,7 +6305,7 @@ p_dbassert( USES_REGS1 ) #define CL_PROP_STREAM 5 /* instance(+Ref,?Term) */ -static Int +static Int p_instance_property( USES_REGS1 ) { Term t1 = Deref(ARG1); @@ -6282,14 +6339,14 @@ p_instance_property( USES_REGS1 ) return FALSE; } else { Term t[2]; - + if (ap->ArityOfPE == 0) { t[1] = MkAtomTerm((Atom)ap->FunctorOfPred); } else { Functor nf = ap->FunctorOfPred; arity_t arity = ArityOfFunctor(nf); Atom name = NameOfFunctor(nf); - + t[0] = MkAtomTerm(name); t[1] = MkIntegerTerm(arity); t[1] = Yap_MkApplTerm(FunctorSlash, 2, t); @@ -6334,7 +6391,7 @@ p_instance_property( USES_REGS1 ) arity_t arity = ArityOfFunctor(nf); Atom name = NameOfFunctor(nf); Term t[2]; - + t[0] = MkAtomTerm(name); t[1] = MkIntegerTerm(arity); t[1] = Yap_MkApplTerm(FunctorSlash, 2, t); @@ -6382,7 +6439,7 @@ p_instance_property( USES_REGS1 ) Functor nf = ap->FunctorOfPred; arity_t arity = ArityOfFunctor(nf); Atom name = NameOfFunctor(nf); - + t[0] = MkAtomTerm(name); t[1] = MkIntegerTerm(arity); t[1] = Yap_MkApplTerm(FunctorSlash, 2, t); @@ -6436,15 +6493,15 @@ p_nth_instance( USES_REGS1 ) } Count = IntegerOfTerm(TCount); if (Count <= 0) { - if (Count) + if (Count) Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, TCount, "nth_clause/3"); else Yap_Error(DOMAIN_ERROR_NOT_ZERO, TCount, "nth_clause/3"); return FALSE; } - pe = Yap_getPred(Deref(ARG1), Deref(ARG2), "nth_clause/3"); + pe = get_pred(Deref(ARG1), Deref(ARG2), "nth_clause/3"); if (pe) { - PELOCK(47,pe); + PELOCK(47,pe); } if (Deref(ARG2) == IDB_MODULE) { return Yap_db_nth_recorded( pe, Count PASS_REGS ); @@ -6471,14 +6528,14 @@ p_nth_instance( USES_REGS1 ) } cl0 = Yap_NthClause(pe, Count); ARG4 = Yap_GetFromSlot( sl4 PASS_REGS ); - LOCAL_CurSlot = CurSlot; + LOCAL_CurSlot = CurSlot; if (cl0 == NULL) { UNLOCK(pe->PELock); return FALSE; } if (pe->PredFlags & LogUpdatePredFlag) { LogUpdClause *cl = cl0; - + #if MULTIPLE_STACKS TRAIL_CLREF(cl); /* So that fail will erase it */ INC_CLREF_COUNT(cl); @@ -6537,7 +6594,7 @@ p_nth_instance( USES_REGS1 ) } } else if (IsApplTerm(t4)) { Functor f = FunctorOfTerm(t4); - + if (f == FunctorStaticClause) { StaticClause *cl = Yap_ClauseFromTerm(t4), *cl0; pe = (PredEntry *)IntegerOfTerm(ArgOfTerm(2, t4)); @@ -6613,12 +6670,12 @@ p_nth_instance( USES_REGS1 ) } else { if (!Yap_unify(ARG2,pred_module)) return FALSE; - } - return TRUE; + } + return TRUE; } -void +void Yap_InitCdMgr(void) { CACHE_REGS @@ -6704,3 +6761,4 @@ Yap_InitCdMgr(void) Yap_InitCPred("$predicate_live_cps", 4, p_predicate_lu_cps, 0L); #endif } + diff --git a/C/control_absmi_insts.h b/C/control_absmi_insts.h deleted file mode 100644 index 74f0ad309..000000000 --- a/C/control_absmi_insts.h +++ /dev/null @@ -1,551 +0,0 @@ -/************************************************************************\ - * Cut & Commit Instructions * -\************************************************************************/ - -#ifdef INDENT_CODE -{ - { - { -#endif /* INDENT_CODE */ - - /* cut */ - Op(cut, s); -#ifdef COROUTINING - CACHE_Y_AS_ENV(YREG); - check_stack(NoStackCut, HR); - ENDCACHE_Y_AS_ENV(); - do_cut: -#endif - SET_ASP(YREG, PREG->y_u.s.s); - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, s),Osbpp),l); - /* assume cut is always in stack */ - saveregs(); - prune((choiceptr)YREG[E_CB] PASS_REGS); - setregs(); - GONext(); - -#ifdef COROUTINING - NoStackCut: - PROCESS_INT(interrupt_cut, do_cut); -#endif - - ENDOp(); - - /* cut_t */ - /* cut_t does the same as cut */ - Op(cut_t, s); -#ifdef COROUTINING - CACHE_Y_AS_ENV(YREG); - check_stack(NoStackCutT, HR); - ENDCACHE_Y_AS_ENV(); - do_cut_t: -#endif - SET_ASP(YREG, PREG->y_u.s.s); - /* assume cut is always in stack */ - saveregs(); - prune((choiceptr)YREG[E_CB] PASS_REGS); - setregs(); - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, s),Osbpp),l); - GONext(); - -#ifdef COROUTINING - NoStackCutT: - PROCESS_INT(interrupt_cut_t, do_cut_t); -#endif - - ENDOp(); - - /* cut_e */ - Op(cut_e, s); -#ifdef COROUTINING - CACHE_Y_AS_ENV(YREG); - check_stack(NoStackCutE, HR); - ENDCACHE_Y_AS_ENV(); - do_cut_e: -#endif - SET_ASP(YREG, PREG->y_u.s.s); - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, s),Osbpp),l); - saveregs(); - prune((choiceptr)SREG[E_CB] PASS_REGS); - setregs(); - GONext(); - -#ifdef COROUTINING - NoStackCutE: - PROCESS_INT(interrupt_cut_e, do_cut_e); -#endif - - ENDOp(); - - /* save_b_x Xi */ - Op(save_b_x, x); - BEGD(d0); - d0 = PREG->y_u.x.x; -#if defined(YAPOR_SBA) && defined(FROZEN_STACKS) - XREG(d0) = MkIntegerTerm((Int)B); -#else - XREG(d0) = MkIntegerTerm(LCL0-(CELL *) (B)); -#endif /* YAPOR_SBA && FROZEN_STACKS */ - PREG = NEXTOP(PREG, x); - ENDD(d0); - GONext(); - ENDOp(); - - /* save_b_y Yi */ - Op(save_b_y, y); -#if defined(YAPOR_SBA) - INITIALIZE_PERMVAR(YREG+PREG->y_u.y.y,MkIntegerTerm((Int)B)); -#else - INITIALIZE_PERMVAR(YREG+PREG->y_u.y.y,MkIntegerTerm(LCL0-(CELL *)(B))); -#endif /* YAPOR_SBA*/ - PREG = NEXTOP(PREG, y); - GONext(); - ENDOp(); - - /* commit_b_x Xi */ - Op(commit_b_x, xps); -#ifdef COROUTINING - CACHE_Y_AS_ENV(YREG); - check_stack(NoStackCommitX, HR); - ENDCACHE_Y_AS_ENV(); - do_commit_b_x: -#endif - BEGD(d0); - d0 = XREG(PREG->y_u.xps.x); - deref_head(d0, commit_b_x_unk); - commit_b_x_nvar: - /* skip a void call and a label */ - SET_ASP(YREG, PREG->y_u.xps.s); - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xps),Osbpp),l); - { - choiceptr pt0; -#if defined(YAPOR_SBA) && defined(FROZEN_STACKS) - pt0 = (choiceptr)IntegerOfTerm(d0); -#else - pt0 = (choiceptr)(LCL0-IntegerOfTerm(d0)); -#endif /* YAPOR_SBA && FROZEN_STACKS */ - saveregs(); - prune(pt0 PASS_REGS); - setregs(); - } - GONext(); - - BEGP(pt1); - deref_body(d0, pt1, commit_b_x_unk, commit_b_x_nvar); - ENDP(pt1); - /* never cut to a variable */ - /* Abort */ - FAIL(); - ENDD(d0); - -#ifdef COROUTINING - /* Problem: have I got an environment or not? */ - NoStackCommitX: - PROCESS_INT(interrupt_commit_x, do_commit_b_x); -#endif - ENDOp(); - - /* commit_b_y Yi */ - Op(commit_b_y, yps); -#ifdef COROUTINING - CACHE_Y_AS_ENV(YREG); - check_stack(NoStackCommitY, HR); - ENDCACHE_Y_AS_ENV(); - do_commit_b_y: -#endif - BEGD(d0); - d0 = YREG[PREG->y_u.yps.y]; - deref_head(d0, commit_b_y_unk); - commit_b_y_nvar: - SET_ASP(YREG, PREG->y_u.yps.s); - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yps),Osbpp),l); - { - choiceptr pt0; -#if defined(YAPOR_SBA) && defined(FROZEN_STACKS) - pt0 = (choiceptr)IntegerOfTerm(d0); -#else - pt0 = (choiceptr)(LCL0-IntegerOfTerm(d0)); -#endif - saveregs(); - prune(pt0 PASS_REGS); - setregs(); - } - GONext(); - - BEGP(pt1); - deref_body(d0, pt1, commit_b_y_unk, commit_b_y_nvar); - ENDP(pt1); - /* never cut to a variable */ - /* Abort */ - FAIL(); - ENDD(d0); - -#ifdef COROUTINING - /* This is easier: I know there is an environment so I cannot do allocate */ - NoStackCommitY: - PROCESS_INT(interrupt_commit_y, do_commit_b_y); -#endif - ENDOp(); - - /************************************************************************* - * Call / Proceed instructions * - *************************************************************************/ - - /* Macros for stack trimming */ - - /* execute Label */ - BOp(execute, pp); - { - PredEntry *pt0; - CACHE_Y_AS_ENV(YREG); - pt0 = PREG->y_u.pp.p; -#ifndef NO_CHECKING - check_stack(NoStackExecute, HR); - goto skip_do_execute; -#endif - do_execute: - FETCH_Y_FROM_ENV(YREG); - pt0 = PREG->y_u.pp.p; - skip_do_execute: -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - low_level_trace(enter_pred,pt0,XREGS+1); - } -#endif /* LOW_LEVEL_TRACE */ - CACHE_A1(); - ALWAYS_LOOKAHEAD(pt0->OpcodeOfPred); - BEGD(d0); - d0 = (CELL)B; - PREG = pt0->CodeOfPred; - /* for profiler */ - save_pc(); - ENV_YREG[E_CB] = d0; - ENDD(d0); -#ifdef DEPTH_LIMIT - if (DEPTH <= MkIntTerm(1)) {/* I assume Module==0 is prolog */ - if (pt0->ModuleOfPred) { - if (DEPTH == MkIntTerm(0)) - FAIL(); - else DEPTH = RESET_DEPTH(); - } - } else if (pt0->ModuleOfPred) - DEPTH -= MkIntConstant(2); -#endif /* DEPTH_LIMIT */ - /* this is the equivalent to setting up the stack */ - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - ENDCACHE_Y_AS_ENV(); - } - - NoStackExecute: - PROCESS_INT(interrupt_execute, do_execute); - - ENDBOp(); - - /* dexecute Label */ - /* joint deallocate and execute */ - BOp(dexecute, pp); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) - low_level_trace(enter_pred,PREG->y_u.pp.p,XREGS+1); -#endif /* LOW_LEVEL_TRACER */ - CACHE_Y_AS_ENV(YREG); - { - PredEntry *pt0; - - CACHE_A1(); - pt0 = PREG->y_u.pp.p; -#ifndef NO_CHECKING - /* check stacks */ - check_stack(NoStackDExecute, HR); - goto skip_dexecute; -#endif - continue_dexecute: - FETCH_Y_FROM_ENV(YREG); - pt0 = PREG->y_u.pp.p; - skip_dexecute: -#ifdef DEPTH_LIMIT - if (DEPTH <= MkIntTerm(1)) {/* I assume Module==0 is primitives */ - if (pt0->ModuleOfPred) { - if (DEPTH == MkIntTerm(0)) - FAIL(); - else DEPTH = RESET_DEPTH(); - } - } else if (pt0->ModuleOfPred) - DEPTH -= MkIntConstant(2); -#endif /* DEPTH_LIMIT */ - PREG = pt0->CodeOfPred; - /* for profiler */ - save_pc(); - ALWAYS_LOOKAHEAD(pt0->OpcodeOfPred); - /* do deallocate */ - CPREG = (yamop *) ENV_YREG[E_CP]; - ENV_YREG = ENV = (CELL *) ENV_YREG[E_E]; -#ifdef FROZEN_STACKS - { - choiceptr top_b = PROTECT_FROZEN_B(B); -#ifdef YAPOR_SBA - if (ENV_YREG > (CELL *) top_b || ENV_YREG < HR) ENV_YREG = (CELL *) top_b; -#else - if (ENV_YREG > (CELL *) top_b) ENV_YREG = (CELL *) top_b; -#endif /* YAPOR_SBA */ - else ENV_YREG = (CELL *)((CELL)ENV_YREG + ENV_Size(CPREG)); - } -#else - if (ENV_YREG > (CELL *)B) { - ENV_YREG = (CELL *)B; - } - else { - ENV_YREG = (CELL *) ((CELL) ENV_YREG + ENV_Size(CPREG)); - } -#endif /* FROZEN_STACKS */ - WRITEBACK_Y_AS_ENV(); - /* setup GB */ - ENV_YREG[E_CB] = (CELL) B; - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - } - ENDCACHE_Y_AS_ENV(); - - NoStackDExecute: - PROCESS_INT(interrupt_dexecute, continue_dexecute); - - ENDBOp(); - - BOp(fcall, Osbpp); - CACHE_Y_AS_ENV(YREG); - ENV_YREG[E_CP] = (CELL) CPREG; - ENV_YREG[E_E] = (CELL) ENV; -#ifdef DEPTH_LIMIT - ENV_YREG[E_DEPTH] = DEPTH; -#endif /* DEPTH_LIMIT */ - ENDCACHE_Y_AS_ENV(); - ENDBOp(); - - BOp(call, Osbpp); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - low_level_trace(enter_pred,PREG->y_u.Osbpp.p,XREGS+1); - } -#endif /* LOW_LEVEL_TRACER */ - CACHE_Y_AS_ENV(YREG); - { - PredEntry *pt; - CACHE_A1(); - pt = PREG->y_u.Osbpp.p; -#ifndef NO_CHECKING - check_stack(NoStackCall, HR); - goto skip_call; -#endif - call_body: - /* external jump if we don;t want to creep */ - FETCH_Y_FROM_ENV(YREG); - pt = PREG->y_u.Osbpp.p; - skip_call: - ENV = ENV_YREG; - /* Try to preserve the environment */ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + PREG->y_u.Osbpp.s); - CPREG = NEXTOP(PREG, Osbpp); - ALWAYS_LOOKAHEAD(pt->OpcodeOfPred); - PREG = pt->CodeOfPred; - /* for profiler */ - save_pc(); -#ifdef DEPTH_LIMIT - if (DEPTH <= MkIntTerm(1)) {/* I assume Module==0 is primitives */ - if (pt->ModuleOfPred) { - if (DEPTH == MkIntTerm(0)) - FAIL(); - else DEPTH = RESET_DEPTH(); - } - } else if (pt->ModuleOfPred) - DEPTH -= MkIntConstant(2); -#endif /* DEPTH_LIMIT */ -#ifdef FROZEN_STACKS - { - choiceptr top_b = PROTECT_FROZEN_B(B); -#ifdef YAPOR_SBA - if (ENV_YREG > (CELL *) top_b || ENV_YREG < HR) ENV_YREG = (CELL *) top_b; -#else - if (ENV_YREG > (CELL *) top_b) ENV_YREG = (CELL *) top_b; -#endif /* YAPOR_SBA */ - } -#else - if (ENV_YREG > (CELL *) B) { - ENV_YREG = (CELL *) B; - } -#endif /* FROZEN_STACKS */ - WRITEBACK_Y_AS_ENV(); - /* setup GB */ - ENV_YREG[E_CB] = (CELL) B; -#ifdef YAPOR - SCH_check_requests(); -#endif /* YAPOR */ - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - } - ENDCACHE_Y_AS_ENV(); - ENDBOp(); - - BOp(procceed, p); - CACHE_Y_AS_ENV(YREG); - ALWAYS_LOOKAHEAD(CPREG->opc); - PREG = CPREG; - /* for profiler */ - save_pc(); - ENV_YREG = ENV; -#ifdef DEPTH_LIMIT - DEPTH = ENV_YREG[E_DEPTH]; -#endif - WRITEBACK_Y_AS_ENV(); - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - ENDCACHE_Y_AS_ENV(); - - NoStackCall: - PROCESS_INT(interrupt_call, call_body); - - ENDBOp(); - - Op(allocate, e); - CACHE_Y_AS_ENV(YREG); - PREG = NEXTOP(PREG, e); - ENV_YREG[E_CP] = (CELL) CPREG; - ENV_YREG[E_E] = (CELL) ENV; -#ifdef DEPTH_LIMIT - ENV_YREG[E_DEPTH] = DEPTH; -#endif /* DEPTH_LIMIT */ - ENV = ENV_YREG; - ENDCACHE_Y_AS_ENV(); - GONext(); - ENDOp(); - - Op(deallocate, p); - CACHE_Y_AS_ENV(YREG); - check_trail(TR); - PREG = NEXTOP(PREG, p); - /* other instructions do depend on S being set by deallocate - :-( */ - SREG = YREG; - CPREG = (yamop *) ENV_YREG[E_CP]; - ENV = ENV_YREG = (CELL *) ENV_YREG[E_E]; -#ifdef DEPTH_LIMIT - DEPTH = ENV_YREG[E_DEPTH]; -#endif /* DEPTH_LIMIT */ -#ifdef FROZEN_STACKS - { - choiceptr top_b = PROTECT_FROZEN_B(B); -#ifdef YAPOR_SBA - if (ENV_YREG > (CELL *) top_b || ENV_YREG < HR) ENV_YREG = (CELL *) top_b; -#else - if (ENV_YREG > (CELL *) top_b) ENV_YREG = (CELL *) top_b; -#endif /* YAPOR_SBA */ - else ENV_YREG = (CELL *)((CELL) ENV_YREG + ENV_Size(CPREG)); - } -#else - if (ENV_YREG > (CELL *) B) - ENV_YREG = (CELL *) B; - else - ENV_YREG = (CELL *) ((CELL) ENV_YREG + ENV_Size(CPREG)); -#endif /* FROZEN_STACKS */ - WRITEBACK_Y_AS_ENV(); -#ifndef NO_CHECKING - /* check stacks */ - check_stack(NoStackDeallocate, HR); -#endif - ENDCACHE_Y_AS_ENV(); - GONext(); - - NoStackDeallocate: - BEGD(d0); -#ifdef SHADOW_S - Yap_REGS.S_ = SREG; -#endif - saveregs(); - d0 = interrupt_deallocate( PASS_REGS1 ); - setregs(); -#ifdef SHADOW_S - SREG = Yap_REGS.S_; -#endif - if (!d0) FAIL(); - JMPNext(); - ENDD(d0); - ENDOp(); - - /********************************************** - * OPTYap instructions * - **********************************************/ - -#ifdef YAPOR -#include "or.insts.i" -#endif /* YAPOR */ -#ifdef TABLING -#include "tab.insts.i" -#include "tab.tries.insts.i" -#endif /* TABLING */ - - - -#ifdef BEAM - extern int eam_am(PredEntry *); - - Op(retry_eam, e); - printf("Aqui estou eu..................\n"); - if (!eam_am(2)) { - abort_eam("Falhei\n"); - FAIL(); - } - - goto procceed; - PREG = NEXTOP(PREG, e); - GONext(); - ENDOp(); - - Op(run_eam, os); - if (inp==-9000) { /* use indexing to find out valid alternatives */ - extern CELL *beam_ALTERNATIVES; - *beam_ALTERNATIVES= (CELL *) PREG->y_u.os.opcw; - beam_ALTERNATIVES++; - if (OLD_B!=B) goto fail; -#if PUSH_REGS - Yap_regp=old_regs; -#endif - return(0); - } - - saveregs(); - if (!eam_am((PredEntry *) PREG->y_u.os.s)) FAIL(); - setregs(); - - /* cut */ - BACKUP_B(); - while (POP_CHOICE_POINT(B->cp_b)) { - POP_EXECUTE(); - } - B = B->cp_b; /* cut_fail */ - HB = B->cp_h; /* cut_fail */ - RECOVER_B(); - - if (0) { register choiceptr ccp; - /* initialize ccp */ -#define NORM_CP(CP) ((choiceptr)(CP)) - - YREG = (CELL *) (NORM_CP(YREG) - 1); - ccp = NORM_CP(YREG); - store_yaam_reg_cpdepth(ccp); - ccp->cp_tr = TR; - ccp->cp_ap = BEAM_RETRY_CODE; - ccp->cp_h = HR; - ccp->cp_b = B; - ccp->cp_env= ENV; - ccp->cp_cp = CPREG; - B = ccp; - SET_BB(B); - } - goto procceed; - PREG = NEXTOP(PREG, os); - GONext(); - ENDOp(); -#endif - - - diff --git a/C/cp_absmi_insts.h b/C/cp_absmi_insts.h deleted file mode 100644 index e85525dfb..000000000 --- a/C/cp_absmi_insts.h +++ /dev/null @@ -1,1014 +0,0 @@ -#ifdef INDENT_CODE -{ - { - { -#endif /* INDENT_CODE */ - - /***************************************************************** - * Plain try - retry - trust instructions * - *****************************************************************/ - /* try_me Label,NArgs */ - Op(try_me, Otapl); - /* check if enough space between trail and codespace */ - check_trail(TR); - /* I use YREG to go through the choicepoint. Usually YREG is in a - * register, but sometimes (X86) not. In this case, have a - * new register to point at YREG =*/ - CACHE_Y(YREG); - /* store arguments for procedure */ - store_at_least_one_arg(PREG->y_u.Otapl.s); - /* store abstract machine registers */ - store_yaam_regs(PREG->y_u.Otapl.d, 0); - /* On a try_me, set cut to point at previous choicepoint, - * that is, to the B before the cut. - */ - set_cut(S_YREG, B); - /* now, install the new YREG =*/ - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - PREG = NEXTOP(PREG, Otapl); - SET_BB(B_YREG); - ENDCACHE_Y(); - GONext(); - ENDOp(); - - /* retry_me Label,NArgs */ - Op(retry_me, Otapl); - CACHE_Y(B); - /* After retry, cut should be pointing at the parent - * choicepoint for the current B */ - restore_yaam_regs(PREG->y_u.Otapl.d); - restore_at_least_one_arg(PREG->y_u.Otapl.s); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - ENDCACHE_Y(); - PREG = NEXTOP(PREG, Otapl); - GONext(); - ENDOp(); - - /* trust_me UnusedLabel,NArgs */ - Op(trust_me, Otapl); - CACHE_Y(B); -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_last_alternative(PREG, B_YREG); - restore_at_least_one_arg(PREG->y_u.Otapl.s); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B->cp_b); - } - else -#endif /* YAPOR */ - { - pop_yaam_regs(); - pop_at_least_one_arg(PREG->y_u.Otapl.s); - /* After trust, cut should be pointing at the new top - * choicepoint */ -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B); - } - PREG = NEXTOP(PREG, Otapl); - SET_BB(B_YREG); - ENDCACHE_Y(); - GONext(); - ENDOp(); - - /***************************************************************** - * EXO try - retry instructions * - *****************************************************************/ - /* enter_exo Pred,Label */ - BOp(enter_exo, e); - { - yamop *pt; - saveregs(); - pt = Yap_ExoLookup(PredFromDefCode(PREG) PASS_REGS); - setregs(); -#ifdef SHADOW_S - SREG = S; -#endif - PREG = pt; - } - JMPNext(); - ENDBOp(); - - /* check if enough space between trail and codespace */ - /* try_exo Pred,Label */ - Op(try_exo, lp); - /* check if enough space between trail and codespace */ - check_trail(TR); - /* I use YREG to go through the choicepoint. Usually YREG is in a - * register, but sometimes (X86) not. In this case, have a - * new register to point at YREG =*/ - CACHE_Y(YREG); - { - struct index_t *i = (struct index_t *)(PREG->y_u.lp.l); - S_YREG[-1] = (CELL)LINK_TO_ADDRESS(i,i->links[EXO_ADDRESS_TO_OFFSET(i, SREG)]); - } - S_YREG--; - /* store arguments for procedure */ - store_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); - /* store abstract machine registers */ - store_yaam_regs(NEXTOP(PREG,lp), 0); - /* On a try_me, set cut to point at previous choicepoint, - * that is, to the B before the cut. - */ - set_cut(S_YREG, B); - /* now, install the new YREG =*/ - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - PREG = NEXTOP(NEXTOP(PREG, lp),lp); - SET_BB(B_YREG); - ENDCACHE_Y(); - GONext(); - ENDOp(); - - /* check if enough space between trail and codespace */ - /* try_exo_udi Pred,Label */ - Op(try_exo_udi, lp); - /* check if enough space between trail and codespace */ - check_trail(TR); - /* I use YREG =to go through the choicepoint. Usually YREG =is in a - * register, but sometimes (X86) not. In this case, have a - * new register to point at YREG =*/ - CACHE_Y(YREG); - S_YREG--; - /* store arguments for procedure */ - store_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); - /* store abstract machine registers */ - store_yaam_regs(NEXTOP(PREG,lp), 0); - /* On a try_me, set cut to point at previous choicepoint, - * that is, to the B before the cut. - */ - set_cut(S_YREG, B); - /* now, install the new YREG =*/ - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - PREG = NEXTOP(NEXTOP(PREG, lp),lp); - SET_BB(B_YREG); - ENDCACHE_Y(); - GONext(); - ENDOp(); - - /* try_udi Pred,Label */ - Op(try_udi, p); - /* check if enough space between trail and codespace */ - check_trail(TR); - /* I use YREG =to go through the choicepoint. Usually YREG =is in a - * register, but sometimes (X86) not. In this case, have a - * new register to point at YREG =*/ - CACHE_Y(YREG); - { - S_YREG[-1] = (CELL)SREG; /* the udi code did S = (CELL*)judyp; */ - } - S_YREG--; - /* store arguments for procedure */ - store_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); - /* store abstract machine registers */ - store_yaam_regs(NEXTOP(PREG,lp), 0); - /* On a try_me, set cut to point at previous choicepoint, - * that is, to the B before the cut. - */ - set_cut(S_YREG, B); - /* now, install the new YREG =*/ - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - PREG = NEXTOP(NEXTOP(PREG, lp),lp); - SET_BB(B_YREG); - ENDCACHE_Y(); - GONext(); - ENDOp(); - - /* check if enough space between trail and codespace */ - /* try_exo Pred,Label */ - Op(try_all_exo, lp); - /* check if enough space between trail and codespace */ - check_trail(TR); - /* I use YREG =to go through the choicepoint. Usually YREG =is in a - * register, but sometimes (X86) not. In this case, have a - * new register to point at YREG =*/ - CACHE_Y(YREG); - { - struct index_t *i = (struct index_t *)(PREG->y_u.lp.l); - SREG = i->cls; - S_YREG[-2] = (CELL)(SREG+i->arity); - S_YREG[-1] = (CELL)(SREG+i->arity*i->nels); - } - S_YREG-=2; - /* store arguments for procedure */ - store_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); - /* store abstract machine registers */ - store_yaam_regs(NEXTOP(PREG,lp), 0); - /* On a try_me, set cut to point at previous choicepoint, - * that is, to the B before the cut. - */ - set_cut(S_YREG, B); - /* now, install the new YREG =*/ - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - PREG = NEXTOP(NEXTOP(PREG, lp),lp); - SET_BB(B_YREG); - ENDCACHE_Y(); - GONext(); - ENDOp(); - - /* retry_exo Pred */ - Op(retry_exo, lp); - BEGD(d0); - CACHE_Y(B); - { - struct index_t *it = (struct index_t *)(PREG->y_u.lp.l); - BITS32 offset = ADDRESS_TO_LINK(it,(BITS32 *)((CELL *)(B+1))[it->arity]); - d0 = it->links[offset]; - ((CELL *)(B+1))[it->arity] = (CELL)LINK_TO_ADDRESS(it, d0); - SREG = EXO_OFFSET_TO_ADDRESS(it, offset); - } - if (d0) { - /* After retry, cut should be pointing at the parent - * choicepoint for the current B */ - restore_yaam_regs(PREG); - restore_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - } else { -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_last_alternative(PREG, B_YREG); - restore_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B->cp_b); - } else -#endif /* YAPOR */ - { - pop_yaam_regs(); - pop_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); - /* After trust, cut should be pointing at the new top - * choicepoint */ -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B); - } - } - PREG = NEXTOP(PREG, lp); - ENDCACHE_Y(); - ENDD(D0); - GONext(); - ENDOp(); - - /* retry_exo_udi Pred */ - Op(retry_exo_udi, lp); - BEGD(d0); - CACHE_Y(B); - { - struct index_t *it = (struct index_t *)(PREG->y_u.lp.l); - saveregs(); - d0 = ((CRetryExoIndex)it->udi_next)(it PASS_REGS); - setregs(); -#ifdef SHADOW_S - SREG = S; -#endif - } - if (d0) { - /* After retry, cut should be pointing at the parent - * choicepoint for the current B */ - restore_yaam_regs(PREG); - restore_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - } else { -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_last_alternative(PREG, B_YREG); - restore_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B->cp_b); - } else -#endif /* YAPOR */ - { - pop_yaam_regs(); - pop_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); - /* After trust, cut should be pointing at the new top - * choicepoint */ -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B); - } - } - PREG = NEXTOP(PREG, lp); - ENDCACHE_Y(); - ENDD(D0); - GONext(); - ENDOp(); - - /* retry_exo Pred */ - Op(retry_udi, p); - BEGD(d0); - CACHE_Y(B); - { - // struct udi_index_t *jp = (struct udi_index_t *)((CELL *)(B+1))[it->arity]; - /* operation has a side-effect: S = (CELL*)NextClause */ - saveregs(); - d0 = 0L; // Yap_UDI_NextAlt(jp); - setregs(); -#ifdef SHADOW_S - SREG = S; -#endif - /* d0 says if we're last */ - } - if (d0) { - /* After retry, cut should be pointing at the parent - * choicepoint for the current B */ - restore_yaam_regs(PREG); - restore_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - } else { -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_last_alternative(PREG, B_YREG); - restore_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B->cp_b); - } else -#endif /* YAPOR */ - { - pop_yaam_regs(); - pop_at_least_one_arg(PREG->y_u.lp.p->ArityOfPE); - /* After trust, cut should be pointing at the new top - * choicepoint */ -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B); - } - } - PREG = (yamop *)SREG; - ENDCACHE_Y(); - ENDD(D0); - GONext(); - ENDOp(); - - /* retry_exo Pred */ - Op(retry_all_exo, lp); - BEGD(d0); - CACHE_Y(B); - { - UInt arity = ((struct index_t *)PREG->y_u.lp.l)->arity; - CELL *extras = (CELL *)(B+1); - SREG = (CELL *)extras[arity]; - d0 = (SREG+arity != (CELL *)extras[arity+1]); - if (d0) { - extras[arity] = (CELL)(SREG+arity); - /* After retry, cut should be pointing at the parent - * choicepoint for the current B */ - restore_yaam_regs(PREG); - restore_at_least_one_arg(arity); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - } else { -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_last_alternative(PREG, B_YREG); - restore_at_least_one_arg(arity); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B->cp_b); - } else -#endif /* YAPOR */ - { - pop_yaam_regs(); - pop_at_least_one_arg(arity); - /* After trust, cut should be pointing at the new top - * choicepoint */ -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B); - } - } - } - PREG = NEXTOP(PREG, lp); - ENDCACHE_Y(); - ENDD(D0); - GONext(); - ENDOp(); - - /***************************************************************** - * Profiled try - retry - trust instructions * - *****************************************************************/ - - /* profiled_enter_me Pred */ - Op(enter_profiling, p); - LOCK(PREG->y_u.p.p->StatisticsForPred.lock); - PREG->y_u.p.p->StatisticsForPred.NOfEntries++; - UNLOCK(PREG->y_u.p.p->StatisticsForPred.lock); - PREG = NEXTOP(PREG, p); - GONext(); - ENDOp(); - - /* profiled_retry Label,NArgs */ - Op(retry_profiled, p); - LOCK(PREG->y_u.p.p->StatisticsForPred.lock); - PREG->y_u.p.p->StatisticsForPred.NOfRetries++; - UNLOCK(PREG->y_u.p.p->StatisticsForPred.lock); - PREG = NEXTOP(PREG, p); - GONext(); - ENDOp(); - - /* profiled_retry_me Label,NArgs */ - Op(profiled_retry_me, Otapl); - CACHE_Y(B); - /* After retry, cut should be pointing at the parent - * choicepoint for the current B */ - LOCK(PREG->y_u.Otapl.p->StatisticsForPred.lock); - PREG->y_u.Otapl.p->StatisticsForPred.NOfRetries++; - UNLOCK(PREG->y_u.Otapl.p->StatisticsForPred.lock); - restore_yaam_regs(PREG->y_u.Otapl.d); - restore_args(PREG->y_u.Otapl.s); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - ENDCACHE_Y(); - PREG = NEXTOP(PREG, Otapl); - GONext(); - ENDOp(); - - /* profiled_trust_me UnusedLabel,NArgs */ - Op(profiled_trust_me, Otapl); - CACHE_Y(B); -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_last_alternative(PREG, B_YREG); - restore_args(PREG->y_u.Otapl.s); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B->cp_b); - } - else -#endif /* YAPOR */ - { - pop_yaam_regs(); - pop_args(PREG->y_u.Otapl.s); - /* After trust, cut should be pointing at the new top - * choicepoint */ -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B); - } - SET_BB(B_YREG); - ENDCACHE_Y(); - LOCK(PREG->y_u.Otapl.p->StatisticsForPred.lock); - PREG->y_u.Otapl.p->StatisticsForPred.NOfRetries++; - UNLOCK(PREG->y_u.Otapl.p->StatisticsForPred.lock); - PREG = NEXTOP(PREG, Otapl); - GONext(); - ENDOp(); - - /***************************************************************** - * Call count instructions * - *****************************************************************/ - - /* count_enter_me Label,NArgs */ - Op(count_call, p); - LOCK(PREG->y_u.p.p->StatisticsForPred.lock); - PREG->y_u.p.p->StatisticsForPred.NOfEntries++; - UNLOCK(PREG->y_u.p.p->StatisticsForPred.lock); - LOCAL_ReductionsCounter--; - if (LOCAL_ReductionsCounter == 0 && LOCAL_ReductionsCounterOn) { - saveregs(); - Yap_NilError(CALL_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - LOCAL_PredEntriesCounter--; - if (LOCAL_PredEntriesCounter == 0 && LOCAL_PredEntriesCounterOn) { - saveregs(); - Yap_NilError(PRED_ENTRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - PREG = NEXTOP(PREG, p); - GONext(); - ENDOp(); - - /* count_retry Label,NArgs */ - Op(count_retry, p); - LOCK(PREG->y_u.p.p->StatisticsForPred.lock); - PREG->y_u.p.p->StatisticsForPred.NOfRetries++; - UNLOCK(PREG->y_u.p.p->StatisticsForPred.lock); - LOCAL_RetriesCounter--; - if (LOCAL_RetriesCounter == 0 && LOCAL_RetriesCounterOn) { - /* act as if we had backtracked */ - ENV = B->cp_env; - saveregs(); - Yap_NilError(RETRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - LOCAL_PredEntriesCounter--; - if (LOCAL_PredEntriesCounter == 0 && LOCAL_PredEntriesCounterOn) { - ENV = B->cp_env; - saveregs(); - Yap_NilError(PRED_ENTRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - PREG = NEXTOP(PREG, p); - GONext(); - ENDOp(); - - /* count_retry_me Label,NArgs */ - Op(count_retry_me, Otapl); - CACHE_Y(B); - restore_yaam_regs(PREG->y_u.Otapl.d); - restore_args(PREG->y_u.Otapl.s); - /* After retry, cut should be pointing at the parent - * choicepoint for the current B */ -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - ENDCACHE_Y(); - LOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); - ((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.NOfRetries++; - UNLOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); - LOCAL_RetriesCounter--; - if (LOCAL_RetriesCounter == 0 && LOCAL_RetriesCounterOn) { - saveregs(); - Yap_NilError(RETRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - LOCAL_PredEntriesCounter--; - if (LOCAL_PredEntriesCounter == 0 && LOCAL_PredEntriesCounterOn) { - saveregs(); - Yap_NilError(PRED_ENTRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - PREG = NEXTOP(PREG, Otapl); - GONext(); - ENDOp(); - - /* count_trust_me UnusedLabel,NArgs */ - Op(count_trust_me, Otapl); - CACHE_Y(B); -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_last_alternative(PREG, B_YREG); - restore_args(PREG->y_u.Otapl.s); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B->cp_b); - } - else -#endif /* YAPOR */ - { - pop_yaam_regs(); - pop_args(PREG->y_u.Otapl.s); - /* After trust, cut should be pointing at the new top - * choicepoint */ -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B); - } - SET_BB(B_YREG); - ENDCACHE_Y(); - LOCAL_RetriesCounter--; - if (LOCAL_RetriesCounter == 0) { - saveregs(); - Yap_NilError(RETRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - LOCAL_PredEntriesCounter--; - if (LOCAL_PredEntriesCounter == 0) { - saveregs(); - Yap_NilError(PRED_ENTRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - LOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); - ((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.NOfRetries++; - UNLOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); - PREG = NEXTOP(PREG, Otapl); - GONext(); - ENDOp(); - - /***************************************************************** - * check for enough room * - *****************************************************************/ - - /* ensure_space */ - BOp(ensure_space, Osbpa); - { - Int sz = PREG->y_u.Osbpa.i; - UInt arity = PREG->y_u.Osbpa.p->ArityOfPE; - - if (Unsigned(HR) + sz > Unsigned(YREG)-StackGap( PASS_REGS1 )) { - YENV[E_CP] = (CELL) CPREG; - YENV[E_E] = (CELL) ENV; -#ifdef DEPTH_LIMIT - YENV[E_DEPTH] = DEPTH; -#endif /* DEPTH_LIMIT */ - SET_ASP(YREG, PREG->y_u.Osbpa.s); - PREG = NEXTOP(PREG,Osbpa); - saveregs(); - if (!Yap_gcl(sz, arity, YENV, PREG)) { - Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); - setregs(); - FAIL(); - } else { - setregs(); - } - } else { - PREG = NEXTOP(PREG,Osbpa); - } - } - JMPNext(); - ENDBOp(); - - /***************************************************************** - * try and retry of dynamic predicates * - *****************************************************************/ - - /* spy_or_trymark */ - BOp(spy_or_trymark, Otapl); - PELOCK(5, ((PredEntry *)(PREG->y_u.Otapl.p))); - PREG = (yamop *)(&(((PredEntry *)(PREG->y_u.Otapl.p))->OpcodeOfPred)); - UNLOCKPE(11,(PredEntry *)(PREG->y_u.Otapl.p)); - saveregs(); - spy_goal( PASS_REGS1 ); - setregs(); - ENDBOp(); - - /* try_and_mark Label,NArgs */ - BOp(try_and_mark, Otapl); - check_trail(TR); -#if defined(YAPOR) || defined(THREADS) -#ifdef YAPOR - /* The flags I check here should never change during execution */ - CUT_wait_leftmost(); -#endif /* YAPOR */ - if (PREG->y_u.Otapl.p->PredFlags & LogUpdatePredFlag) { - PELOCK(6,PREG->y_u.Otapl.p); - PP = PREG->y_u.Otapl.p; - } - if (PREG->y_u.Otapl.p->CodeOfPred != PREG) { - /* oops, someone changed the procedure under our feet, - fortunately this is no big deal because we haven't done - anything yet */ - PP = NULL; - PREG = PREG->y_u.Otapl.p->CodeOfPred; - UNLOCKPE(12,PREG->y_u.Otapl.p); - /* for profiler */ - save_pc(); - JMPNext(); - } -#endif - CACHE_Y(YREG); - PREG = PREG->y_u.Otapl.d; - /* - I've got a read lock on the DB, so I don't need to care... - niaaahh.... niahhhh... - */ - LOCK(DynamicLock(PREG)); - /* one can now mess around with the predicate */ - UNLOCKPE(13,((PredEntry *)(PREG->y_u.Otapl.p))); - BEGD(d1); - d1 = PREG->y_u.Otapl.s; - store_args(d1); - store_yaam_regs(PREG, 0); - ENDD(d1); - set_cut(S_YREG, B); - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - SET_BB(B_YREG); - ENDCACHE_Y(); -#if MULTIPLE_STACKS - INC_CLREF_COUNT(ClauseCodeToDynamicClause(PREG)); - UNLOCK(DynamicLock(PREG)); - TRAIL_CLREF(ClauseCodeToDynamicClause(PREG)); -#else - if (FlagOff(InUseMask, DynamicFlags(PREG))) { - - SetFlag(InUseMask, DynamicFlags(PREG)); - TRAIL_CLREF(ClauseCodeToDynamicClause(PREG)); - } -#endif - PREG = NEXTOP(PREG,Otapl); - JMPNext(); - - ENDBOp(); - - BOp(count_retry_and_mark, Otapl); - LOCAL_RetriesCounter--; - if (LOCAL_RetriesCounter == 0) { - saveregs(); - Yap_NilError(RETRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - LOCAL_PredEntriesCounter--; - if (LOCAL_PredEntriesCounter == 0) { - saveregs(); - Yap_NilError(PRED_ENTRY_COUNTER_UNDERFLOW,""); - setregs(); - JMPNext(); - } - /* enter a retry dynamic */ - ENDBOp(); - - BOp(profiled_retry_and_mark, Otapl); - LOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); - ((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.NOfRetries++; - UNLOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); - /* enter a retry dynamic */ - ENDBOp(); - - /* retry_and_mark Label,NArgs */ - BOp(retry_and_mark, Otapl); -#ifdef YAPOR - CUT_wait_leftmost(); -#endif /* YAPOR */ - /* need to make the DB stable until I get the new clause */ - PELOCK(7,PREG->y_u.Otapl.p); - CACHE_Y(B); - PREG = PREG->y_u.Otapl.d; - LOCK(DynamicLock(PREG)); - UNLOCK(PREG->y_u.Otapl.p->PELock); - restore_yaam_regs(PREG); - restore_args(PREG->y_u.Otapl.s); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - ENDCACHE_Y(); -#if MULTIPLE_STACKS - INC_CLREF_COUNT(ClauseCodeToDynamicClause(PREG)); - TRAIL_CLREF(ClauseCodeToDynamicClause(PREG)); - UNLOCK(DynamicLock(PREG)); -#else - if (FlagOff(InUseMask, DynamicFlags(PREG))) { - - SetFlag(InUseMask, DynamicFlags(PREG)); - TRAIL_CLREF(ClauseCodeToDynamicClause(PREG)); - } -#endif - PREG = NEXTOP(PREG, Otapl); - JMPNext(); - - ENDBOp(); - - - /************************************************************************\ - * Try / Retry / Trust for main indexing blocks * -\************************************************************************/ - - BOp(try_clause, Otapl); - check_trail(TR); - CACHE_Y(YREG); - /* Point AP to the code that follows this instruction */ - store_at_least_one_arg(PREG->y_u.Otapl.s); - store_yaam_regs(NEXTOP(PREG, Otapl), 0); - PREG = PREG->y_u.Otapl.d; - set_cut(S_YREG, B); - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - SET_BB(B_YREG); - ENDCACHE_Y(); - JMPNext(); - ENDBOp(); - - BOp(try_clause2, l); - check_trail(TR); - CACHE_Y(YREG); - /* Point AP to the code that follows this instruction */ - { - register CELL x2 = ARG2; - register CELL x1 = ARG1; - - store_yaam_regs(NEXTOP(PREG, l), 2); - B_YREG->cp_a1 = x1; - B_YREG->cp_a2 = x2; - } - PREG = PREG->y_u.l.l; - set_cut(S_YREG, B); - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - SET_BB(B_YREG); - ENDCACHE_Y(); - JMPNext(); - ENDBOp(); - - BOp(try_clause3, l); - check_trail(TR); - CACHE_Y(YREG); - /* Point AP to the code that follows this instruction */ - { - store_yaam_regs(NEXTOP(PREG, l), 3); - B_YREG->cp_a1 = ARG1; - B_YREG->cp_a2 = ARG2; - B_YREG->cp_a3 = ARG3; - } - PREG = PREG->y_u.l.l; - set_cut(S_YREG, B); - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - SET_BB(B_YREG); - ENDCACHE_Y(); - JMPNext(); - ENDBOp(); - - BOp(try_clause4, l); - check_trail(TR); - CACHE_Y(YREG); - /* Point AP to the code that follows this instruction */ - { - store_yaam_regs(NEXTOP(PREG, l), 4); - B_YREG->cp_a1 = ARG1; - B_YREG->cp_a2 = ARG2; - B_YREG->cp_a3 = ARG3; - B_YREG->cp_a4 = ARG4; - } - PREG = PREG->y_u.l.l; - set_cut(S_YREG, B); - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - SET_BB(B_YREG); - ENDCACHE_Y(); - JMPNext(); - ENDBOp(); - - BOp(retry, Otapl); - CACHE_Y(B); - restore_yaam_regs(NEXTOP(PREG, Otapl)); - restore_at_least_one_arg(PREG->y_u.Otapl.s); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - ENDCACHE_Y(); - PREG = PREG->y_u.Otapl.d; - JMPNext(); - ENDBOp(); - - BOp(retry2, l); - CACHE_Y(B); - restore_yaam_regs(NEXTOP(PREG, l)); - PREG = PREG->y_u.l.l; - ARG1 = B_YREG->cp_a1; - ARG2 = B_YREG->cp_a2; -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - ENDCACHE_Y(); - JMPNext(); - ENDBOp(); - - BOp(retry3, l); - CACHE_Y(B); - restore_yaam_regs(NEXTOP(PREG, l)); - PREG = PREG->y_u.l.l; - ARG1 = B_YREG->cp_a1; - ARG2 = B_YREG->cp_a2; - ARG3 = B_YREG->cp_a3; -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - ENDCACHE_Y(); - JMPNext(); - ENDBOp(); - - BOp(retry4, l); - CACHE_Y(B); - restore_yaam_regs(NEXTOP(PREG, l)); - PREG = PREG->y_u.l.l; - ARG1 = B_YREG->cp_a1; - ARG2 = B_YREG->cp_a2; - ARG3 = B_YREG->cp_a3; - ARG4 = B_YREG->cp_a4; -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - ENDCACHE_Y(); - JMPNext(); - ENDBOp(); - - BOp(trust, Otapl); - CACHE_Y(B); -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_last_alternative(PREG, B_YREG); - restore_at_least_one_arg(PREG->y_u.Otapl.s); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B->cp_b); - } - else -#endif /* YAPOR */ - { - pop_yaam_regs(); - pop_at_least_one_arg(PREG->y_u.Otapl.s); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B); - } - SET_BB(B_YREG); - ENDCACHE_Y(); - PREG = PREG->y_u.Otapl.d; - JMPNext(); - ENDBOp(); - - BOp(try_in, l); - B->cp_ap = NEXTOP(PREG, l); - PREG = PREG->y_u.l.l; - JMPNext(); - ENDBOp(); diff --git a/C/errors.c b/C/errors.c index cc3d4567e..89cf3f69e 100755 --- a/C/errors.c +++ b/C/errors.c @@ -530,7 +530,7 @@ Yap_bug_location(yamop *pc) static char tmpbuf[YAP_BUF_SIZE]; yamop * -Yap_NilError(yap_error_number type, const char *format,...) +Yap_NilError(yap_error_number type, char *format,...) { va_list ap; yamop *res; @@ -544,7 +544,7 @@ Yap_NilError(yap_error_number type, const char *format,...) } yamop * -Yap_Error(yap_error_number type, Term where, const char *format,...) +Yap_Error(yap_error_number type, Term where, char *format,...) { CACHE_REGS va_list ap; diff --git a/C/exec.c b/C/exec.c index b1a327cf3..5b2b4e3a4 100755 --- a/C/exec.c +++ b/C/exec.c @@ -193,7 +193,7 @@ do_execute(Term t, Term mod USES_REGS) Yap_get_signal( YAP_CREEP_SIGNAL ) ) { CalculateStackGap( PASS_REGS1 ); } - return CallMetaCall(t, mod PASS_REGS); + return CallMetaCall(ARG1, mod PASS_REGS); } else if (Yap_has_a_signal() && !LOCAL_InterruptsDisabled && !(LOCAL_PrologMode & (AbortMode|InterruptMode|SystemMode))) { @@ -406,14 +406,7 @@ do_execute_n(Term t, Term mod, unsigned int n USES_REGS) static Int EnterCreepMode(Term t, Term mod USES_REGS) { PredEntry *PredCreep; - - if ( Yap_only_has_signal( YAP_CREEP_SIGNAL ) ) { - PredEntry *pen = Yap_Pred( t, mod, " creep" ); - if (pen->PredFlags & NoTracePredFlag) { - Yap_get_signal( YAP_CREEP_SIGNAL ); - return do_execute(ARG1, mod PASS_REGS); - } - } + if (Yap_get_signal( YAP_CDOVF_SIGNAL ) ) { ARG1 = t; if (!Yap_locked_growheap(FALSE, 0, NULL)) { diff --git a/C/fail_absmi_insts.h b/C/fail_absmi_insts.h deleted file mode 100644 index b8c237f16..000000000 --- a/C/fail_absmi_insts.h +++ /dev/null @@ -1,414 +0,0 @@ -/***************************************************************** - * Failure * - *****************************************************************/ - -#ifdef INDENT_CODE -{ - { - { -#endif /* INDENT_CODE */ - - /* trust_fail */ - BOp(trust_fail, e); - { - while (POP_CHOICE_POINT(B->cp_b)) - { - POP_EXECUTE(); - } - } -#ifdef YAPOR - { - choiceptr cut_pt; - cut_pt = B->cp_b; - CUT_prune_to(cut_pt); - B = cut_pt; - } -#else - B = B->cp_b; -#endif /* YAPOR */ - goto fail; - ENDBOp(); - -#ifdef YAPOR - shared_fail: - B = Get_LOCAL_top_cp(); - SET_BB(PROTECT_FROZEN_B(B)); - goto fail; -#endif /* YAPOR */ - - /* fail */ - PBOp(op_fail, e); - - if (PP) { - UNLOCK(PP->PELock); - PP = NULL; - } -#ifdef COROUTINING - CACHE_Y_AS_ENV(YREG); - check_stack(NoStackFail, HR); - ENDCACHE_Y_AS_ENV(); -#endif - - fail: - { - register tr_fr_ptr pt0 = TR; -#if defined(YAPOR) || defined(THREADS) - if (PP) { - UNLOCK(PP->PELock); - PP = NULL; - } -#endif - PREG = B->cp_ap; - save_pc(); - CACHE_TR(B->cp_tr); - PREFETCH_OP(PREG); - failloop: - if (pt0 == S_TR) { - SP = SP0; -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - int go_on = true; - yamop *ipc = PREG; - - while (go_on) { - op_numbers opnum = Yap_op_from_opcode(ipc->opc); - - go_on = false; - switch (opnum) { -#ifdef TABLING - case _table_load_answer: - low_level_trace(retry_table_loader, LOAD_CP(B)->cp_pred_entry, NULL); - break; - case _table_try_answer: - case _table_retry_me: - case _table_trust_me: - case _table_retry: - case _table_trust: - case _table_completion: -#ifdef THREADS_CONSUMER_SHARING - case _table_answer_resolution_completion: -#endif /* THREADS_CONSUMER_SHARING */ -#ifdef DETERMINISTIC_TABLING - if (IS_DET_GEN_CP(B)) - low_level_trace(retry_table_generator, DET_GEN_CP(B)->cp_pred_entry, NULL); - else -#endif /* DETERMINISTIC_TABLING */ - low_level_trace(retry_table_generator, GEN_CP(B)->cp_pred_entry, (CELL *)(GEN_CP(B) + 1)); - break; - case _table_answer_resolution: - low_level_trace(retry_table_consumer, CONS_CP(B)->cp_pred_entry, NULL); - break; - case _trie_trust_var: - case _trie_retry_var: - case _trie_trust_var_in_pair: - case _trie_retry_var_in_pair: - case _trie_trust_val: - case _trie_retry_val: - case _trie_trust_val_in_pair: - case _trie_retry_val_in_pair: - case _trie_trust_atom: - case _trie_retry_atom: - case _trie_trust_atom_in_pair: - case _trie_retry_atom_in_pair: - case _trie_trust_null: - case _trie_retry_null: - case _trie_trust_null_in_pair: - case _trie_retry_null_in_pair: - case _trie_trust_pair: - case _trie_retry_pair: - case _trie_trust_appl: - case _trie_retry_appl: - case _trie_trust_appl_in_pair: - case _trie_retry_appl_in_pair: - case _trie_trust_extension: - case _trie_retry_extension: - case _trie_trust_double: - case _trie_retry_double: - case _trie_trust_longint: - case _trie_retry_longint: - case _trie_trust_gterm: - case _trie_retry_gterm: - low_level_trace(retry_table_loader, UndefCode, NULL); - break; -#endif /* TABLING */ - case _or_else: - case _or_last: - low_level_trace(retry_or, (PredEntry *)ipc, &(B->cp_a1)); - break; - case _retry2: - case _retry3: - case _retry4: - ipc = NEXTOP(ipc,l); - go_on = true; - break; - case _jump: - ipc = ipc->y_u.l.l; - go_on = true; - break; - case _retry_c: - case _retry_userc: - low_level_trace(retry_pred, ipc->y_u.OtapFs.p, B->cp_args); - break; - case _retry_profiled: - case _count_retry: - ipc = NEXTOP(ipc,p); - go_on = true; - break; - case _retry_me: - case _trust_me: - case _count_retry_me: - case _count_trust_me: - case _profiled_retry_me: - case _profiled_trust_me: - case _retry_and_mark: - case _profiled_retry_and_mark: - case _retry: - case _trust: - low_level_trace(retry_pred, ipc->y_u.Otapl.p, B->cp_args); - break; - case _try_logical: - case _retry_logical: - case _profiled_retry_logical: - case _count_retry_logical: - case _trust_logical: - case _profiled_trust_logical: - case _count_trust_logical: - low_level_trace(retry_pred, ipc->y_u.OtILl.d->ClPred, B->cp_args); - break; - case _Nstop: - case _Ystop: - low_level_trace(retry_pred, NULL, B->cp_args); - break; - default: - break; - } - } - } -#endif /* LOW_LEVEL_TRACER */ -#ifdef FROZEN_STACKS -#ifdef YAPOR_SBA - if (pt0 < TR_FZ || pt0 > (ADDR)CurrentTrailTop+MinTrailGap) -#else - if (pt0 < TR_FZ) -#endif /* YAPOR_SBA */ - { - TR = TR_FZ; - TRAIL_LINK(pt0); - } else -#endif /* FROZEN_STACKS */ - RESTORE_TR(); - GONext(); - } - BEGD(d1); - d1 = TrailTerm(pt0-1); - pt0--; - if (IsVarTerm(d1)) { -#if defined(YAPOR_SBA) && defined(YAPOR) - /* clean up the trail when we backtrack */ - if (Unsigned((Int)(d1)-(Int)(H_FZ)) > - Unsigned((Int)(B_FZ)-(Int)(H_FZ))) { - RESET_VARIABLE(STACK_TO_SBA(d1)); - } else -#endif - /* normal variable */ - RESET_VARIABLE(d1); - goto failloop; - } - /* pointer to code space */ - /* or updatable variable */ -#if defined(TERM_EXTENSIONS) || defined(FROZEN_STACKS) || defined(MULTI_ASSIGNMENT_VARIABLES) - if (IsPairTerm(d1)) -#endif /* TERM_EXTENSIONS || FROZEN_STACKS || MULTI_ASSIGNMENT_VARIABLES */ - { - register CELL flags; - CELL *pt1 = RepPair(d1); -#ifdef LIMIT_TABLING - if ((ADDR) pt1 == LOCAL_TrailBase) { - sg_fr_ptr sg_fr = (sg_fr_ptr) TrailVal(pt0); - TrailTerm(pt0) = AbsPair((CELL *)(pt0 - 1)); - SgFr_state(sg_fr)--; /* complete_in_use --> complete : compiled_in_use --> compiled */ - insert_into_global_sg_fr_list(sg_fr); - goto failloop; - } -#endif /* LIMIT_TABLING */ -#ifdef FROZEN_STACKS /* TRAIL */ - /* avoid frozen segments */ - if ( -#ifdef YAPOR_SBA - (ADDR) pt1 >= HeapTop -#else - IN_BETWEEN(LOCAL_TrailBase, pt1, (ADDR)CurrentTrailTop+MinTrailGap) -#endif /* YAPOR_SBA */ - ) - { - pt0 = (tr_fr_ptr) pt1; - goto failloop; - } else -#endif /* FROZEN_STACKS */ - if (IN_BETWEEN(H0,pt1,HR)) { - if (IsAttVar(pt1)) { - goto failloop; - } else if (*pt1 == (CELL)FunctorBigInt) { - Yap_CleanOpaqueVariable(pt1); - goto failloop; - } - } -#ifdef FROZEN_STACKS /* TRAIL */ - /* don't reset frozen variables */ - if (pt0 < TR_FZ) - goto failloop; -#endif - flags = *pt1; -#if MULTIPLE_STACKS - if (FlagOn(DBClMask, flags)) { - DBRef dbr = DBStructFlagsToDBStruct(pt1); - int erase; - - LOCK(dbr->lock); - DEC_DBREF_COUNT(dbr); - erase = (dbr->Flags & ErasedMask) && (dbr->ref_count == 0); - UNLOCK(dbr->lock); - if (erase) { - saveregs(); - Yap_ErDBE(dbr); - setregs(); - } - } else { - if (flags & LogUpdMask) { - if (flags & IndexMask) { - LogUpdIndex *cl = ClauseFlagsToLogUpdIndex(pt1); - int erase; -#if PARALLEL_YAP - PredEntry *ap = cl->ClPred; -#endif - - PELOCK(8,ap); - DEC_CLREF_COUNT(cl); - erase = (cl->ClFlags & ErasedMask) && !(cl->ClRefCount); - if (erase) { - saveregs(); - /* at this point, - we are the only ones accessing the clause, - hence we don't need to have a lock it */ - Yap_ErLogUpdIndex(cl); - setregs(); - } else if (cl->ClFlags & DirtyMask) { - saveregs(); - /* at this point, - we are the only ones accessing the clause, - hence we don't need to have a lock it */ - Yap_CleanUpIndex(cl); - setregs(); - } - UNLOCK(ap->PELock); - } else { - LogUpdClause *cl = ClauseFlagsToLogUpdClause(pt1); - int erase; -#if PARALLEL_YAP - PredEntry *ap = cl->ClPred; -#endif - /* BB support */ - if (ap) { - - PELOCK(9,ap); - DEC_CLREF_COUNT(cl); - erase = (cl->ClFlags & ErasedMask) && !(cl->ClRefCount); - if (erase) { - saveregs(); - /* at this point, - we are the only ones accessing the clause, - hence we don't need to have a lock it */ - Yap_ErLogUpdCl(cl); - setregs(); - } - UNLOCK(ap->PELock); - } - } - } else { - DynamicClause *cl = ClauseFlagsToDynamicClause(pt1); - int erase; - - LOCK(cl->ClLock); - DEC_CLREF_COUNT(cl); - erase = (cl->ClFlags & ErasedMask) && !(cl->ClRefCount); - UNLOCK(cl->ClLock); - if (erase) { - saveregs(); - /* at this point, - we are the only ones accessing the clause, - hence we don't need to have a lock it */ - Yap_ErCl(cl); - setregs(); - } - } - } -#else - ResetFlag(InUseMask, flags); - *pt1 = flags; - if (FlagOn((ErasedMask|DirtyMask), flags)) { - if (FlagOn(DBClMask, flags)) { - saveregs(); - Yap_ErDBE(DBStructFlagsToDBStruct(pt1)); - setregs(); - } else { - saveregs(); - if (flags & LogUpdMask) { - if (flags & IndexMask) { - if (FlagOn(ErasedMask, flags)) { - Yap_ErLogUpdIndex(ClauseFlagsToLogUpdIndex(pt1)); - } else { - Yap_CleanUpIndex(ClauseFlagsToLogUpdIndex(pt1)); - } - } else { - Yap_ErLogUpdCl(ClauseFlagsToLogUpdClause(pt1)); - } - } else { - Yap_ErCl(ClauseFlagsToDynamicClause(pt1)); - } - setregs(); - } - } -#endif - goto failloop; - } -#ifdef MULTI_ASSIGNMENT_VARIABLES - else /* if (IsApplTerm(d1)) */ { - CELL *pt = RepAppl(d1); - /* AbsAppl means */ - /* multi-assignment variable */ - /* so the next cell is the old value */ -#ifdef FROZEN_STACKS - --pt0; - pt[0] = TrailVal(pt0); -#else - pt[0] = TrailTerm(pt0-1); - pt0 -= 2; -#endif /* FROZEN_STACKS */ - goto failloop; - } -#endif - ENDD(d1); - ENDCACHE_TR(); - } - -#ifdef COROUTINING - NoStackFail: - BEGD(d0); -#ifdef SHADOW_S - Yap_REGS.S_ = SREG; -#endif - saveregs(); - d0 = interrupt_fail( PASS_REGS1 ); - setregs(); -#ifdef SHADOW_S - SREG = Yap_REGS.S_; -#endif - if (!d0) FAIL(); - JMPNext(); - ENDD(d0); - -#endif /* COROUTINING */ - ENDPBOp(); - - - diff --git a/C/fli_absmi_insts.h b/C/fli_absmi_insts.h deleted file mode 100644 index e54f86c85..000000000 --- a/C/fli_absmi_insts.h +++ /dev/null @@ -1,614 +0,0 @@ -/************************************************************************\ - * Call C predicates instructions * -\************************************************************************/ - - -#ifdef INDENT_CODE -{ - { - { -#endif /* INDENT_CODE */ - - BOp(call_cpred, Osbpp); - check_trail(TR); - if (!(PREG->y_u.Osbpp.p->PredFlags & (SafePredFlag|NoTracePredFlag|HiddenPredFlag))) { - CACHE_Y_AS_ENV(YREG); - check_stack(NoStackCCall, HR); - ENDCACHE_Y_AS_ENV(); - } - do_c_call: -#ifdef FROZEN_STACKS - { - choiceptr top_b = PROTECT_FROZEN_B(B); - -#ifdef YAPOR_SBA - if (YREG > (CELL *) top_b || YREG < HR) ASP = (CELL *)top_b; -#else - if (YREG > (CELL *) top_b) ASP = (CELL *)top_b; -#endif /* YAPOR_SBA */ - else ASP = (CELL *)(((char *)YREG) + PREG->y_u.Osbpp.s); - } -#else - SET_ASP(YREG, PREG->y_u.Osbpp.s); - /* for slots to work */ -#endif /* FROZEN_STACKS */ -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) - low_level_trace(enter_pred,PREG->y_u.Osbpp.p,XREGS+1); -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - CPredicate f = PREG->y_u.Osbpp.p->cs.f_code; - PREG = NEXTOP(PREG, Osbpp); - saveregs(); - d0 = (f)(PASS_REGS1); - setregs(); -#ifdef SHADOW_S - SREG = Yap_REGS.S_; -#endif - if (!d0) { - FAIL(); - } - CACHE_A1(); - ENDD(d0); - JMPNext(); - - NoStackCCall: - PROCESS_INT(interrupt_call, do_c_call); - - ENDBOp(); - - /* execute Label */ - BOp(execute_cpred, pp); - check_trail(TR); - { - PredEntry *pt0; - - BEGD(d0); - CACHE_Y_AS_ENV(YREG); -#ifndef NO_CHECKING - check_stack(NoStackExecuteC, HR); - do_executec: -#endif -#ifdef FROZEN_STACKS - { - choiceptr top_b = PROTECT_FROZEN_B(B); - -#ifdef YAPOR_SBA - if (YREG > (CELL *) top_b || YREG < HR) ASP = (CELL *)top_b; -#else - if (YREG > (CELL *) top_b) ASP = (CELL *)top_b; -#endif /* YAPOR_SBA */ - else ASP = YREG+E_CB; - } -#else - SET_ASP(YREG, E_CB*sizeof(CELL)); - /* for slots to work */ -#endif /* FROZEN_STACKS */ - pt0 = PREG->y_u.pp.p; -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - low_level_trace(enter_pred,pt0,XREGS+1); - } -#endif /* LOW_LEVEL_TRACE */ - CACHE_A1(); - BEGD(d0); - d0 = (CELL)B; - /* for profiler */ - save_pc(); - ENV_YREG[E_CB] = d0; - ENDD(d0); -#ifdef DEPTH_LIMIT - if (DEPTH <= MkIntTerm(1)) {/* I assume Module==0 is prolog */ - if (pt0->ModuleOfPred) { - if (DEPTH == MkIntTerm(0)) - FAIL(); - else DEPTH = RESET_DEPTH(); - } - } else if (pt0->ModuleOfPred) { - DEPTH -= MkIntConstant(2); - } -#endif /* DEPTH_LIMIT */ - /* now call C-Code */ - { - CPredicate f = PREG->y_u.pp.p->cs.f_code; - yamop *oldPREG = PREG; - saveregs(); - d0 = (f)(PASS_REGS1); - setregs(); -#ifdef SHADOW_S - SREG = Yap_REGS.S_; -#endif - if (!d0) { - FAIL(); - } - if (oldPREG == PREG) { - /* we did not update PREG */ - /* we can proceed */ - PREG = CPREG; - ENV_YREG = ENV; -#ifdef DEPTH_LIMIT - DEPTH = ENV_YREG[E_DEPTH]; -#endif - WRITEBACK_Y_AS_ENV(); - } else { - /* call the new code */ - CACHE_A1(); - } - } - JMPNext(); - ENDCACHE_Y_AS_ENV(); - ENDD(d0); - } - - NoStackExecuteC: - PROCESS_INT(interrupt_execute, do_executec); - ENDBOp(); - - /* Like previous, the only difference is that we do not */ - /* trust the C-function we are calling and hence we must */ - /* guarantee that *all* machine registers are saved and */ - /* restored */ - BOp(call_usercpred, Osbpp); - CACHE_Y_AS_ENV(YREG); - check_stack(NoStackUserCall, HR); - ENDCACHE_Y_AS_ENV(); - do_user_call: -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - low_level_trace(enter_pred,PREG->y_u.Osbpp.p,XREGS+1); - } -#endif /* LOW_LEVEL_TRACE */ -#ifdef FROZEN_STACKS - { - choiceptr top_b = PROTECT_FROZEN_B(B); -#ifdef YAPOR_SBA - if (YREG > (CELL *) top_b || YREG < HR) ASP = (CELL *) top_b; -#else - if (YREG > (CELL *) top_b) ASP = (CELL *) top_b; -#endif /* YAPOR_SBA */ - else ASP = (CELL *)(((char *)YREG) + PREG->y_u.Osbpp.s); - } -#else - SET_ASP(YREG, PREG->y_u.Osbpp.s); - /* for slots to work */ -#endif /* FROZEN_STACKS */ - { - /* make sure that we can still have access to our old PREG after calling user defined goals and backtracking or failing */ - yamop *savedP; - - LOCAL_PrologMode |= UserCCallMode; - { - PredEntry *p = PREG->y_u.Osbpp.p; - - PREG = NEXTOP(PREG, Osbpp); - savedP = PREG; - saveregs(); - save_machine_regs(); - - SREG = (CELL *) YAP_Execute(p, p->cs.f_code); - } - setregs(); - LOCAL_PrologMode &= ~UserCCallMode; - restore_machine_regs(); - PREG = savedP; - } - if (EX) { - struct DB_TERM *exp = EX; - EX = NULL; - Yap_JumpToEnv(Yap_PopTermFromDB(exp)); - SREG = NULL; - } - if (!SREG) { - FAIL(); - } - /* in case we call Execute */ - YENV = ENV; - YREG = ENV; - JMPNext(); - - NoStackUserCall: - PROCESS_INT(interrupt_call, do_user_call); - - ENDBOp(); - - BOp(call_c_wfail, slp); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - low_level_trace(enter_pred,PREG->y_u.slp.p,XREGS+1); - } -#endif /* LOW_LEVEL_TRACE */ -#ifdef FROZEN_STACKS - { - choiceptr top_b = PROTECT_FROZEN_B(B); -#ifdef YAPOR_SBA - if (YREG > (CELL *) top_b || YREG < HR) ASP = (CELL *) top_b; -#else - if (YREG > (CELL *) top_b) ASP = (CELL *) top_b; -#endif /* YAPOR_SBA */ - else { - BEGD(d0); - d0 = PREG->y_u.slp.s; - ASP = ((CELL *)YREG) + d0; - ENDD(d0); - } - } -#else - if (YREG > (CELL *) B) - ASP = (CELL *) B; - else { - BEGD(d0); - d0 = PREG->y_u.slp.s; - ASP = ((CELL *) YREG) + d0; - ENDD(d0); - } -#endif /* FROZEN_STACKS */ - { - CPredicate f = PREG->y_u.slp.p->cs.f_code; - saveregs(); - SREG = (CELL *)((f)(PASS_REGS1)); - setregs(); - } - if (!SREG) { - /* be careful about error handling */ - if (PREG != FAILCODE) - PREG = PREG->y_u.slp.l; - } else { - PREG = NEXTOP(PREG, slp); - } - CACHE_A1(); - JMPNext(); - ENDBOp(); - - BOp(try_c, OtapFs); -#ifdef YAPOR - CUT_wait_leftmost(); -#endif /* YAPOR */ - CACHE_Y(YREG); - /* Alocate space for the cut_c structure*/ - CUT_C_PUSH(NEXTOP(NEXTOP(PREG,OtapFs),OtapFs),S_YREG); - S_YREG = S_YREG - PREG->y_u.OtapFs.extra; - store_args(PREG->y_u.OtapFs.s); - store_yaam_regs(NEXTOP(PREG, OtapFs), 0); - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif /* YAPOR */ - SET_BB(B_YREG); - ENDCACHE_Y(); - - TRYCC: - ASP = (CELL *)B; - { - CPredicate f = (CPredicate)(PREG->y_u.OtapFs.f); - saveregs(); - SREG = (CELL *) ((f) (PASS_REGS1)); - /* This last instruction changes B B*/ - while (POP_CHOICE_POINT(B)){ - cut_c_pop(); - } - setregs(); - } - if (!SREG) { - /* Removes the cut functions from the stack - without executing them because we have fail - and not cuted the predicate*/ - while(POP_CHOICE_POINT(B)) - cut_c_pop(); - FAIL(); - } - if ((CELL *) B == YREG && ASP != (CELL *) B) { - /* as Luis says, the predicate that did the try C might - * have left some data on the stack. We should preserve - * it, unless the builtin also did cut */ - YREG = ASP; - HBREG = PROTECT_FROZEN_H(B); - SET_BB(B); - } - PREG = CPREG; - YREG = ENV; - JMPNext(); - ENDBOp(); - - BOp(retry_c, OtapFs); -#ifdef YAPOR - CUT_wait_leftmost(); -#endif /* YAPOR */ - CACHE_Y(B); - CPREG = B_YREG->cp_cp; - ENV = B_YREG->cp_env; - HR = PROTECT_FROZEN_H(B); -#ifdef DEPTH_LIMIT - DEPTH =B->cp_depth; -#endif - HBREG = HR; - restore_args(PREG->y_u.OtapFs.s); - ENDCACHE_Y(); - goto TRYCC; - ENDBOp(); - - BOp(cut_c, OtapFs); - /*This is a phantom instruction. This is not executed by the WAM*/ -#ifdef DEBUG - /*If WAM executes this instruction, probably there's an error - when we put this instruction, cut_c, after retry_c*/ - printf ("ERROR: Should not print this message FILE: absmi.c %d\n",__LINE__); -#endif /*DEBUG*/ - ENDBOp(); - - BOp(try_userc, OtapFs); -#ifdef YAPOR - CUT_wait_leftmost(); -#endif /* YAPOR */ - CACHE_Y(YREG); - /* Alocate space for the cut_c structure*/ - CUT_C_PUSH(NEXTOP(NEXTOP(PREG,OtapFs),OtapFs),S_YREG); - S_YREG = S_YREG - PREG->y_u.OtapFs.extra; - store_args(PREG->y_u.OtapFs.s); - store_yaam_regs(NEXTOP(PREG, OtapFs), 0); - B = B_YREG; -#ifdef YAPOR - SCH_set_load(B_YREG); -#endif - SET_BB(B_YREG); - ENDCACHE_Y(); - LOCAL_PrologMode |= UserCCallMode; - ASP = YREG; - saveregs(); - save_machine_regs(); - SREG = (CELL *) YAP_ExecuteFirst(PREG->y_u.OtapFs.p, (CPredicate)(PREG->y_u.OtapFs.f)); - EX = NULL; - restore_machine_regs(); - setregs(); - LOCAL_PrologMode &= ~UserCCallMode; - if (!SREG) { - FAIL(); - } - if ((CELL *) B == YREG && ASP != (CELL *) B) { - /* as Luis says, the predicate that did the try C might - * have left some data on the stack. We should preserve - * it, unless the builtin also did cut */ - YREG = ASP; - HBREG = PROTECT_FROZEN_H(B); - } - PREG = CPREG; - YREG = ENV; - CACHE_A1(); - JMPNext(); - ENDBOp(); - - BOp(retry_userc, OtapFs); -#ifdef YAPOR - CUT_wait_leftmost(); -#endif /* YAPOR */ - CACHE_Y(B); - CPREG = B_YREG->cp_cp; - ENV = B_YREG->cp_env; - HR = PROTECT_FROZEN_H(B); -#ifdef DEPTH_LIMIT - DEPTH =B->cp_depth; -#endif - HBREG = HR; - restore_args(PREG->y_u.OtapFs.s); - ENDCACHE_Y(); - - LOCAL_PrologMode |= UserCCallMode; - SET_ASP(YREG, E_CB*sizeof(CELL)); - saveregs(); - save_machine_regs(); - SREG = (CELL *) YAP_ExecuteNext(PREG->y_u.OtapFs.p, (CPredicate)(PREG->y_u.OtapFs.f)); - EX = NULL; - restore_machine_regs(); - setregs(); - LOCAL_PrologMode &= ~UserCCallMode; - if (!SREG) { - /* Removes the cut functions from the stack - without executing them because we have fail - and not cuted the predicate*/ - while(POP_CHOICE_POINT(B)) - cut_c_pop(); - FAIL(); - } - if ((CELL *) B == YREG && ASP != (CELL *) B) { - /* as Luis says, the predicate that did the try C might - * have left some data on the stack. We should preserve - * it, unless the builtin also did cut */ - YREG = ASP; - HBREG = PROTECT_FROZEN_H(B); - } - PREG = CPREG; - YREG = ENV; - CACHE_A1(); - JMPNext(); - ENDBOp(); - - BOp(cut_userc, OtapFs); - /*This is a phantom instruction. This is not executed by the WAM*/ -#ifdef DEBUG - /*If WAM executes this instruction, probably there's an error - when we put this instruction, cut_userc, after retry_userc*/ - printf ("ERROR: Should not print this message FILE: absmi.c %d\n",__LINE__); -#endif /*DEBUG*/ - CACHE_A1(); - JMPNext(); - ENDBOp(); - - - /************************************************************************\ - * support instructions * -\************************************************************************/ - - BOp(lock_pred, e); - { - PredEntry *ap = PredFromDefCode(PREG); - PELOCK(10,ap); - PP = ap; - if (!ap->cs.p_code.NOfClauses) { - UNLOCKPE(11,ap); - FAIL(); - } - /* - we do not lock access to the predicate, - we must take extra care here - */ - if (ap->cs.p_code.NOfClauses > 1 && - !(ap->PredFlags & IndexedPredFlag)) { - /* update ASP before calling IPred */ - SET_ASP(YREG, E_CB*sizeof(CELL)); - saveregs(); - Yap_IPred(ap, 0, CP); - /* IPred can generate errors, it thus must get rid of the lock itself */ - setregs(); - CACHE_A1(); - /* for profiler */ - save_pc(); - } - PREG = ap->cs.p_code.TrueCodeOfPred; - } - JMPNext(); - ENDBOp(); - - BOp(index_pred, e); - { - PredEntry *ap = PredFromDefCode(PREG); -#if defined(YAPOR) || defined(THREADS) - /* - we do not lock access to the predicate, - we must take extra care here - */ - if (!PP) { - PELOCK(11,ap); - } - if (ap->OpcodeOfPred != INDEX_OPCODE) { - /* someone was here before we were */ - if (!PP) { - UNLOCKPE(11,ap); - } - PREG = ap->CodeOfPred; - /* for profiler */ - save_pc(); - JMPNext(); - } -#endif - /* update ASP before calling IPred */ - SET_ASP(YREG, E_CB*sizeof(CELL)); - saveregs(); - Yap_IPred(ap, 0, CP); - /* IPred can generate errors, it thus must get rid of the lock itself */ - setregs(); - CACHE_A1(); - PREG = ap->CodeOfPred; - /* for profiler */ - save_pc(); -#if defined(YAPOR) || defined(THREADS) - if (!PP) -#endif - UNLOCKPE(14,ap); - - } - JMPNext(); - ENDBOp(); - -#if THREADS - BOp(thread_local, e); - { - PredEntry *ap = PredFromDefCode(PREG); - ap = Yap_GetThreadPred(ap PASS_REGS); - PREG = ap->CodeOfPred; - /* for profiler */ - save_pc(); - } - JMPNext(); - ENDBOp(); -#endif - - BOp(expand_index, e); - { - PredEntry *pe = PredFromExpandCode(PREG); - yamop *pt0; - - /* update ASP before calling IPred */ - SET_ASP(YREG, E_CB*sizeof(CELL)); -#if defined(YAPOR) || defined(THREADS) - if (!PP) { - PELOCK(12,pe); - } - if (!same_lu_block(PREG_ADDR, PREG)) { - PREG = *PREG_ADDR; - if (!PP) { - UNLOCKPE(15,pe); - } - JMPNext(); - } -#endif -#ifdef SHADOW_S - S = SREG; -#endif /* SHADOW_S */ - saveregs(); - pt0 = Yap_ExpandIndex(pe, 0); - /* restart index */ - setregs(); -#ifdef SHADOW_S - SREG = S; -#endif /* SHADOW_S */ - PREG = pt0; -#if defined(YAPOR) || defined(THREADS) - if (!PP) { - UNLOCKPE(12,pe); - } -#endif - JMPNext(); - } - ENDBOp(); - - BOp(expand_clauses, sssllp); - { - PredEntry *pe = PREG->y_u.sssllp.p; - yamop *pt0; - - /* update ASP before calling IPred */ - SET_ASP(YREG, E_CB*sizeof(CELL)); -#if defined(YAPOR) || defined(THREADS) - if (PP == NULL) { - PELOCK(13,pe); - } - if (!same_lu_block(PREG_ADDR, PREG)) { - PREG = *PREG_ADDR; - if (!PP) { - UNLOCKPE(16,pe); - } - JMPNext(); - } -#endif - saveregs(); - pt0 = Yap_ExpandIndex(pe, 0); - /* restart index */ - setregs(); - PREG = pt0; -#if defined(YAPOR) || defined(THREADS) - if (!PP) { - UNLOCKPE(18,pe); - } -#endif - JMPNext(); - } - ENDBOp(); - - BOp(undef_p, e); - /* save S for module name */ - saveregs(); - undef_goal( PASS_REGS1 ); - setregs(); - /* for profiler */ - CACHE_A1(); - JMPNext(); - ENDBOp(); - - BOp(spy_pred, e); - saveregs(); - spy_goal( PASS_REGS1 ); - setregs(); - CACHE_A1(); - JMPNext(); - ENDBOp(); - - diff --git a/C/gmp_support.c b/C/gmp_support.c index 158d6ceee..c6810fb1a 100644 --- a/C/gmp_support.c +++ b/C/gmp_support.c @@ -1027,34 +1027,22 @@ Yap_gmp_exp_big_big(Term t1, Term t2) Term -Yap_gmp_big_from_64bits(int64_t i) +Yap_gmp_big_from_64bits(YAP_LONG_LONG i) { - char s[65]; + char s[64]; MP_INT new; #ifdef _WIN32 snprintf(s,64,"%I64d", (long long int)i); #elif HAVE_SNPRINTF - snprintf(s, 64, "%lld", (int64_t)i); + snprintf(s, 64, "%lld", (long long int)i); #else - sprintf(s, "%lld", (int64_t)i); + sprintf(s, "%lld", (long long int)i); #endif mpz_init_set_str (&new, s, 10); return MkBigAndClose(&new); } -int64_t -Yap_gmp_big_to_64bits(Term t) -{ - MP_INT *b = Yap_BigIntOfTerm(t); - int64_t rc; - mpz_export( &rc, NULL, 0, sizeof(int64_t), 0, 0, b); - if ( mpz_sgn(b) < 0 ) { - rc = -rc; - } - return rc; -} - Term Yap_gmq_rdiv_int_int(Int i1, Int i2) { @@ -1764,7 +1752,6 @@ Yap_term_to_existing_rat(Term t, MP_RAT *b) return FALSE; } - #endif diff --git a/C/heapgc.c b/C/heapgc.c index b1506f8ee..87018bc43 100755 --- a/C/heapgc.c +++ b/C/heapgc.c @@ -4179,7 +4179,7 @@ p_inform_gc( USES_REGS1 ) { Term tn = MkIntegerTerm(LOCAL_TotGcTime); Term tt = MkIntegerTerm(LOCAL_GcCalls); - Term ts = Yap_MkInt64Term((LOCAL_TotGcRecovered*sizeof(CELL))); + Term ts = Yap_Mk64IntegerTerm((LOCAL_TotGcRecovered*sizeof(CELL))); return(Yap_unify(tn, ARG2) && Yap_unify(tt, ARG1) && Yap_unify(ts, ARG3)); diff --git a/C/index_absmi_insts.h b/C/index_absmi_insts.h deleted file mode 100644 index c3e78ddc1..000000000 --- a/C/index_absmi_insts.h +++ /dev/null @@ -1,459 +0,0 @@ -/************************************************************************\ - * Indexing in ARG1 * -\************************************************************************/ - - -#ifdef INDENT_CODE -{ - { - { -#endif /* INDENT_CODE */ - - BOp(user_switch, lp); - { - yamop *new = Yap_udi_search(PREG->y_u.lp.p); - if (!new) { - PREG = PREG->y_u.lp.l; - JMPNext(); - } - PREG = new; - JMPNext(); - } - ENDBOp(); - - BOp(switch_on_type, llll); - BEGD(d0); - d0 = CACHED_A1(); - deref_head(d0, swt_unk); - /* nonvar */ - swt_nvar: - if (IsPairTerm(d0)) { - /* pair */ - SREG = RepPair(d0); - copy_jmp_address(PREG->y_u.llll.l1); - PREG = PREG->y_u.llll.l1; - JMPNext(); - } - else if (!IsApplTerm(d0)) { - /* constant */ - copy_jmp_address(PREG->y_u.llll.l2); - PREG = PREG->y_u.llll.l2; - I_R = d0; - JMPNext(); - } - else { - /* appl */ - copy_jmp_address(PREG->y_u.llll.l3); - PREG = PREG->y_u.llll.l3; - SREG = RepAppl(d0); - JMPNext(); - } - - BEGP(pt0); - deref_body(d0, pt0, swt_unk, swt_nvar); - /* variable */ - copy_jmp_address(PREG->y_u.llll.l4); - PREG = PREG->y_u.llll.l4; - JMPNext(); - ENDP(pt0); - ENDD(d0); - ENDBOp(); - - /* specialised case where the arguments may be: - * a list; - * the empty list; - * some other atom; - * a variable; - * - */ - BOp(switch_list_nl, ollll); - ALWAYS_LOOKAHEAD(PREG->y_u.ollll.pop); - BEGD(d0); - d0 = CACHED_A1(); -#if UNIQUE_TAG_FOR_PAIRS - deref_list_head(d0, swlnl_unk_p); - swlnl_list_p: - { -#else - deref_head(d0, swlnl_unk_p); - /* non variable */ - swlnl_nvar_p: - if (__builtin_expect(IsPairTerm(d0),1)) { - /* pair */ -#endif - copy_jmp_address(PREG->y_u.ollll.l1); - PREG = PREG->y_u.ollll.l1; - SREG = RepPair(d0); - ALWAYS_GONext(); - } -#if UNIQUE_TAG_FOR_PAIRS - swlnl_nlist_p: -#endif - if (d0 == TermNil) { - /* empty list */ - PREG = PREG->y_u.ollll.l2; - JMPNext(); - } - else { - /* appl or constant */ - if (IsApplTerm(d0)) { - copy_jmp_address(PREG->y_u.ollll.l3); - PREG = PREG->y_u.ollll.l3; - SREG = RepAppl(d0); - JMPNext(); - } else { - copy_jmp_address(PREG->y_u.ollll.l3); - PREG = PREG->y_u.ollll.l3; - I_R = d0; - JMPNext(); - } - } - - BEGP(pt0); -#if UNIQUE_TAG_FOR_PAIRS - swlnl_unk_p: - deref_list_body(d0, pt0, swlnl_list_p, swlnl_nlist_p); -#else - deref_body(d0, pt0, swlnl_unk_p, swlnl_nvar_p); -#endif - ENDP(pt0); - /* variable */ - copy_jmp_address(PREG->y_u.ollll.l4); - PREG = PREG->y_u.ollll.l4; - JMPNext(); - ENDD(d0); - } - ENDBOp(); - - BOp(switch_on_arg_type, xllll); - BEGD(d0); - d0 = XREG(PREG->y_u.xllll.x); - deref_head(d0, arg_swt_unk); - /* nonvar */ - arg_swt_nvar: - if (IsPairTerm(d0)) { - /* pair */ - copy_jmp_address(PREG->y_u.xllll.l1); - PREG = PREG->y_u.xllll.l1; - SREG = RepPair(d0); - JMPNext(); - } - else if (!IsApplTerm(d0)) { - /* constant */ - copy_jmp_address(PREG->y_u.xllll.l2); - PREG = PREG->y_u.xllll.l2; - I_R = d0; - JMPNext(); - } - else { - /* appl */ - copy_jmp_address(PREG->y_u.xllll.l3); - PREG = PREG->y_u.xllll.l3; - SREG = RepAppl(d0); - JMPNext(); - } - - BEGP(pt0); - deref_body(d0, pt0, arg_swt_unk, arg_swt_nvar); - /* variable */ - copy_jmp_address(PREG->y_u.xllll.l4); - PREG = PREG->y_u.xllll.l4; - JMPNext(); - ENDP(pt0); - ENDD(d0); - ENDBOp(); - - BOp(switch_on_sub_arg_type, sllll); - BEGD(d0); - d0 = SREG[PREG->y_u.sllll.s]; - deref_head(d0, sub_arg_swt_unk); - /* nonvar */ - sub_arg_swt_nvar: - if (IsPairTerm(d0)) { - /* pair */ - copy_jmp_address(PREG->y_u.sllll.l1); - PREG = PREG->y_u.sllll.l1; - SREG = RepPair(d0); - JMPNext(); - } - else if (!IsApplTerm(d0)) { - /* constant */ - copy_jmp_address(PREG->y_u.sllll.l2); - PREG = PREG->y_u.sllll.l2; - I_R = d0; - JMPNext(); - } - else { - /* appl */ - copy_jmp_address(PREG->y_u.sllll.l3); - PREG = PREG->y_u.sllll.l3; - SREG = RepAppl(d0); - JMPNext(); - } - - BEGP(pt0); - deref_body(d0, pt0, sub_arg_swt_unk, sub_arg_swt_nvar); - /* variable */ - copy_jmp_address(PREG->y_u.sllll.l4); - PREG = PREG->y_u.sllll.l4; - JMPNext(); - ENDP(pt0); - ENDD(d0); - ENDBOp(); - - BOp(jump_if_var, l); - BEGD(d0); - d0 = CACHED_A1(); - deref_head(d0, jump_if_unk); - /* non var */ - jump0_if_nonvar: - PREG = NEXTOP(PREG, l); - JMPNext(); - - BEGP(pt0); - deref_body(d0, pt0, jump_if_unk, jump0_if_nonvar); - /* variable */ - copy_jmp_address(PREG->y_u.l.l); - PREG = PREG->y_u.l.l; - ENDP(pt0); - JMPNext(); - ENDD(d0); - ENDBOp(); - - BOp(jump_if_nonvar, xll); - BEGD(d0); - d0 = XREG(PREG->y_u.xll.x); - deref_head(d0, jump2_if_unk); - /* non var */ - jump2_if_nonvar: - copy_jmp_address(PREG->y_u.xll.l1); - PREG = PREG->y_u.xll.l1; - JMPNext(); - - BEGP(pt0); - deref_body(d0, pt0, jump2_if_unk, jump2_if_nonvar); - /* variable */ - PREG = NEXTOP(PREG, xll); - ENDP(pt0); - JMPNext(); - ENDD(d0); - ENDBOp(); - - BOp(if_not_then, clll); - BEGD(d0); - d0 = CACHED_A1(); - deref_head(d0, if_n_unk); - if_n_nvar: - /* not variable */ - if (d0 == PREG->y_u.clll.c) { - /* equal to test value */ - copy_jmp_address(PREG->y_u.clll.l2); - PREG = PREG->y_u.clll.l2; - JMPNext(); - } - else { - /* different from test value */ - /* the case to optimise */ - copy_jmp_address(PREG->y_u.clll.l1); - PREG = PREG->y_u.clll.l1; - JMPNext(); - } - - BEGP(pt0); - deref_body(d0, pt0, if_n_unk, if_n_nvar); - ENDP(pt0); - /* variable */ - copy_jmp_address(PREG->y_u.clll.l3); - PREG = PREG->y_u.clll.l3; - JMPNext(); - ENDD(d0); - ENDBOp(); - - /************************************************************************\ - * Indexing on ARG1 * -\************************************************************************/ - -#define HASH_SHIFT 6 - - BOp(switch_on_func, sssl); - BEGD(d1); - d1 = *SREG++; - /* we use a very simple hash function to find elements in a - * switch table */ - { - CELL - /* first, calculate the mask */ - Mask = (PREG->y_u.sssl.s - 1) << 1, /* next, calculate the hash function */ - hash = d1 >> (HASH_SHIFT - 1) & Mask; - CELL *base; - - base = (CELL *)PREG->y_u.sssl.l; - /* PREG now points at the beginning of the hash table */ - BEGP(pt0); - /* pt0 will always point at the item */ - pt0 = base + hash; - BEGD(d0); - d0 = pt0[0]; - /* a match happens either if we found the value, or if we - * found an empty slot */ - if (d0 == d1 || d0 == 0) { - copy_jmp_addressa(pt0+1); - PREG = (yamop *) (pt0[1]); - JMPNext(); - } - else { - /* ooops, collision, look for other items */ - register CELL d = ((d1 | 1) << 1) & Mask; - - while (1) { - hash = (hash + d) & Mask; - pt0 = base + hash; - d0 = pt0[0]; - if (d0 == d1 || d0 == 0) { - copy_jmp_addressa(pt0+1); - PREG = (yamop *) pt0[1]; - JMPNext(); - } - } - } - ENDD(d0); - ENDP(pt0); - } - ENDD(d1); - ENDBOp(); - - BOp(switch_on_cons, sssl); - BEGD(d1); - d1 = I_R; - /* we use a very simple hash function to find elements in a - * switch table */ - { - CELL - /* first, calculate the mask */ - Mask = (PREG->y_u.sssl.s - 1) << 1, /* next, calculate the hash function */ - hash = d1 >> (HASH_SHIFT - 1) & Mask; - CELL *base; - - base = (CELL *)PREG->y_u.sssl.l; - /* PREG now points at the beginning of the hash table */ - BEGP(pt0); - /* pt0 will always point at the item */ - pt0 = base + hash; - BEGD(d0); - d0 = pt0[0]; - /* a match happens either if we found the value, or if we - * found an empty slot */ - if (d0 == d1 || d0 == 0) { - copy_jmp_addressa(pt0+1); - PREG = (yamop *) (pt0[1]); - JMPNext(); - } - else { - /* ooops, collision, look for other items */ - register CELL d = ((d1 | 1) << 1) & Mask; - - while (1) { - hash = (hash + d) & Mask; - pt0 = base + hash; - d0 = pt0[0]; - if (d0 == d1 || d0 == 0) { - copy_jmp_addressa(pt0+1); - PREG = (yamop *) pt0[1]; - JMPNext(); - } - } - } - ENDD(d0); - ENDP(pt0); - } - ENDD(d1); - ENDBOp(); - - BOp(go_on_func, sssl); - BEGD(d0); - { - CELL *pt = (CELL *)(PREG->y_u.sssl.l); - - d0 = *SREG++; - if (d0 == pt[0]) { - copy_jmp_addressa(pt+1); - PREG = (yamop *) pt[1]; - JMPNext(); - } else { - copy_jmp_addressa(pt+3); - PREG = (yamop *) pt[3]; - JMPNext(); - } - } - ENDD(d0); - ENDBOp(); - - BOp(go_on_cons, sssl); - BEGD(d0); - { - CELL *pt = (CELL *)(PREG->y_u.sssl.l); - - d0 = I_R; - if (d0 == pt[0]) { - copy_jmp_addressa(pt+1); - PREG = (yamop *) pt[1]; - JMPNext(); - } else { - copy_jmp_addressa(pt+3); - PREG = (yamop *) pt[3]; - JMPNext(); - } - } - ENDD(d0); - ENDBOp(); - - BOp(if_func, sssl); - BEGD(d1); - BEGP(pt0); - pt0 = (CELL *) PREG->y_u.sssl.l; - d1 = *SREG++; - while (pt0[0] != d1 && pt0[0] != (CELL)NULL ) { - pt0 += 2; - } - copy_jmp_addressa(pt0+1); - PREG = (yamop *) (pt0[1]); - JMPNext(); - ENDP(pt0); - ENDD(d1); - ENDBOp(); - - BOp(if_cons, sssl); - BEGD(d1); - BEGP(pt0); - pt0 = (CELL *) PREG->y_u.sssl.l; - d1 = I_R; - while (pt0[0] != d1 && pt0[0] != 0L ) { - pt0 += 2; - } - copy_jmp_addressa(pt0+1); - PREG = (yamop *) (pt0[1]); - JMPNext(); - ENDP(pt0); - ENDD(d1); - ENDBOp(); - - Op(index_dbref, e); - PREG = NEXTOP(PREG, e); - I_R = AbsAppl(SREG-1); - GONext(); - ENDOp(); - - Op(index_blob, e); - PREG = NEXTOP(PREG, e); - I_R = Yap_DoubleP_key(SREG); - GONext(); - ENDOp(); - - Op(index_long, e); - PREG = NEXTOP(PREG, e); - I_R = Yap_IntP_key(SREG); - GONext(); - ENDOp(); - - - diff --git a/C/lu_absmi_insts.h b/C/lu_absmi_insts.h deleted file mode 100644 index facb00559..000000000 --- a/C/lu_absmi_insts.h +++ /dev/null @@ -1,368 +0,0 @@ -/************************************************************************\ - * Logical Updates * -\************************************************************************/ - -#ifdef INDENT_CODE -{ - { - { -#endif /* INDENT_CODE */ - - BOp(profiled_retry_logical, OtaLl); - check_trail(TR); - { - UInt timestamp; - CACHE_Y(B); - -#if defined(YAPOR) || defined(THREADS) - if (PP != PREG->y_u.OtaLl.d->ClPred) { - if (PP) UNLOCKPE(15,PP); - PP = PREG->y_u.OtaLl.d->ClPred; - PELOCK(15,PP); - } -#endif - timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[PREG->y_u.OtaLl.s]); - if (!VALID_TIMESTAMP(timestamp, PREG->y_u.OtaLl.d)) { - /* jump to next instruction */ - PREG=PREG->y_u.OtaLl.n; - JMPNext(); - } - restore_yaam_regs(PREG->y_u.OtaLl.n); - restore_args(PREG->y_u.OtaLl.s); - LOCK(PREG->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); - PREG->y_u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; - UNLOCK(PREG->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); -#ifdef THREADS - PP = PREG->y_u.OtaLl.d->ClPred; -#endif - PREG = PREG->y_u.OtaLl.d->ClCode; -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); - set_cut(S_YREG, B->cp_b); -#else - set_cut(S_YREG, B_YREG->cp_b); -#endif /* FROZEN_STACKS */ - SET_BB(B_YREG); - ENDCACHE_Y(); - } - JMPNext(); - ENDBOp(); - - BOp(profiled_trust_logical, OtILl); - CACHE_Y(B); - { - LogUpdIndex *cl = PREG->y_u.OtILl.block; - PredEntry *ap = cl->ClPred; - LogUpdClause *lcl = PREG->y_u.OtILl.d; - UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); - -#if defined(YAPOR) || defined(THREADS) - if (PP != ap) { - if (PP) UNLOCKPE(16,PP); - PP = ap; - PELOCK(16,PP); - } -#endif - if (!VALID_TIMESTAMP(timestamp, lcl)) { - /* jump to next alternative */ - PREG = FAILCODE; - } else { - LOCK(ap->StatisticsForPred.lock); - ap->StatisticsForPred.NOfRetries++; - UNLOCK(ap->StatisticsForPred.lock); - PREG = lcl->ClCode; - } - /* HEY, leave indexing block alone!! */ - /* check if we are the ones using this code */ -#if MULTIPLE_STACKS - DEC_CLREF_COUNT(cl); - /* clear the entry from the trail */ - B->cp_tr--; - TR = B->cp_tr; - /* actually get rid of the code */ - if (cl->ClRefCount == 0 && (cl->ClFlags & (ErasedMask|DirtyMask))) { - if (PREG != FAILCODE) { - /* I am the last one using this clause, hence I don't need a lock - to dispose of it - */ - if (lcl->ClRefCount == 1) { - /* make sure the clause isn't destroyed */ - /* always add an extra reference */ - INC_CLREF_COUNT(lcl); - TRAIL_CLREF(lcl); - } - } - if (cl->ClFlags & ErasedMask) { - saveregs(); - Yap_ErLogUpdIndex(cl); - setregs(); - } else { - saveregs(); - Yap_CleanUpIndex(cl); - setregs(); - } - save_pc(); - } -#else - if (TrailTerm(B->cp_tr-1) == CLREF_TO_TRENTRY(cl) && - B->cp_tr != B->cp_b->cp_tr) { - cl->ClFlags &= ~InUseMask; - --B->cp_tr; -#if FROZEN_STACKS - if (B->cp_tr > TR_FZ) -#endif - { - TR = B->cp_tr; - } - /* next, recover space for the indexing code if it was erased */ - if (cl->ClFlags & (ErasedMask|DirtyMask)) { - if (PREG != FAILCODE) { - /* make sure we don't erase the clause we are jumping to, - notice that we can erase a number of refs in one go. */ - if (!(lcl->ClFlags & InUseMask)) { - lcl->ClFlags |= InUseMask; - TRAIL_CLREF(lcl); - } - } - if (cl->ClFlags & ErasedMask) { - saveregs(); - Yap_ErLogUpdIndex(cl); - setregs(); - } else { - saveregs(); - Yap_CleanUpIndex(cl); - setregs(); - } - save_pc(); - } - } -#endif -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_last_alternative(PREG, B_YREG); - restore_args(ap->ArityOfPE); -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#else - S_YREG++; -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B->cp_b); - } else -#endif /* YAPOR */ - { - pop_yaam_regs(); - pop_args(ap->ArityOfPE); - S_YREG--; -#ifdef FROZEN_STACKS - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B); - } - SET_BB(B_YREG); - ENDCACHE_Y(); - JMPNext(); - } - ENDBOp(); - - S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); -#endif /* FROZEN_STACKS */ - set_cut(S_YREG, B); - } - SET_BB(B_YREG); - ENDCACHE_Y(); - JMPNext(); - } - ENDBOp(); - - - - /***************************************************************** - * enter a logical semantics dynamic predicate * - *****************************************************************/ - - /* only meaningful with THREADS on! */ - /* lock logical updates predicate. */ - Op(lock_lu, p); -#if PARALLEL_YAP - if (PP) { - GONext(); - } - PP = PREG->y_u.p.p; - PELOCK(3, PP); -#endif - PREG = NEXTOP(PREG, p); - GONext(); - ENDOp(); - - /* only meaningful with THREADS on! */ - /* lock logical updates predicate. */ - Op(unlock_lu, e); -#if defined(YAPOR) || defined(THREADS) - if (PP) { - UNLOCKPE(1,PP); - PP = NULL; - } -#endif - PREG = NEXTOP(PREG, e); - GONext(); - ENDOp(); - - - /* enter logical pred */ - BOp(alloc_for_logical_pred, L); - check_trail(TR); - /* say that an environment is using this clause */ - /* we have our own copy for the clause */ -#if MULTIPLE_STACKS - { - LogUpdClause *cl = PREG->y_u.L.ClBase; -#if PARALLEL_YAP - PredEntry *ap = cl->ClPred; -#endif - - /* always add an extra reference */ - INC_CLREF_COUNT(cl); - TRAIL_CLREF(cl); - UNLOCKPE(2,ap); - PP = NULL; - } -#else - { - LogUpdClause *cl = (LogUpdClause *)PREG->y_u.L.ClBase; - if (!(cl->ClFlags & InUseMask)) { - cl->ClFlags |= InUseMask; - TRAIL_CLREF(cl); - } - } -#endif - PREG = NEXTOP(PREG, L); - JMPNext(); - ENDBOp(); - - /* copy database term */ - BOp(copy_idb_term, e); - { - LogUpdClause *cl = ClauseCodeToLogUpdClause(PREG); - Term t; - - SET_ASP(YREG, E_CB*sizeof(CELL)); - saveregs(); - while ((t = Yap_FetchTermFromDB(cl->lusl.ClSource)) == 0L) { - if (PP) UNLOCKPE(3,PP); -#if defined(YAPOR) || defined(THREADS) - PP = NULL; -#endif - if (LOCAL_Error_TYPE == OUT_OF_ATTVARS_ERROR) { - LOCAL_Error_TYPE = YAP_NO_ERROR; - if (!Yap_growglobal(NULL)) { - Yap_NilError(OUT_OF_ATTVARS_ERROR, LOCAL_ErrorMessage); - FAIL(); - } - } else { - LOCAL_Error_TYPE = YAP_NO_ERROR; - if (!Yap_gc(3, ENV, CP)) { - Yap_NilError(OUT_OF_STACK_ERROR, LOCAL_ErrorMessage); - FAIL(); - } - } -#if defined(YAPOR) || defined(THREADS) - PELOCK(5,ClauseCodeToLogUpdClause(PREG)->ClPred); - PP = ClauseCodeToLogUpdClause(PREG)->ClPred; -#endif - } - if (!Yap_IUnify(ARG2, t)) { - setregs(); -#if defined(YAPOR) || defined(THREADS) - if (PP) UNLOCKPE(6,PP); - PP = NULL; -#endif - FAIL(); - } - if (!Yap_IUnify(ARG3, MkDBRefTerm((DBRef)cl))) { - setregs(); -#if defined(YAPOR) || defined(THREADS) - if (PP) UNLOCKPE(5,PP); - PP = NULL; -#endif - FAIL(); - } - setregs(); - -#if MULTIPLE_STACKS - /* always add an extra reference */ - INC_CLREF_COUNT(cl); - TRAIL_CLREF(cl); - if (PP) UNLOCKPE(7,PP); - PP = NULL; -#else - if (!(cl->ClFlags & InUseMask)) { - /* Clause *cl = (Clause *)PREG->y_u.EC.ClBase; - - PREG->y_u.EC.ClTrail = TR-(tr_fr_ptr)LOCAL_TrailBase; - PREG->y_u.EC.ClENV = LCL0-YREG;*/ - cl->ClFlags |= InUseMask; - TRAIL_CLREF(cl); - } -#endif - } - PREG = CPREG; - YREG = ENV; -#ifdef DEPTH_LIMIT - DEPTH = YREG[E_DEPTH]; -#endif - JMPNext(); - ENDBOp(); - - - /* unify with database term */ - BOp(unify_idb_term, e); - { - LogUpdClause *cl = ClauseCodeToLogUpdClause(PREG); - - saveregs(); - if (!Yap_IUnify(ARG2, cl->lusl.ClSource->Entry)) { - setregs(); - UNLOCKPE(8,PP); -#if defined(YAPOR) || defined(THREADS) - PP = NULL; -#endif - FAIL(); - } - if (!Yap_IUnify(ARG3, MkDBRefTerm((DBRef)cl))) { - setregs(); - UNLOCKPE(9,PP); -#if defined(YAPOR) || defined(THREADS) - PP = NULL; -#endif - FAIL(); - } - setregs(); - - /* say that an environment is using this clause */ - /* we have our own copy for the clause */ -#if MULTIPLE_STACKS - /* always add an extra reference */ - INC_CLREF_COUNT(cl); - TRAIL_CLREF(cl); - UNLOCKPE(10,PP); - PP = NULL; -#else - if (!(cl->ClFlags & InUseMask)) { - /* Clause *cl = (Clause *)PREG->y_u.EC.ClBase; - - PREG->y_u.EC.ClTrail = TR-(tr_fr_ptr)LOCAL_TrailBase; - PREG->y_u.EC.ClENV = LCL0-YREG;*/ - cl->ClFlags |= InUseMask; - TRAIL_CLREF(cl); - } -#endif - } - PREG = CPREG; - YREG = ENV; -#ifdef DEPTH_LIMIT - DEPTH = YREG[E_DEPTH]; -#endif - JMPNext(); - ENDBOp(); - - diff --git a/C/meta_absmi_insts.h b/C/meta_absmi_insts.h deleted file mode 100644 index 44056cf4d..000000000 --- a/C/meta_absmi_insts.h +++ /dev/null @@ -1,301 +0,0 @@ - -#ifdef INDENT_CODE -{ - { - { -#endif /* INDENT_CODE */ - - /* join all the meta-call code into a single procedure with three entry points */ - { - CACHE_Y_AS_ENV(YREG); - BEGD(d0); /* term to be meta-called */ - Term mod; /* module to be used */ - PredEntry *pen; /* predicate */ - choiceptr b_ptr; /* cut point */ - Functor f; - - /* we are doing the rhs of a , */ - BOp(p_execute_tail, Osbmp); - - FETCH_Y_FROM_ENV(YREG); - /* place to cut to */ - b_ptr = (choiceptr)ENV_YREG[E_CB]; - /* original goal */ - d0 = ENV_YREG[-EnvSizeInCells-1]; - /* predicate we had used */ - pen = RepPredProp((Prop)IntegerOfTerm(ENV_YREG[-EnvSizeInCells-2])); - /* current module at the time */ - mod = ENV_YREG[-EnvSizeInCells-3]; - /* set YREG */ - /* Try to preserve the environment */ - ENV_YREG = (CELL *) (((char *) YREG) + PREG->y_u.Osbmp.s); -#ifdef FROZEN_STACKS - { - choiceptr top_b = PROTECT_FROZEN_B(B); -#ifdef YAPOR_SBA - if (ENV_YREG > (CELL *) top_b || ENV_YREG < HR) ENV_YREG = (CELL *) top_b; -#else - if (ENV_YREG > (CELL *) top_b) ENV_YREG = (CELL *) top_b; -#endif /* YAPOR_SBA */ - } -#else - if (ENV_YREG > (CELL *) B) { - ENV_YREG = (CELL *) B; - } -#endif /* FROZEN_STACKS */ - /* now, jump to actual execution */ - if (pen->ArityOfPE) { - f = pen->FunctorOfPred; - /* reuse environment if we are continuining a comma, ie, (g1,g2,g3) */ - /* can only do it deterministically */ - /* broken - if (f == FunctorComma && (CELL *)B >= ENV) { - ENV_YREG = ENV; - ENV = (CELL *)ENV[E_E]; - } - */ - goto execute_pred_f; - } else - goto execute_pred_a; - ENDBOp(); - - /* fetch the module from ARG2 */ - BOp(p_execute2, Osbpp); - - mod = ARG2; - deref_head(mod, execute2_unk0); - execute2_nvar0: - if (!IsAtomTerm(mod)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM, mod, "call/2"); - setregs(); - } - goto start_execute; - - BEGP(pt1); - deref_body(mod, pt1, execute2_unk0, execute2_nvar0); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, mod, "call/2"); - setregs(); - ENDP(pt1); - /* Oops, second argument was unbound too */ - FAIL(); - ENDBOp(); - - BOp(p_execute, Osbmp); - /* fetch the module from PREG */ - mod = PREG->y_u.Osbmp.mod; - start_execute: - /* place to cut to */ - b_ptr = B; - /* we have mod, and ARG1 has the goal, let us roll */ - /* Try to preserve the environment */ - ENV_YREG = (CELL *) (((char *) YREG) + PREG->y_u.Osbmp.s); -#ifdef FROZEN_STACKS - { - choiceptr top_b = PROTECT_FROZEN_B(B); -#ifdef YAPOR_SBA - if (ENV_YREG > (CELL *) top_b || ENV_YREG < HR) ENV_YREG = (CELL *) top_b; -#else - if (ENV_YREG > (CELL *) top_b) ENV_YREG = (CELL *) top_b; -#endif /* YAPOR_SBA */ - } -#else - if (ENV_YREG > (CELL *) B) { - ENV_YREG = (CELL *) B; - } -#endif /* FROZEN_STACKS */ - d0 = ARG1; - if (PRED_GOAL_EXPANSION_ALL) { - goto execute_metacall; - } - restart_execute: - deref_head(d0, execute_unk); - execute_nvar: - if (IsApplTerm(d0)) { - f = FunctorOfTerm(d0); - if (IsExtensionFunctor(f)) { - goto execute_metacall; - } - pen = RepPredProp(PredPropByFunc(f, mod)); - execute_pred_f: - if (pen->PredFlags & (MetaPredFlag|GoalExPredFlag)) { - /* just strip all of M:G */ - if (f == FunctorModule) { - Term tmod = ArgOfTerm(1,d0); - /* loop on modules */ - if (!IsVarTerm(tmod) && IsAtomTerm(tmod)) { - d0 = ArgOfTerm(2,d0); - mod = tmod; - goto execute_nvar; - } - goto execute_metacall; - } - if (f == FunctorComma) { - Term nmod = mod; - - /* optimise conj */ - SREG = RepAppl(d0); - BEGD(d1); - d1 = SREG[2]; - /* create an environment to execute the call */ - deref_head(d1, execute_comma_unk); - execute_comma_nvar: - if (IsAtomTerm(d1)) { - /* atomic goal is simpler */ - ENV_YREG[-EnvSizeInCells-2] = MkIntegerTerm((Int)PredPropByAtom(AtomOfTerm(d1),nmod)); - } else if (IsApplTerm(d1)) { - Functor f1 = FunctorOfTerm(d1); - if (IsExtensionFunctor(f1)) { - goto execute_metacall; - } else { - /* check for modules when looking up */ - if (f1 == FunctorModule) { - Term tmod = ArgOfTerm(1,d1); - /* loop on modules */ - if (!IsVarTerm(tmod) && IsAtomTerm(tmod)) { - d1 = ArgOfTerm(2,d1); - nmod = tmod; - goto execute_comma_nvar; - } - goto execute_metacall; - } - ENV_YREG[-EnvSizeInCells-2] = MkIntegerTerm((Int)PredPropByFunc(f1,nmod)); - } - } else { - goto execute_metacall; - } - ENV_YREG[-EnvSizeInCells-3] = mod; - /* now, we can create the new environment for the meta-call */ - /* notice that we are at a call, so we should ignore CP */ - ENV_YREG[E_CP] = (CELL)NEXTOP(PREG,Osbmp); - ENV_YREG[E_CB] = (CELL)b_ptr; - ENV_YREG[E_E] = (CELL)ENV; -#ifdef DEPTH_LIMIT - ENV_YREG[E_DEPTH] = DEPTH; -#endif /* DEPTH_LIMIT */ - ENV_YREG[-EnvSizeInCells-1] = d1; - ENV = ENV_YREG; - ENV_YREG -= EnvSizeInCells+3; - CPREG = NEXTOP(PREG, Osbmp); - PREG = COMMA_CODE; - /* for profiler */ - save_pc(); - d0 = SREG[1]; - goto restart_execute; - - BEGP(pt1); - deref_body(d1, pt1, execute_comma_unk, execute_comma_nvar); - goto execute_metacall; - ENDP(pt1); - ENDD(d1); - } else if (mod != CurrentModule) { - goto execute_metacall; - } - } - - /* copy arguments of meta-call to XREGS */ - BEGP(pt1); - pt1 = RepAppl(d0); - BEGD(d2); - for (d2 = ArityOfFunctor(f); d2; d2--) { -#ifdef YAPOR_SBA - BEGD(d1); - d1 = pt1[d2]; - if (d1 == 0) { - XREGS[d2] = (CELL)(pt1+d2); - } else { - XREGS[d2] = d1; - } -#else - XREGS[d2] = pt1[d2]; -#endif - } - ENDD(d2); - ENDP(pt1); - CACHE_A1(); - } else if (IsAtomTerm(d0)) { - pen = RepPredProp(PredPropByAtom(AtomOfTerm(d0), mod)); - execute_pred_a: - /* handle extra pruning */ - if (pen->FunctorOfPred == (Functor)AtomCut) { - if (b_ptr != B) { - saveregs(); - prune(b_ptr PASS_REGS); - setregs(); - } - } - } else { - goto execute_metacall; - } - - /* execute, but test first for interrupts */ - execute_end: - /* code copied from call */ -#ifndef NO_CHECKING - check_stack(NoStackPExecute, HR); -#endif - execute_stack_checked: - CPREG = NEXTOP(PREG, Osbmp); - ALWAYS_LOOKAHEAD(pen->OpcodeOfPred); - PREG = pen->CodeOfPred; - /* for profiler */ - save_pc(); -#ifdef DEPTH_LIMIT - if (DEPTH <= MkIntTerm(1)) {/* I assume Module==0 is primitives */ - if (pen->ModuleOfPred) { - if (DEPTH == MkIntTerm(0)) - FAIL(); - else DEPTH = RESET_DEPTH(); - } - } else if (pen->ModuleOfPred) - DEPTH -= MkIntConstant(2); -#endif /* DEPTH_LIMIT */ -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) - low_level_trace(enter_pred,pen,XREGS+1); -#endif /* LOW_LEVEL_TRACER */ - WRITEBACK_Y_AS_ENV(); - /* setup GB */ - ENV_YREG[E_CB] = (CELL) B; -#ifdef YAPOR - SCH_check_requests(); -#endif /* YAPOR */ - CACHE_A1(); - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - - /* meta-call: Prolog to the rescue */ - BEGP(pt1); - deref_body(d0, pt1, execute_unk, execute_nvar); - execute_metacall: - ARG1 = ARG3 = d0; - pen = PredMetaCall; - ARG2 = Yap_cp_as_integer(b_ptr); - if (mod) - ARG4 = mod; - else - ARG4 = TermProlog; - goto execute_end; - ENDP(pt1); - - /* at this point, we have the arguments all set in the argument registers, pen says who is the current predicate. don't remove. */ - NoStackPExecute: - WRITEBACK_Y_AS_ENV(); -#ifdef SHADOW_S - Yap_REGS.S_ = SREG; -#endif - saveregs_and_ycache(); - d0 = interrupt_pexecute( pen PASS_REGS ); - setregs_and_ycache(); -#ifdef SHADOW_S - SREG = Yap_REGS.S_; -#endif - if (!d0) FAIL(); - if (d0 == 2) goto execute_stack_checked; - goto execute_end; - ENDBOp(); - - ENDD(d0); - ENDCACHE_Y_AS_ENV(); - } diff --git a/C/or_absmi_insts.h b/C/or_absmi_insts.h deleted file mode 100644 index 9031bb8b0..000000000 --- a/C/or_absmi_insts.h +++ /dev/null @@ -1,192 +0,0 @@ -/************************************************************************ \ - * Instructions for implemeting 'or;' * -\************************************************************************/ - -#ifdef INDENT_CODE -{ - { - { -#endif /* INDENT_CODE */ - - BOp(jump, l); - PREG = PREG->y_u.l.l; - JMPNext(); - ENDBOp(); - - /* This instruction is called when the previous goal - was interrupted when waking up goals - */ - BOp(move_back, l); - PREG = (yamop *)(((char *)PREG)-(Int)(NEXTOP((yamop *)NULL,Osbpp))); - JMPNext(); - ENDBOp(); - - /* This instruction is called when the previous goal - was interrupted when waking up goals - */ - BOp(skip, l); - PREG = NEXTOP(PREG,l); - JMPNext(); - ENDBOp(); - - Op(either, Osblp); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - low_level_trace(try_or, (PredEntry *)PREG, NULL); - } -#endif -#ifdef COROUTINING - CACHE_Y_AS_ENV(YREG); - check_stack(NoStackEither, HR); - ENDCACHE_Y_AS_ENV(); - either_notest: -#endif - BEGD(d0); - /* Try to preserve the environment */ - d0 = PREG->y_u.Osblp.s; - BEGCHO(pt1); - pt1 = (choiceptr) ((char *) YREG + (yslot) d0); -#ifdef FROZEN_STACKS - { - choiceptr top_b = PROTECT_FROZEN_B(B); -#ifdef YAPOR_SBA - if (pt1 > top_b || pt1 < (choiceptr)HR) pt1 = top_b; -#else - if (pt1 > top_b) pt1 = top_b; -#endif /* YAPOR_SBA */ - } -#else - if (pt1 > B) { - pt1 = B; - } -#endif /* FROZEN_STACKS */ - pt1 = (choiceptr)(((CELL *) pt1)-1); - *(CELL **) pt1 = YREG; - store_yaam_regs_for_either(PREG->y_u.Osblp.l, PREG); - SREG = (CELL *) (B = pt1); -#ifdef YAPOR - SCH_set_load(pt1); -#endif /* YAPOR */ - SET_BB(pt1); - ENDCHO(pt1); - /* skip the current instruction plus the next one */ - PREG = NEXTOP(NEXTOP(PREG, Osblp),l); - GONext(); - ENDD(d0); - -#ifdef COROUTINING - NoStackEither: - PROCESS_INT(interrupt_either, either_notest); -#endif - - ENDOp(); - - Op(or_else, Osblp); - HR = HBREG = PROTECT_FROZEN_H(B); - ENV = B->cp_env; - B->cp_cp = PREG; -#ifdef DEPTH_LIMIT - DEPTH = B->cp_depth; -#endif /* DEPTH_LIMIT */ - SET_BB(PROTECT_FROZEN_B(B)); -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - SCH_new_alternative(PREG, PREG->y_u.Osblp.l); - } else -#endif /* YAPOR */ - B->cp_ap = PREG->y_u.Osblp.l; - PREG = NEXTOP(PREG, Osblp); - YREG = (CELL *) B->cp_a1; - GONext(); - ENDOp(); - -#ifdef YAPOR - Op(or_last, Osblp); -#else - Op(or_last, p); -#endif /* YAPOR */ - BEGCHO(pt0); - pt0 = B; -#ifdef YAPOR - if (SCH_top_shared_cp(B)) { - HR = HBREG = PROTECT_FROZEN_H(pt0); - YREG = (CELL *) pt0->cp_a1; - ENV = pt0->cp_env; -#ifdef DEPTH_LIMIT - DEPTH = pt0->cp_depth; -#endif /* DEPTH_LIMIT */ - SCH_new_alternative(PREG, NULL); - } - else -#endif /* YAPOR */ - { - B = pt0->cp_b; - HR = PROTECT_FROZEN_H(pt0); - YREG = (CELL *) pt0->cp_a1; - ENV = pt0->cp_env; -#ifdef DEPTH_LIMIT - DEPTH = pt0->cp_depth; -#endif /* DEPTH_LIMIT */ - HBREG = PROTECT_FROZEN_H(B); - } -#ifdef YAPOR - PREG = NEXTOP(PREG, Osblp); -#else - PREG = NEXTOP(PREG, p); -#endif /* YAPOR */ - SET_BB(PROTECT_FROZEN_B(B)); - GONext(); - ENDCHO(pt0); - ENDOp(); - - /************************************************************************\ - * Pop operations * -\************************************************************************/ - - OpRW(pop_n, s); - /* write mode might have been called from read mode */ - BEGD(d0); - d0 = PREG->y_u.os.s; - SP = (CELL *) (((char *) SP) + d0); - ENDD(d0); - BEGD(d0); - d0 = SP[0]; - if (d0) { - START_PREFETCH(s); - SREG = (CELL *) (SP[1]); - SP += 2; - PREG = NEXTOP(PREG, s); - GONext(); - END_PREFETCH(); - } - else { - START_PREFETCH_W(s); - SREG = (CELL *) (SP[1]); - SP += 2; - PREG = NEXTOP(PREG, s); - GONextW(); - END_PREFETCH_W(); - } - ENDD(d0); - ENDOpRW(); - - OpRW(pop, e); - BEGD(d0); - d0 = SP[0]; - SREG = (CELL *) (SP[1]); - SP += 2; - if (d0) { - START_PREFETCH(e); - PREG = NEXTOP(PREG, e); - GONext(); - END_PREFETCH(); - } - else { - START_PREFETCH_W(e); - PREG = NEXTOP(PREG, e); - GONextW(); - END_PREFETCH_W(); - } - ENDD(d0); - ENDOpRW(); - diff --git a/C/prim_absmi_insts.h b/C/prim_absmi_insts.h deleted file mode 100644 index bfa350f1f..000000000 --- a/C/prim_absmi_insts.h +++ /dev/null @@ -1,2185 +0,0 @@ -/************************************************************************ \ - * Basic Primitive Predicates * -\************************************************************************/ - -#ifdef INDENT_CODE -{ - { - { -#endif /* INDENT_CODE */ - - - Op(p_slr_y_vc, yxn); - BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); - /* first check pt1 */ - deref_head(d0, slr_y_vc_unk); - slr_y_vc_nvar: - { - Int d1 = PREG->y_u.yxn.c; - if (IsIntTerm(d0)) { - d0 = MkIntTerm(SLR(IntOfTerm(d0), d1)); - } - else { - saveregs(); - d0 = p_slr(Yap_Eval(d0), MkIntegerTerm(d1) PASS_REGS); - setregs(); - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - } - } - BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(PREG, yxn); - INITIALIZE_PERMVAR(pt0,d0); - ENDP(pt0); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, slr_y_vc_unk, slr_y_vc_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A>>B"); - setregs(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(p_slr_y_cv, yxn); - BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); - /* first check pt1 */ - deref_head(d0, slr_y_cv_unk); - slr_y_cv_nvar: - { - Int d1 = PREG->y_u.yxn.c; - if (IsIntTerm(d0)) { - Int i2 = IntOfTerm(d0); - if (i2 < 0) - d0 = do_sll(d1, -i2 PASS_REGS); - else - d0 = MkIntegerTerm(SLR(d1, i2)); - } - else { - saveregs(); - d0 = p_slr(MkIntegerTerm(d1), Yap_Eval(d0) PASS_REGS); - setregs(); - } - } - if (d0 == 0L) { - saveregs(); - Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage); - setregs(); - FAIL(); - } - BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(PREG, yxn); - INITIALIZE_PERMVAR(pt0,d0); - ENDP(pt0); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, slr_y_cv_unk, slr_y_cv_nvar); - saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A>>B"); - setregs(); - FAIL(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - BOp(call_bfunc_xx, plxxs); - BEGD(d0); - BEGD(d1); - d0 = XREG(PREG->y_u.plxxs.x1); - call_bfunc_xx_nvar: - d1 = XREG(PREG->y_u.plxxs.x2); - call_bfunc_xx2_nvar: - deref_head(d0, call_bfunc_xx_unk); - deref_head(d1, call_bfunc_xx2_unk); - if (IsIntTerm(d0) && IsIntTerm(d1)) { - COUNT flags; - - Int v = IntOfTerm(d0) - IntOfTerm(d1); - flags = PREG->y_u.plxxs.flags; - if (v > 0) { - if (flags & GT_OK_IN_CMP) { - yamop *nextp = NEXTOP(PREG, plxxs); - ALWAYS_LOOKAHEAD(nextp->opc); - PREG = nextp; - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - } else { - yamop *nextp = PREG->y_u.plxxs.f; - ALWAYS_LOOKAHEAD(nextp->opc); - PREG = nextp; - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - } - } else if (v < 0) { - if (flags & LT_OK_IN_CMP) { - yamop *nextp = NEXTOP(PREG, plxxs); - ALWAYS_LOOKAHEAD(nextp->opc); - PREG = nextp; - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - } else { - yamop *nextp = PREG->y_u.plxxs.f; - ALWAYS_LOOKAHEAD(nextp->opc); - PREG = nextp; - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - } - } else /* if (v == 0) */ { - if (flags & EQ_OK_IN_CMP) { - yamop *nextp = NEXTOP(PREG, plxxs); - ALWAYS_LOOKAHEAD(nextp->opc); - PREG = nextp; - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - } else { - yamop *nextp = PREG->y_u.plxxs.f; - ALWAYS_LOOKAHEAD(nextp->opc); - PREG = nextp; - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - } - } - } - exec_bin_cmp_xx: - { - CmpPredicate f = PREG->y_u.plxxs.p->cs.d_code; - saveregs(); - d0 = (CELL) (f) (d0,d1); - setregs(); - } - if (PREG == FAILCODE) { - JMPNext(); - } - if (!d0) { - PREG = PREG->y_u.plxxs.f; - JMPNext(); - } - PREG = NEXTOP(PREG, plxxs); - JMPNext(); - - BEGP(pt0); - deref_body(d0, pt0, call_bfunc_xx_unk, call_bfunc_xx_nvar); - d1 = Deref(d1); - goto exec_bin_cmp_xx; - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, call_bfunc_xx2_unk, call_bfunc_xx2_nvar); - goto exec_bin_cmp_xx; - ENDP(pt0); - - ENDD(d1); - ENDD(d0); - ENDBOp(); - - BOp(call_bfunc_yx, plxys); - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = YREG + PREG->y_u.plxys.y; - d1 = XREG(PREG->y_u.plxys.x); - d0 = *pt0; - ENDP(pt0); - deref_head(d0, call_bfunc_yx_unk); - call_bfunc_yx_nvar: - deref_head(d1, call_bfunc_yx2_unk); - call_bfunc_yx2_nvar: - if (IsIntTerm(d0) && IsIntTerm(d1)) { - int flags; - - Int v = IntOfTerm(d0) - IntOfTerm(d1); - flags = PREG->y_u.plxys.flags; - if (v > 0) { - if (flags & GT_OK_IN_CMP) { - PREG = NEXTOP(PREG, plxys); - JMPNext(); - } else { - PREG = PREG->y_u.plxys.f; - JMPNext(); - } - } else if (v < 0) { - if (flags & LT_OK_IN_CMP) { - PREG = NEXTOP(PREG, plxys); - JMPNext(); - } else { - PREG = PREG->y_u.plxys.f; - JMPNext(); - } - } else /* if (v == 0) */ { - if (flags & EQ_OK_IN_CMP) { - PREG = NEXTOP(PREG, plxys); - JMPNext(); - } else { - PREG = PREG->y_u.plxys.f; - JMPNext(); - } - } - } - exec_bin_cmp_yx: - { - CmpPredicate f = PREG->y_u.plxys.p->cs.d_code; - saveregs(); - d0 = (CELL) (f) (d0,d1); - setregs(); - } - if (!d0 || PREG == FAILCODE) { - if (PREG != FAILCODE) - PREG = PREG->y_u.plxys.f; - JMPNext(); - } - PREG = NEXTOP(PREG, plxys); - JMPNext(); - - BEGP(pt0); - deref_body(d0, pt0, call_bfunc_yx_unk, call_bfunc_yx_nvar); - d1 = Deref(d1); - goto exec_bin_cmp_yx; - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, call_bfunc_yx2_unk, call_bfunc_yx2_nvar); - goto exec_bin_cmp_yx; - ENDP(pt0); - - ENDD(d1); - ENDD(d0); - ENDBOp(); - - BOp(call_bfunc_xy, plxys); - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = YREG + PREG->y_u.plxys.y; - d0 = XREG(PREG->y_u.plxys.x); - d1 = *pt0; - ENDP(pt0); - deref_head(d0, call_bfunc_xy_unk); - call_bfunc_xy_nvar: - deref_head(d1, call_bfunc_xy2_unk); - call_bfunc_xy2_nvar: - if (IsIntTerm(d0) && IsIntTerm(d1)) { - int flags; - - Int v = IntOfTerm(d0) - IntOfTerm(d1); - flags = PREG->y_u.plxys.flags; - if (v > 0) { - if (flags & GT_OK_IN_CMP) { - PREG = NEXTOP(PREG, plxys); - JMPNext(); - } else { - PREG = PREG->y_u.plxys.f; - JMPNext(); - } - } else if (v < 0) { - if (flags & LT_OK_IN_CMP) { - PREG = NEXTOP(PREG, plxys); - JMPNext(); - } else { - PREG = PREG->y_u.plxys.f; - JMPNext(); - } - } else /* if (v == 0) */ { - if (flags & EQ_OK_IN_CMP) { - PREG = NEXTOP(PREG, plxys); - JMPNext(); - } else { - PREG = PREG->y_u.plxys.f; - JMPNext(); - } - } - } - exec_bin_cmp_xy: - { - CmpPredicate f = PREG->y_u.plxys.p->cs.d_code; - saveregs(); - d0 = (CELL) (f) (d0,d1); - setregs(); - } - if (!d0 || PREG == FAILCODE) { - if (PREG != FAILCODE) - PREG = PREG->y_u.plxys.f; - JMPNext(); - } - PREG = NEXTOP(PREG, plxys); - JMPNext(); - - BEGP(pt0); - deref_body(d0, pt0, call_bfunc_xy_unk, call_bfunc_xy_nvar); - d1 = Deref(d1); - goto exec_bin_cmp_xy; - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, call_bfunc_xy2_unk, call_bfunc_xy2_nvar); - goto exec_bin_cmp_xy; - ENDP(pt0); - - ENDD(d1); - ENDD(d0); - ENDBOp(); - - BOp(call_bfunc_yy, plyys); - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = YREG + PREG->y_u.plyys.y1; - BEGP(pt1); - pt1 = YREG + PREG->y_u.plyys.y2; - d0 = *pt0; - d1 = *pt1; - ENDP(pt1); - ENDP(pt0); - deref_head(d0, call_bfunc_yy_unk); - call_bfunc_yy_nvar: - deref_head(d1, call_bfunc_yy2_unk); - call_bfunc_yy2_nvar: - if (IsIntTerm(d0) && IsIntTerm(d1)) { - int flags; - - Int v = IntOfTerm(d0) - IntOfTerm(d1); - flags = PREG->y_u.plyys.flags; - if (v > 0) { - if (flags & GT_OK_IN_CMP) { - PREG = NEXTOP(PREG, plyys); - JMPNext(); - } else { - PREG = PREG->y_u.plyys.f; - JMPNext(); - } - } else if (v < 0) { - if (flags & LT_OK_IN_CMP) { - PREG = NEXTOP(PREG, plyys); - JMPNext(); - } else { - PREG = PREG->y_u.plyys.f; - JMPNext(); - } - } else /* if (v == 0) */ { - if (flags & EQ_OK_IN_CMP) { - PREG = NEXTOP(PREG, plyys); - JMPNext(); - } else { - PREG = PREG->y_u.plyys.f; - JMPNext(); - } - } - } - exec_bin_cmp_yy: - { - CmpPredicate f = PREG->y_u.plyys.p->cs.d_code; - saveregs(); - d0 = (CELL) (f) (d0,d1); - setregs(); - } - if (!d0 || PREG == FAILCODE) { - if (PREG != FAILCODE) - PREG = PREG->y_u.plyys.f; - JMPNext(); - } - PREG = NEXTOP(PREG, plyys); - JMPNext(); - - BEGP(pt0); - deref_body(d0, pt0, call_bfunc_yy_unk, call_bfunc_yy_nvar); - d1 = Deref(d1); - goto exec_bin_cmp_yy; - ENDP(pt0); - - BEGP(pt0); - deref_body(d1, pt0, call_bfunc_yy2_unk, call_bfunc_yy2_nvar); - goto exec_bin_cmp_yy; - ENDP(pt0); - - ENDD(d1); - ENDD(d0); - ENDBOp(); - - Op(p_equal, e); - save_hb(); - if (Yap_IUnify(ARG1, ARG2) == false) { - FAIL(); - } - PREG = NEXTOP(PREG, e); - GONext(); - ENDOp(); - - Op(p_dif, l); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorDiff,0)),XREGS+1); -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - BEGD(d1); - d0 = ARG1; - deref_head(d0, dif_unk1); - dif_nvar1: - /* first argument is bound */ - d1 = ARG2; - deref_head(d1, dif_nvar1_unk2); - dif_nvar1_nvar2: - /* both arguments are bound */ - if (d0 == d1) { - PREG = PREG->y_u.l.l; - GONext(); - } - if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { - PREG = NEXTOP(PREG, l); - GONext(); - } - { - Int opresult; -#ifdef COROUTINING - /* - * We may wake up goals during our attempt to unify the - * two terms. If we are adding to the tail of a list of - * woken goals that should be ok, but otherwise we need - * to restore LOCAL_WokenGoals to its previous value. - */ - CELL OldWokenGoals = Yap_ReadTimedVar(LOCAL_WokenGoals); - -#endif - /* We will have to look inside compound terms */ - register tr_fr_ptr pt0; - /* store the old value of TR for clearing bindings */ - pt0 = TR; - BEGCHO(pt1); - pt1 = B; - /* make B and HB point to H to guarantee all bindings will - * be trailed - */ - HBREG = HR; - B = (choiceptr) HR; - B->cp_h = HR; - SET_BB(B); - save_hb(); - opresult = Yap_IUnify(d0, d1); -#ifdef COROUTINING - /* now restore Woken Goals to its old value */ - Yap_UpdateTimedVar(LOCAL_WokenGoals, OldWokenGoals); - if (OldWokenGoals == TermNil) { - Yap_get_signal(YAP_WAKEUP_SIGNAL); - } -#endif - /* restore B */ - B = pt1; - SET_BB(PROTECT_FROZEN_B(pt1)); -#ifdef COROUTINING - HR = HBREG; -#endif - HBREG = B->cp_h; - /* untrail all bindings made by Yap_IUnify */ - while (TR != pt0) { - BEGD(d1); - d1 = TrailTerm(--TR); - if (IsVarTerm(d1)) { -#if defined(YAPOR_SBA) && defined(YAPOR) - /* clean up the trail when we backtrack */ - if (Unsigned((Int)(d1)-(Int)(H_FZ)) > - Unsigned((Int)(B_FZ)-(Int)(H_FZ))) { - RESET_VARIABLE(STACK_TO_SBA(d1)); - } else -#endif - /* normal variable */ - RESET_VARIABLE(d1); -#ifdef MULTI_ASSIGNMENT_VARIABLES - } else /* if (IsApplTerm(d1)) */ { - CELL *pt = RepAppl(d1); - /* AbsAppl means */ - /* multi-assignment variable */ - /* so the next cell is the old value */ -#ifdef FROZEN_STACKS - pt[0] = TrailVal(--TR); -#else - pt[0] = TrailTerm(--TR); - TR--; -#endif /* FROZEN_STACKS */ -#endif /* MULTI_ASSIGNMENT_VARIABLES */ - } - ENDD(d1); - } - if (opresult) { - /* restore B, no need to restore HB */ - PREG = PREG->y_u.l.l; - GONext(); - } - /* restore B, and later HB */ - PREG = NEXTOP(PREG, l); - ENDCHO(pt1); - } - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, dif_unk1, dif_nvar1); - ENDP(pt0); - /* first argument is unbound */ - PREG = PREG->y_u.l.l; - GONext(); - - BEGP(pt0); - deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); - ENDP(pt0); - /* second argument is unbound */ - PREG = PREG->y_u.l.l; - GONext(); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(p_eq, l); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorSame,0)),XREGS+1); -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - BEGD(d1); - d0 = ARG1; - deref_head(d0, p_eq_unk1); - p_eq_nvar1: - /* first argument is bound */ - d1 = ARG2; - deref_head(d1, p_eq_nvar1_unk2); - p_eq_nvar1_nvar2: - /* both arguments are bound */ - if (d0 == d1) { - PREG = NEXTOP(PREG, l); - GONext(); - } - if (IsPairTerm(d0)) { - if (!IsPairTerm(d1)) { - PREG = PREG->y_u.l.l; - GONext(); - } - BEGD(d2); - always_save_pc(); - d2 = iequ_complex(RepPair(d0)-1, RepPair(d0)+1,RepPair(d1)-1); - if (d2 == false) { - PREG = PREG->y_u.l.l; - GONext(); - } - ENDD(d2); - always_set_pc(); - PREG = NEXTOP(PREG, l); - GONext(); - } - if (IsApplTerm(d0)) { - Functor f0 = FunctorOfTerm(d0); - Functor f1; - - /* f1 must be a compound term, even if it is a suspension */ - if (!IsApplTerm(d1)) { - PREG = PREG->y_u.l.l; - GONext(); - } - f1 = FunctorOfTerm(d1); - - /* we now know f1 is true */ - /* deref if a compound term */ - if (IsExtensionFunctor(f0)) { - switch ((CELL)f0) { - case (CELL)FunctorDBRef: - if (d0 == d1) { - PREG = NEXTOP(PREG, l); - GONext(); - } - PREG = PREG->y_u.l.l; - GONext(); - case (CELL)FunctorLongInt: - if (f1 != FunctorLongInt) { - PREG = PREG->y_u.l.l; - GONext(); - } - if (LongIntOfTerm(d0) == LongIntOfTerm(d1)) { - PREG = NEXTOP(PREG, l); - GONext(); - } - PREG = PREG->y_u.l.l; - GONext(); - case (CELL)FunctorString: - if (f1 != FunctorString) { - PREG = PREG->y_u.l.l; - GONext(); - } - if (strcmp((char *)(RepAppl(d0)+2),(char *)(RepAppl(d1)+2)) == 0) { - PREG = NEXTOP(PREG, l); - GONext(); - } - PREG = PREG->y_u.l.l; - GONext(); - break; -#ifdef USE_GMP - case (CELL)FunctorBigInt: - if (f1 != FunctorBigInt) { - PREG = PREG->y_u.l.l; - GONext(); - } - if (Yap_gmp_tcmp_big_big(d0,d1) == 0) { - PREG = NEXTOP(PREG, l); - GONext(); - } - PREG = PREG->y_u.l.l; - GONext(); -#endif - case (CELL)FunctorDouble: - if (f1 != FunctorDouble) { - PREG = PREG->y_u.l.l; - GONext(); - } - if (FloatOfTerm(d0) == FloatOfTerm(d1)) { - PREG = NEXTOP(PREG, l); - GONext(); - } - PREG = PREG->y_u.l.l; - GONext(); - break; - default: - PREG = PREG->y_u.l.l; - GONext(); - } - } - if (f0 != f1) { - PREG = PREG->y_u.l.l; - GONext(); - } - always_save_pc(); - BEGD(d2); - d2 = iequ_complex(RepAppl(d0), RepAppl(d0)+ArityOfFunctor(f0), RepAppl(d1)); - if (d2 == false) { - PREG = PREG->y_u.l.l; - GONext(); - } - ENDD(d2); - always_set_pc(); - PREG = NEXTOP(PREG, l); - GONext(); - } - PREG = PREG->y_u.l.l; - GONext(); - - BEGP(pt0); - deref_body(d1, pt0, p_eq_nvar1_unk2, p_eq_nvar1_nvar2); - ENDP(pt0); - /* first argument is bound */ - /* second argument is unbound */ - /* I don't need to worry about co-routining because an - unbound variable may never be == to a constrained variable!! */ - PREG = PREG->y_u.l.l; - GONext(); - ENDD(d1); - - BEGP(pt0); - deref_body(d0, pt0, p_eq_unk1, p_eq_nvar1); - BEGD(d1); - d1 = ARG2; - deref_head(d1, p_eq_var1_unk2); - p_eq_var1_nvar2: - /* I don't need to worry about co-routining because an - unbound variable may never be == to a constrained variable!! */ - PREG = PREG->y_u.l.l; - GONext(); - - BEGP(pt1); - deref_body(d1, pt1, p_eq_var1_unk2, p_eq_var1_nvar2); - /* first argument is unbound */ - /* second argument is unbound */ - if (pt1 != pt0) { - PREG = PREG->y_u.l.l; - GONext(); - } - PREG = NEXTOP(PREG, l); - GONext(); - ENDP(pt1); - ENDD(d1); - ENDP(pt0); - - ENDD(d0); - ENDOp(); - - Op(p_arg_vv, xxx); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - HR[0] = XREG(PREG->y_u.xxx.x1); - HR[1] = XREG(PREG->y_u.xxx.x2); - RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); - } -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - d0 = XREG(PREG->y_u.xxx.x1); - deref_head(d0, arg_arg1_unk); - arg_arg1_nvar: - /* ARG1 is ok! */ - if (IsIntTerm(d0)) - d0 = IntOfTerm(d0); - else if (IsLongIntTerm(d0)) { - d0 = LongIntOfTerm(d0); - } else { - if (IsBigIntTerm( d0 )) - FAIL(); - saveregs(); - Yap_Error(TYPE_ERROR_INTEGER,d0,"arg 1 of arg/3"); - setregs(); - FAIL(); - } - - /* d0 now got the argument we want */ - BEGD(d1); - d1 = XREG(PREG->y_u.xxx.x2); - deref_head(d1, arg_arg2_unk); - arg_arg2_nvar: - /* d1 now got the structure we want to fetch the argument - * from */ - if (IsApplTerm(d1)) { - BEGP(pt0); - pt0 = RepAppl(d1); - d1 = *pt0; - if (IsExtensionFunctor((Functor) d1)) { - FAIL(); - } - if ((Int)d0 <= 0 || - (Int)d0 > ArityOfFunctor((Functor) d1)) { - /* don't complain here for Prolog compatibility - if ((Int)d0 <= 0) { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, - MkIntegerTerm(d0),"arg 1 of arg/3"); - setregs(); - } - */ - FAIL(); - } - XREG(PREG->y_u.xxx.x) = pt0[d0]; - PREG = NEXTOP(PREG, xxx); - GONext(); - ENDP(pt0); - } - else if (IsPairTerm(d1)) { - BEGP(pt0); - pt0 = RepPair(d1); - if (d0 != 1 && d0 != 2) { - if ((Int)d0 < 0) { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, - MkIntegerTerm(d0),"arg 1 of arg/3"); - setregs(); - } - FAIL(); - } - XREG(PREG->y_u.xxx.x) = pt0[d0-1]; - PREG = NEXTOP(PREG, xxx); - GONext(); - ENDP(pt0); - } - else { - /* - don't complain here for SWI Prolog compatibility - saveregs(); - Yap_Error(TYPE_ERROR_COMPOUND, d1, "arg 2 of arg/3"); - setregs(); - */ - FAIL(); - } - - BEGP(pt0); - deref_body(d1, pt0, arg_arg2_unk, arg_arg2_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d1,"arg 2 of arg/3");; - setregs(); - ENDP(pt0); - FAIL(); - ENDD(d1); - - BEGP(pt0); - deref_body(d0, pt0, arg_arg1_unk, arg_arg1_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "arg 1 of arg/3");; - setregs(); - ENDP(pt0); - FAIL(); - ENDD(d0); - ENDOp(); - - Op(p_arg_cv, xxn); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - CELL *Ho = HR; - Term t = MkIntegerTerm(PREG->y_u.xxn.c); - HR[0] = t; - HR[1] = XREG(PREG->y_u.xxn.xi); - RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); - HR = Ho; - } -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - d0 = PREG->y_u.xxn.c; - /* d0 now got the argument we want */ - BEGD(d1); - d1 = XREG(PREG->y_u.xxn.xi); - deref_head(d1, arg_arg2_vc_unk); - arg_arg2_vc_nvar: - /* d1 now got the structure we want to fetch the argument - * from */ - if (IsApplTerm(d1)) { - BEGP(pt0); - pt0 = RepAppl(d1); - d1 = *pt0; - if (IsExtensionFunctor((Functor) d1)) { - FAIL(); - } - if ((Int)d0 <= 0 || - (Int)d0 > ArityOfFunctor((Functor) d1)) { - /* don't complain here for Prolog compatibility - if ((Int)d0 <= 0) { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, - MkIntegerTerm(d0),"arg 1 of arg/3"); - setregs(); - } - */ - FAIL(); - } - XREG(PREG->y_u.xxn.x) = pt0[d0]; - PREG = NEXTOP(PREG, xxn); - GONext(); - ENDP(pt0); - } - else if (IsPairTerm(d1)) { - BEGP(pt0); - pt0 = RepPair(d1); - if (d0 != 1 && d0 != 2) { - if ((Int)d0 < 0) { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, - MkIntegerTerm(d0),"arg 1 of arg/3"); - setregs(); - } - FAIL(); - } - XREG(PREG->y_u.xxn.x) = pt0[d0-1]; - PREG = NEXTOP(PREG, xxn); - GONext(); - ENDP(pt0); - } - else { - /* - keep SWI Prolog compatibility, just fail on trying to obtain an argument of a compound term. - saveregs(); - Yap_Error(TYPE_ERROR_COMPOUND, d1, "arg 2 of arg/3"); - setregs(); - */ - FAIL(); - } - - BEGP(pt0); - deref_body(d1, pt0, arg_arg2_vc_unk, arg_arg2_vc_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d1,"arg 2 of arg/3");; - setregs(); - ENDP(pt0); - FAIL(); - ENDD(d1); - - ENDD(d0); - ENDOp(); - - Op(p_arg_y_vv, yxx); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - HR[0] = XREG(PREG->y_u.yxx.x1); - HR[1] = XREG(PREG->y_u.yxx.x2); - HR[2] = YREG[PREG->y_u.yxx.y]; - RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); - } -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - d0 = XREG(PREG->y_u.yxx.x1); - deref_head(d0, arg_y_arg1_unk); - arg_y_arg1_nvar: - /* ARG1 is ok! */ - if (IsIntTerm(d0)) - d0 = IntOfTerm(d0); - else if (IsLongIntTerm(d0)) { - d0 = LongIntOfTerm(d0); - } else { - if (IsBigIntTerm( d0 )) - FAIL(); - saveregs(); - Yap_Error(TYPE_ERROR_INTEGER,d0,"arg 1 of arg/3"); - setregs(); - FAIL(); - } - - /* d0 now got the argument we want */ - BEGD(d1); - d1 = XREG(PREG->y_u.yxx.x2); - deref_head(d1, arg_y_arg2_unk); - arg_y_arg2_nvar: - /* d1 now got the structure we want to fetch the argument - * from */ - if (IsApplTerm(d1)) { - BEGP(pt0); - pt0 = RepAppl(d1); - d1 = *pt0; - if (IsExtensionFunctor((Functor) d1)) { - FAIL(); - } - if ((Int)d0 <= 0 || - (Int)d0 > ArityOfFunctor((Functor) d1)) { - /* don't complain here for Prolog compatibility - if ((Int)d0 <= 0) { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, - MkIntegerTerm(d0),"arg 1 of arg/3"); - saveregs(); - } - */ - FAIL(); - } - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxx.y; - PREG = NEXTOP(PREG, yxx); - INITIALIZE_PERMVAR(pt1,pt0[d0]); - ENDP(pt1); - GONext(); - ENDP(pt0); - } - else if (IsPairTerm(d1)) { - BEGP(pt0); - pt0 = RepPair(d1); - if (d0 != 1 && d0 != 2) { - if ((Int)d0 < 0) { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, - MkIntegerTerm(d0),"arg 1 of arg/3"); - setregs(); - } - FAIL(); - } - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxx.y; - PREG = NEXTOP(PREG, yxx); - INITIALIZE_PERMVAR(pt1,pt0[d0-1]); - GONext(); - ENDP(pt1); - ENDP(pt0); - } - else { - /* - don't complain here for SWI Prolog compatibility - saveregs(); - Yap_Error(TYPE_ERROR_COMPOUND, d1, "arg 2 of arg/3"); - setregs(); - */ - FAIL(); - } - - BEGP(pt0); - deref_body(d1, pt0, arg_y_arg2_unk, arg_y_arg2_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d1,"arg 2 of arg/3");; - setregs(); - ENDP(pt0); - FAIL(); - ENDD(d1); - - BEGP(pt0); - deref_body(d0, pt0, arg_y_arg1_unk, arg_y_arg1_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "arg 1 of arg/3");; - setregs(); - ENDP(pt0); - FAIL(); - ENDD(d0); - ENDOp(); - - Op(p_arg_y_cv, yxn); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - CELL *Ho = HR; - Term t = MkIntegerTerm(PREG->y_u.yxn.c); - HR[0] = t; - HR[1] = XREG(PREG->y_u.yxn.xi); - HR[2] = YREG[PREG->y_u.yxn.y]; - RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); - HR = Ho; - } -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - d0 = PREG->y_u.yxn.c; - /* d0 now got the argument we want */ - BEGD(d1); - d1 = XREG(PREG->y_u.yxn.xi); - deref_head(d1, arg_y_arg2_vc_unk); - arg_y_arg2_vc_nvar: - /* d1 now got the structure we want to fetch the argument - * from */ - if (IsApplTerm(d1)) { - BEGP(pt0); - pt0 = RepAppl(d1); - d1 = *pt0; - if (IsExtensionFunctor((Functor) d1)) { - FAIL(); - } - if ((Int)d0 <= 0 || - (Int)d0 > ArityOfFunctor((Functor) d1)) { - /* don't complain here for Prolog compatibility - if ((Int)d0 <= 0) { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, - MkIntegerTerm(d0),"arg 1 of arg/3"); - setregs(); - } - */ - FAIL(); - } - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(PREG, yxn); - INITIALIZE_PERMVAR(pt1,pt0[d0]); - ENDP(pt1); - GONext(); - ENDP(pt0); - } - else if (IsPairTerm(d1)) { - BEGP(pt0); - pt0 = RepPair(d1); - if (d0 != 1 && d0 != 2) { - if ((Int)d0 < 0) { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, - MkIntegerTerm(d0),"arg 1 of arg/3"); - setregs(); - } - FAIL(); - } - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(PREG, yxn); - INITIALIZE_PERMVAR(pt1,pt0[d0-1]); - ENDP(pt1); - GONext(); - ENDP(pt0); - } - else { - /* - don't complain here for SWI Prolog compatibility - saveregs(); - Yap_Error(TYPE_ERROR_COMPOUND, d1, "arg 2 of arg/3"); - setregs(); - */ - FAIL(); - } - - BEGP(pt0); - deref_body(d1, pt0, arg_y_arg2_vc_unk, arg_y_arg2_vc_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d1,"arg 2 of arg/3");; - setregs(); - ENDP(pt0); - FAIL(); - ENDD(d1); - - ENDD(d0); - ENDOp(); - - Op(p_func2s_vv, xxx); - /* A1 is a variable */ - restart_func2s: -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - RESET_VARIABLE(HR); - HR[1] = XREG(PREG->y_u.xxx.x1); - HR[2] = XREG(PREG->y_u.xxx.x2); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - } -#endif /* LOW_LEVEL_TRACE */ - /* We have to build the structure */ - BEGD(d0); - d0 = XREG(PREG->y_u.xxx.x1); - deref_head(d0, func2s_unk); - func2s_nvar: - /* we do, let's get the third argument */ - BEGD(d1); - d1 = XREG(PREG->y_u.xxx.x2); - deref_head(d1, func2s_unk2); - func2s_nvar2: - /* Uuuff, the second and third argument are bound */ - if (IsIntegerTerm(d1)) - d1 = IntegerOfTerm(d1); - else { - saveregs(); - if (IsBigIntTerm(d1)) { - Yap_Error(RESOURCE_ERROR_STACK, d1, "functor/3"); - } else { - Yap_Error(TYPE_ERROR_INTEGER, d1, "functor/3"); - } - setregs(); - FAIL(); - } - if (!IsAtomicTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - /* We made it!!!!! we got in d0 the name, in d1 the arity and - * in pt0 the variable to bind it to. */ - if (d0 == TermDot && d1 == 2) { - RESET_VARIABLE(HR); - RESET_VARIABLE(HR+1); - d0 = AbsPair(HR); - HR += 2; - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - XREG(PREG->y_u.xxx.x) = d0; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxx),Osbpp),l); - GONext(); - } - else if ((Int)d1 > 0) { - /* now let's build a compound term */ - if (!IsAtomTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - BEGP(pt1); - if (!IsAtomTerm(d0)) { - FAIL(); - } - else - d0 = (CELL) Yap_MkFunctor(AtomOfTerm(d0), (Int) d1); - pt1 = HR; - *pt1++ = d0; - d0 = AbsAppl(HR); - if (pt1+d1 > ENV || pt1+d1 > (CELL *)B) { - /* make sure we have something to show for our trouble */ - saveregs(); - if (!Yap_gcl((1+d1)*sizeof(CELL), 0, YREG, NEXTOP(NEXTOP(PREG,xxx),Osbpp))) { - Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); - setregs(); - JMPNext(); - } else { - setregs(); - } - goto restart_func2s; - } - while ((Int)d1--) { - RESET_VARIABLE(pt1); - pt1++; - } - HR = pt1; - /* done building the term */ - ENDP(pt1); - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - XREG(PREG->y_u.xxx.x) = d0; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxx),Osbpp),l); - GONext(); - } else if ((Int)d1 == 0) { - XREG(PREG->y_u.xxx.x) = d0; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxx),Osbpp),l); - GONext(); - } else { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO,MkIntegerTerm(d1),"functor/3"); - setregs(); - FAIL(); - } - - BEGP(pt1); - deref_body(d1, pt1, func2s_unk2, func2s_nvar2); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d1, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, third argument was unbound */ - FAIL(); - ENDD(d1); - - BEGP(pt1); - deref_body(d0, pt1, func2s_unk, func2s_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, second argument was unbound too */ - FAIL(); - ENDD(d0); - ENDOp(); - - Op(p_func2s_cv, xxc); - /* A1 is a variable */ - restart_func2s_cv: -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - RESET_VARIABLE(HR); - HR[1] = PREG->y_u.xxc.c; - HR[2] = XREG(PREG->y_u.xxc.xi); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - } -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - /* We have to build the structure */ - d0 = PREG->y_u.xxc.c; - /* we do, let's get the third argument */ - BEGD(d1); - d1 = XREG(PREG->y_u.xxc.xi); - deref_head(d1, func2s_unk2_cv); - func2s_nvar2_cv: - /* Uuuff, the second and third argument are bound */ - if (IsIntegerTerm(d1)) - d1 = IntegerOfTerm(d1); - else { - saveregs(); - if (IsBigIntTerm(d1)) { - Yap_Error(RESOURCE_ERROR_STACK, d1, "functor/3"); - } else { - Yap_Error(TYPE_ERROR_INTEGER,d1,"functor/3"); - } - setregs(); - FAIL(); - } - /* We made it!!!!! we got in d0 the name, in d1 the arity and - * in pt0 the variable to bind it to. */ - if (d0 == TermDot && d1 == 2) { - RESET_VARIABLE(HR); - RESET_VARIABLE(HR+1); - d0 = AbsPair(HR); - HR += 2; - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - XREG(PREG->y_u.xxc.x) = d0; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxc),Osbpp),l); - GONext(); - } else if ((Int)d1 > 0) { - /* now let's build a compound term */ - if (!IsAtomTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - BEGP(pt1); - if (!IsAtomTerm(d0)) { - FAIL(); - } - else - d0 = (CELL) Yap_MkFunctor(AtomOfTerm(d0), (Int) d1); - pt1 = HR; - *pt1++ = d0; - d0 = AbsAppl(HR); - if (pt1+d1 > ENV || pt1+d1 > (CELL *)B) { - /* make sure we have something to show for our trouble */ - saveregs(); - if (!Yap_gcl((1+d1)*sizeof(CELL), 0, YREG, NEXTOP(NEXTOP(PREG,xxc),Osbpp))) { - Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); - setregs(); - JMPNext(); - } else { - setregs(); - } - goto restart_func2s_cv; - } - while ((Int)d1--) { - RESET_VARIABLE(pt1); - pt1++; - } - /* done building the term */ - HR = pt1; - ENDP(pt1); - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - XREG(PREG->y_u.xxc.x) = d0; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxc),Osbpp),l); - GONext(); - } else if (d1 == 0) { - XREG(PREG->y_u.xxc.x) = d0; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxc),Osbpp),l); - GONext(); - } else { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO,MkIntegerTerm(d1),"functor/3"); - setregs(); - FAIL(); - } - - BEGP(pt1); - deref_body(d1, pt1, func2s_unk2_cv, func2s_nvar2_cv); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d1, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, third argument was unbound */ - FAIL(); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(p_func2s_vc, xxn); - /* A1 is a variable */ - restart_func2s_vc: -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - Term ti; - CELL *hi = HR; - - ti = MkIntegerTerm(PREG->y_u.xxn.c); - RESET_VARIABLE(HR); - HR[1] = XREG(PREG->y_u.xxn.xi); - HR[2] = ti; - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - HR = hi; - } -#endif /* LOW_LEVEL_TRACE */ - /* We have to build the structure */ - BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); - deref_head(d0, func2s_unk_vc); - func2s_nvar_vc: - BEGD(d1); - d1 = PREG->y_u.xxn.c; - if (!IsAtomicTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - /* We made it!!!!! we got in d0 the name, in d1 the arity and - * in pt0 the variable to bind it to. */ - if (d0 == TermDot && d1 == 2) { - RESET_VARIABLE(HR); - RESET_VARIABLE(HR+1); - d0 = AbsPair(HR); - HR += 2; - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - XREG(PREG->y_u.xxn.x) = d0; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxn),Osbpp),l); - GONext(); - } - /* now let's build a compound term */ - if (d1 == 0) { - XREG(PREG->y_u.xxn.x) = d0; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxn),Osbpp),l); - GONext(); - } - if (!IsAtomTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - BEGP(pt1); - if (!IsAtomTerm(d0)) { - FAIL(); - } - else - d0 = (CELL) Yap_MkFunctor(AtomOfTerm(d0), (Int) d1); - pt1 = HR; - *pt1++ = d0; - d0 = AbsAppl(HR); - if (pt1+d1 > ENV || pt1+d1 > (CELL *)B) { - /* make sure we have something to show for our trouble */ - saveregs(); - if (!Yap_gc(0, YREG, NEXTOP(NEXTOP(PREG,xxn),Osbpp))) { - Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); - setregs(); - JMPNext(); - } else { - setregs(); - } - goto restart_func2s_vc; - } - while ((Int)d1--) { - RESET_VARIABLE(pt1); - pt1++; - } - /* done building the term */ - HR = pt1; - ENDP(pt1); - ENDD(d1); - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - XREG(PREG->y_u.xxn.x) = d0; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxn),Osbpp),l); - GONext(); - - BEGP(pt1); - deref_body(d0, pt1, func2s_unk_vc, func2s_nvar_vc); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, second argument was unbound too */ - FAIL(); - ENDD(d0); - ENDOp(); - - Op(p_func2s_y_vv, yxx); - /* A1 is a variable */ - restart_func2s_y: -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - RESET_VARIABLE(HR); - HR[1] = XREG(PREG->y_u.yxx.x1); - HR[2] = XREG(PREG->y_u.yxx.x2); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - } -#endif /* LOW_LEVEL_TRACE */ - /* We have to build the structure */ - BEGD(d0); - d0 = XREG(PREG->y_u.yxx.x1); - deref_head(d0, func2s_y_unk); - func2s_y_nvar: - /* we do, let's get the third argument */ - BEGD(d1); - d1 = XREG(PREG->y_u.yxx.x2); - deref_head(d1, func2s_y_unk2); - func2s_y_nvar2: - /* Uuuff, the second and third argument are bound */ - if (IsIntegerTerm(d1)) - d1 = IntegerOfTerm(d1); - else { - saveregs(); - if (IsBigIntTerm(d1)) { - Yap_Error(RESOURCE_ERROR_STACK, d1, "functor/3"); - } else { - Yap_Error(TYPE_ERROR_INTEGER,d1,"functor/3"); - } - setregs(); - FAIL(); - } - if (!IsAtomicTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - /* We made it!!!!! we got in d0 the name, in d1 the arity and - * in pt0 the variable to bind it to. */ - if (d0 == TermDot && d1 == 2) { - RESET_VARIABLE(HR); - RESET_VARIABLE(HR+1); - d0 = AbsPair(HR); - HR += 2; - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxx.y; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxx),Osbpp),l); - INITIALIZE_PERMVAR(pt1,d0); - ENDP(pt1); - GONext(); - } else if ((Int)d1 > 0) { - /* now let's build a compound term */ - if (!IsAtomTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - BEGP(pt1); - if (!IsAtomTerm(d0)) { - FAIL(); - } - else - d0 = (CELL) Yap_MkFunctor(AtomOfTerm(d0), (Int) d1); - pt1 = HR; - *pt1++ = d0; - d0 = AbsAppl(HR); - if (pt1+d1 > ENV || pt1+d1 > (CELL *)B) { - /* make sure we have something to show for our trouble */ - saveregs(); - if (!Yap_gcl((1+d1)*sizeof(CELL), 0, YREG, NEXTOP(NEXTOP(PREG,yxx),Osbpp))) { - Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); - setregs(); - JMPNext(); - } else { - setregs(); - } - goto restart_func2s_y; - } - while ((Int)d1--) { - RESET_VARIABLE(pt1); - pt1++; - } - /* done building the term */ - HR = pt1; - ENDP(pt1); - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxx.y; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxx),Osbpp),l); - INITIALIZE_PERMVAR(pt1,d0); - ENDP(pt1); - GONext(); - } else if (d1 == 0) { - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxx.y; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxx),Osbpp),l); - INITIALIZE_PERMVAR(pt1,d0); - ENDP(pt1); - GONext(); - } else { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO,MkIntegerTerm(d1),"functor/3"); - setregs(); - FAIL(); - } - - BEGP(pt1); - deref_body(d1, pt1, func2s_y_unk2, func2s_y_nvar2); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d1, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, third argument was unbound */ - FAIL(); - ENDD(d1); - - BEGP(pt1); - deref_body(d0, pt1, func2s_y_unk, func2s_y_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, second argument was unbound too */ - FAIL(); - ENDD(d0); - ENDOp(); - - Op(p_func2s_y_cv, yxc); - /* A1 is a variable */ - restart_func2s_y_cv: -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - RESET_VARIABLE(HR); - HR[1] = PREG->y_u.yxc.c; - HR[2] = XREG(PREG->y_u.yxc.xi); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - } -#endif /* LOW_LEVEL_TRACE */ - /* We have to build the structure */ - BEGD(d0); - d0 = PREG->y_u.yxc.c; - /* we do, let's get the third argument */ - BEGD(d1); - d1 = XREG(PREG->y_u.yxc.xi); - deref_head(d1, func2s_y_unk_cv); - func2s_y_nvar_cv: - /* Uuuff, the second and third argument are bound */ - if (IsIntegerTerm(d1)) { - d1 = IntegerOfTerm(d1); - } else { - saveregs(); - if (IsBigIntTerm(d1)) { - Yap_Error(RESOURCE_ERROR_STACK, d1, "functor/3"); - } else { - Yap_Error(TYPE_ERROR_INTEGER,d1,"functor/3"); - } - setregs(); - FAIL(); - } - /* We made it!!!!! we got in d0 the name, in d1 the arity and - * in pt0 the variable to bind it to. */ - if (d0 == TermDot && d1 == 2) { - RESET_VARIABLE(HR); - RESET_VARIABLE(HR+1); - d0 = AbsPair(HR); - HR += 2; - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxc.y; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxc),Osbpp),l); - INITIALIZE_PERMVAR(pt1,d0); - ENDP(pt1); - GONext(); - } - else if ((Int)d1 > 0) { - /* now let's build a compound term */ - if (!IsAtomTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - if (!IsAtomTerm(d0)) { - FAIL(); - } - else - d0 = (CELL) Yap_MkFunctor(AtomOfTerm(d0), (Int) d1); - BEGP(pt1); - pt1 = HR; - *pt1++ = d0; - d0 = AbsAppl(HR); - if (pt1+d1 > ENV || pt1+d1 > (CELL *)B) { - /* make sure we have something to show for our trouble */ - saveregs(); - if (!Yap_gcl((1+d1)*sizeof(CELL), 0, YREG, NEXTOP(NEXTOP(PREG,yxc),Osbpp))) { - Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); - setregs(); - JMPNext(); - } else { - setregs(); - } - goto restart_func2s_y_cv; - } - while ((Int)d1--) { - RESET_VARIABLE(pt1); - pt1++; - } - /* done building the term */ - HR = pt1; - ENDP(pt1); - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxc.y; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxc),Osbpp),l); - INITIALIZE_PERMVAR(pt1,d0); - ENDP(pt1); - GONext(); - } else if (d1 == 0) { - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxc.y; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxc),Osbpp),l); - INITIALIZE_PERMVAR(pt1,d0); - ENDP(pt1); - GONext(); - } else { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO,MkIntegerTerm(d1),"functor/3"); - setregs(); - FAIL(); - } - - BEGP(pt1); - deref_body(d1, pt1, func2s_y_unk_cv, func2s_y_nvar_cv); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d1, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, third argument was unbound */ - FAIL(); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(p_func2s_y_vc, yxn); - /* A1 is a variable */ - restart_func2s_y_vc: -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - Term ti; - CELL *hi = HR; - - ti = MkIntegerTerm((Int)(PREG->y_u.yxn.c)); - RESET_VARIABLE(HR); - HR[1] = XREG(PREG->y_u.yxn.xi); - HR[2] = ti; - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - HR = hi; - } -#endif /* LOW_LEVEL_TRACE */ - /* We have to build the structure */ - BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); - deref_head(d0, func2s_y_unk_vc); - func2s_y_nvar_vc: - BEGD(d1); - d1 = PREG->y_u.yxn.c; - if (!IsAtomicTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - /* We made it!!!!! we got in d0 the name, in d1 the arity and - * in pt0 the variable to bind it to. */ - if (d0 == TermDot && d1 == 2) { - RESET_VARIABLE(HR); - RESET_VARIABLE(HR+1); - d0 = AbsPair(HR); - HR += 2; - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxn),Osbpp),l); - INITIALIZE_PERMVAR(pt1,d0); - ENDP(pt1); - GONext(); - } - if (d1 == 0) { - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxn),Osbpp),l); - INITIALIZE_PERMVAR(pt1,d0); - ENDP(pt1); - GONext(); - } - if (!IsAtomTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - /* now let's build a compound term */ - if (!IsAtomTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - BEGP(pt1); - if (!IsAtomTerm(d0)) { - FAIL(); - } - else - d0 = (CELL) Yap_MkFunctor(AtomOfTerm(d0), (Int) d1); - pt1 = HR; - *pt1++ = d0; - d0 = AbsAppl(HR); - if (pt1+d1 > ENV || pt1+d1 > (CELL *)B) { - /* make sure we have something to show for our trouble */ - saveregs(); - if (!Yap_gcl((1+d1)*sizeof(CELL), 0, YREG, NEXTOP(NEXTOP(PREG,yxn),Osbpp))) { - Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); - setregs(); - JMPNext(); - } else { - setregs(); - } - goto restart_func2s_y_vc; - } - while ((Int)d1--) { - RESET_VARIABLE(pt1); - pt1++; - } - /* done building the term */ - HR = pt1; - ENDP(pt1); - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - BEGP(pt1); - pt1 = YREG + PREG->y_u.yxn.y; - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxn),Osbpp),l); - INITIALIZE_PERMVAR(pt1,d0); - ENDP(pt1); - ENDD(d1); - GONext(); - - BEGP(pt1); - deref_body(d0, pt1, func2s_y_unk_vc, func2s_y_nvar_vc); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, second argument was unbound too */ - FAIL(); - ENDD(d0); - ENDOp(); - - Op(p_func2f_xx, xxx); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - HR[0] = XREG(PREG->y_u.xxx.x); - RESET_VARIABLE(HR+1); - RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - } -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - d0 = XREG(PREG->y_u.xxx.x); - deref_head(d0, func2f_xx_unk); - func2f_xx_nvar: - if (IsApplTerm(d0)) { - Functor d1 = FunctorOfTerm(d0); - if (IsExtensionFunctor(d1)) { - XREG(PREG->y_u.xxx.x1) = d0; - XREG(PREG->y_u.xxx.x2) = MkIntTerm(0); - PREG = NEXTOP(PREG, xxx); - GONext(); - } - XREG(PREG->y_u.xxx.x1) = MkAtomTerm(NameOfFunctor(d1)); - XREG(PREG->y_u.xxx.x2) = MkIntegerTerm(ArityOfFunctor(d1)); - PREG = NEXTOP(PREG, xxx); - GONext(); - } else if (IsPairTerm(d0)) { - XREG(PREG->y_u.xxx.x1) = TermDot; - XREG(PREG->y_u.xxx.x2) = MkIntTerm(2); - PREG = NEXTOP(PREG, xxx); - GONext(); - } else { - XREG(PREG->y_u.xxx.x1) = d0; - XREG(PREG->y_u.xxx.x2) = MkIntTerm(0); - PREG = NEXTOP(PREG, xxx); - GONext(); - } - - BEGP(pt1); - deref_body(d0, pt1, func2f_xx_unk, func2f_xx_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, second argument was unbound too */ - FAIL(); - ENDD(d0); - ENDOp(); - - Op(p_func2f_xy, xxy); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - HR[0] = XREG(PREG->y_u.xxy.x); - RESET_VARIABLE(HR+1); - RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - } -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - d0 = XREG(PREG->y_u.xxy.x); - deref_head(d0, func2f_xy_unk); - func2f_xy_nvar: - if (IsApplTerm(d0)) { - Functor d1 = FunctorOfTerm(d0); - CELL *pt0 = YREG+PREG->y_u.xxy.y2; - if (IsExtensionFunctor(d1)) { - XREG(PREG->y_u.xxy.x1) = d0; - PREG = NEXTOP(PREG, xxy); - INITIALIZE_PERMVAR(pt0, MkIntTerm(0)); - GONext(); - } - XREG(PREG->y_u.xxy.x1) = MkAtomTerm(NameOfFunctor(d1)); - PREG = NEXTOP(PREG, xxy); - INITIALIZE_PERMVAR(pt0, MkIntegerTerm(ArityOfFunctor(d1))); - GONext(); - } else if (IsPairTerm(d0)) { - CELL *pt0 = YREG+PREG->y_u.xxy.y2; - XREG(PREG->y_u.xxy.x1) = TermDot; - PREG = NEXTOP(PREG, xxy); - INITIALIZE_PERMVAR(pt0, MkIntTerm(2)); - GONext(); - } else { - CELL *pt0 = YREG+PREG->y_u.xxy.y2; - XREG(PREG->y_u.xxy.x1) = d0; - PREG = NEXTOP(PREG, xxy); - INITIALIZE_PERMVAR(pt0, MkIntTerm(0)); - GONext(); - } - - BEGP(pt1); - deref_body(d0, pt1, func2f_xy_unk, func2f_xy_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, second argument was unbound too */ - FAIL(); - ENDD(d0); - ENDOp(); - - Op(p_func2f_yx, yxx); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - HR[0] = XREG(PREG->y_u.yxx.x2); - RESET_VARIABLE(HR+1); - RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - } -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - d0 = XREG(PREG->y_u.yxx.x2); - deref_head(d0, func2f_yx_unk); - func2f_yx_nvar: - if (IsApplTerm(d0)) { - Functor d1 = FunctorOfTerm(d0); - CELL *pt0 = YREG+PREG->y_u.yxx.y; - if (IsExtensionFunctor(d1)) { - XREG(PREG->y_u.yxx.x1) = MkIntTerm(0); - PREG = NEXTOP(PREG, yxx); - INITIALIZE_PERMVAR(pt0, d0); - GONext(); - } - XREG(PREG->y_u.yxx.x1) = MkIntegerTerm(ArityOfFunctor(d1)); - PREG = NEXTOP(PREG, yxx); - INITIALIZE_PERMVAR(pt0, MkAtomTerm(NameOfFunctor(d1))); - GONext(); - } else if (IsPairTerm(d0)) { - CELL *pt0 = YREG+PREG->y_u.yxx.y; - XREG(PREG->y_u.yxx.x1) = MkIntTerm(2); - PREG = NEXTOP(PREG, yxx); - INITIALIZE_PERMVAR(pt0 ,TermDot); - GONext(); - } else { - CELL *pt0 = YREG+PREG->y_u.yxx.y; - XREG(PREG->y_u.yxx.x1) = MkIntTerm(0); - PREG = NEXTOP(PREG, yxx); - INITIALIZE_PERMVAR(pt0, d0); - GONext(); - } - - BEGP(pt1); - deref_body(d0, pt1, func2f_yx_unk, func2f_yx_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, second argument was unbound too */ - FAIL(); - ENDD(d0); - ENDOp(); - - Op(p_func2f_yy, yyx); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) { - HR[0] = XREG(PREG->y_u.yyx.x); - RESET_VARIABLE(HR+1); - RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - } -#endif /* LOW_LEVEL_TRACE */ - BEGD(d0); - d0 = XREG(PREG->y_u.yyx.x); - deref_head(d0, func2f_yy_unk); - func2f_yy_nvar: - if (IsApplTerm(d0)) { - Functor d1 = FunctorOfTerm(d0); - CELL *pt0 = YREG+PREG->y_u.yyx.y1; - CELL *pt1 = YREG+PREG->y_u.yyx.y2; - if (IsExtensionFunctor(d1)) { - PREG = NEXTOP(PREG, yyx); - INITIALIZE_PERMVAR(pt0, d0); - INITIALIZE_PERMVAR(pt1, MkIntTerm(0)); - GONext(); - } - PREG = NEXTOP(PREG, yyx); - INITIALIZE_PERMVAR(pt0, MkAtomTerm(NameOfFunctor(d1))); - INITIALIZE_PERMVAR(pt1, MkIntegerTerm(ArityOfFunctor(d1))); - GONext(); - } else if (IsPairTerm(d0)) { - CELL *pt0 = YREG+PREG->y_u.yyx.y1; - CELL *pt1 = YREG+PREG->y_u.yyx.y2; - PREG = NEXTOP(PREG, yyx); - INITIALIZE_PERMVAR(pt0, TermDot); - INITIALIZE_PERMVAR(pt1, MkIntTerm(2)); - GONext(); - } else { - CELL *pt0 = YREG+PREG->y_u.yyx.y1; - CELL *pt1 = YREG+PREG->y_u.yyx.y2; - PREG = NEXTOP(PREG, yyx); - INITIALIZE_PERMVAR(pt0, d0); - INITIALIZE_PERMVAR(pt1, MkIntTerm(0)); - GONext(); - } - - BEGP(pt1); - deref_body(d0, pt1, func2f_yy_unk, func2f_yy_nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, second argument was unbound too */ - FAIL(); - ENDD(d0); - ENDOp(); - - Op(p_functor, e); -#ifdef LOW_LEVEL_TRACER - if (Yap_do_low_level_trace) - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),XREGS+1); -#endif /* LOW_LEVEL_TRACE */ - restart_functor: - BEGD(d0); - d0 = ARG1; - deref_head(d0, func_unk); - func_nvar: - /* A1 is bound */ - BEGD(d1); - if (IsApplTerm(d0)) { - d1 = *RepAppl(d0); - if (IsExtensionFunctor((Functor) d1)) { - if (d1 <= (CELL)FunctorDouble && d1 >= (CELL)FunctorLongInt ) { - d1 = MkIntTerm(0); - } else - FAIL(); - } else { - d0 = MkAtomTerm(NameOfFunctor((Functor) d1)); - d1 = MkIntTerm(ArityOfFunctor((Functor) d1)); - } - } - else if (IsPairTerm(d0)) { - d0 = TermDot; - d1 = MkIntTerm(2); - } - else { - d1 = MkIntTerm(0); - } - /* d1 and d0 now have the two arguments */ - /* let's go and bind them */ - { - register CELL arity = d1; - - d1 = ARG2; - deref_head(d1, func_nvar_unk); - func_nvar_nvar: - /* A2 was bound */ - if (d0 != d1) { - vvvv FAIL(); - } - /* I have to this here so that I don't have a jump to a closing bracket */ - d0 = arity; - goto func_bind_x3; - - BEGP(pt0); - deref_body(d1, pt0, func_nvar_unk, func_nvar_nvar); - /* A2 is a variable, go and bind it */ - YapBind(pt0, d0); - /* I have to this here so that I don't have a jump to a closing bracket */ - d0 = arity; - ENDP(pt0); - func_bind_x3: - /* now let's process A3 */ - d1 = ARG3; - deref_head(d1, func_nvar3_unk); - func_nvar3_nvar: - /* A3 was bound */ - if (d0 != d1) { - FAIL(); - } - /* Done */ - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, e),Osbmp),l); - GONext(); - - BEGP(pt0); - deref_body(d1, pt0, func_nvar3_unk, func_nvar3_nvar); - /* A3 is a variable, go and bind it */ - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, e),Osbmp),l); - YapBind(pt0, d0); - /* Done */ - GONext(); - - - ENDP(pt0); - - } - ENDD(d1); - - BEGP(pt0); - deref_body(d0, pt0, func_unk, func_nvar); - /* A1 is a variable */ - /* We have to build the structure */ - d0 = ARG2; - deref_head(d0, func_var_2unk); - func_var_2nvar: - /* we do, let's get the third argument */ - BEGD(d1); - d1 = ARG3; - deref_head(d1, func_var_3unk); - func_var_3nvar: - /* Uuuff, the second and third argument are bound */ - if (IsIntTerm(d1)) - d1 = IntOfTerm(d1); - else { - saveregs(); - Yap_Error(TYPE_ERROR_INTEGER,ARG3,"functor/3"); - setregs(); - FAIL(); - } - if (!IsAtomicTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } /* We made it!!!!! we got in d0 the name, in d1 the arity and - * in pt0 the variable to bind it to. */ - if (d0 == TermDot && d1 == 2) { - RESET_VARIABLE(HR); - RESET_VARIABLE(HR+1); - d0 = AbsPair(HR); - HR += 2; - } - else if ((Int)d1 > 0) { - /* now let's build a compound term */ - if (!IsAtomTerm(d0)) { - saveregs(); - Yap_Error(TYPE_ERROR_ATOM,d0,"functor/3"); - setregs(); - FAIL(); - } - BEGP(pt1); - if (!IsAtomTerm(d0)) { - FAIL(); - } - else - d0 = (CELL) Yap_MkFunctor(AtomOfTerm(d0), (Int) d1); - pt1 = HR; - *pt1++ = d0; - d0 = AbsAppl(HR); - if (pt1+d1 > ENV || pt1+d1 > (CELL *)B) { - /* make sure we have something to show for our trouble */ - saveregs(); - if (!Yap_gcl((1+d1)*sizeof(CELL), 3, YREG, NEXTOP(NEXTOP(PREG,e),Osbmp))) { - Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage); - setregs(); - JMPNext(); - } else { - setregs(); - } - goto restart_functor; /* */ - } - while ((Int)d1--) { - RESET_VARIABLE(pt1); - pt1++; - } - /* done building the term */ - HR = pt1; - ENDP(pt1); - } else if ((Int)d1 < 0) { - saveregs(); - Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO,MkIntegerTerm(d1),"functor/3"); - setregs(); - FAIL(); - } - /* else if arity is 0 just pass d0 through */ - /* Ding, ding, we made it */ - PREG = NEXTOP(NEXTOP(NEXTOP(PREG, e),Osbpp),l); - YapBind(pt0, d0); - GONext(); - - - BEGP(pt1); - deref_body(d1, pt1, func_var_3unk, func_var_3nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d1, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, third argument was unbound */ - FAIL(); - ENDD(d1); - - BEGP(pt1); - deref_body(d0, pt1, func_var_2unk, func_var_2nvar); - saveregs(); - Yap_Error(INSTANTIATION_ERROR, d0, "functor/3"); - setregs(); - ENDP(pt1); - /* Oops, second argument was unbound too */ - FAIL(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - diff --git a/C/qlyr.c b/C/qlyr.c index 4bd6a5d85..4ad999d78 100755 --- a/C/qlyr.c +++ b/C/qlyr.c @@ -693,7 +693,7 @@ read_tag(IOSTREAM *stream) return ch; } -static pred_flags_t +static UInt read_predFlags(IOSTREAM *stream) { pred_flags_t v; @@ -1005,9 +1005,8 @@ read_clauses(IOSTREAM *stream, PredEntry *pp, UInt nclauses, UInt flags) { static void read_pred(IOSTREAM *stream, Term mod) { - pred_flags_t flags; - UInt nclauses; - pred_flags_t fl1; + UInt flags; + UInt nclauses, fl1; PredEntry *ap; ap = LookupPredEntry((PredEntry *)read_UInt(stream)); @@ -1020,8 +1019,8 @@ read_pred(IOSTREAM *stream, Term mod) { // printf(" %s/%ld\n", NameOfFunctor(ap->FunctorOfPred)->StrOfAE, ap->ArityOfPE); //else if (ap->ModuleOfPred != IDB_MODULE) // printf(" %s/%ld\n", ((Atom)(ap->FunctorOfPred))->StrOfAE, ap->ArityOfPE); - fl1 = flags & ((pred_flags_t)STATIC_PRED_FLAGS|(pred_flags_t)EXTRA_PRED_FLAGS); - ap->PredFlags &= ~((pred_flags_t)STATIC_PRED_FLAGS|(pred_flags_t)EXTRA_PRED_FLAGS); + fl1 = flags & ((UInt)STATIC_PRED_FLAGS|(UInt)EXTRA_PRED_FLAGS); + ap->PredFlags &= ~((UInt)STATIC_PRED_FLAGS|(UInt)EXTRA_PRED_FLAGS); ap->PredFlags |= fl1; if (flags & NumberDBPredFlag) { ap->src.IndxId = read_UInt(stream); @@ -1038,7 +1037,7 @@ read_pred(IOSTREAM *stream, Term mod) { } read_clauses(stream, ap, nclauses, flags); if (flags & HiddenPredFlag) { - Yap_HidePred(ap, false); + Yap_HidePred(ap); } } diff --git a/C/scanner.c b/C/scanner.c index 29abcb824..a7fbf300f 100755 --- a/C/scanner.c +++ b/C/scanner.c @@ -837,14 +837,12 @@ get_num(int *chp, int *chbuffp, IOSTREAM *inp_stream, char *s, UInt max_size, in GET_LD char *sp = s; int ch = *chp; - Int val = 0L; - int base = ch-'0'; - bool might_be_float = true, has_overflow = false; + Int val = 0L, base = ch - '0'; + int might_be_float = TRUE, has_overflow = FALSE; const unsigned char *decimalpoint; *sp++ = ch; ch = getchr(inp_stream); - /* * because of things like 00'2, 03'2 and even better 12'2, I need to * do this (have mercy) @@ -854,97 +852,103 @@ get_num(int *chp, int *chbuffp, IOSTREAM *inp_stream, char *s, UInt max_size, in if (--max_size == 0) { return num_send_error_message("Number Too Long"); } - base = base*10+ ch - '0'; + base = 10 * base + ch - '0'; ch = getchr(inp_stream); } - if (base == 0) { - if (ch <= '9' && ch >= '0') { - *sp++ = ch; - val = base; - base = 10; - // go scan a number - } else if (ch == '\'') { - int scan_extra; - wchar_t ascii; + if (ch == '\'') { + if (base > 36) { + return num_send_error_message("Admissible bases are 0..36"); + } + might_be_float = FALSE; + if (--max_size == 0) { + return num_send_error_message("Number Too Long"); + } + *sp++ = ch; + ch = getchr(inp_stream); + if (base == 0) { + wchar_t ascii = ch; + int scan_extra = TRUE; - ch = getchr(inp_stream); if (ch == '\\' && Yap_GetModuleEntry(CurrentModule)->flags & M_CHARESCAPE) { - /* a quick way to represent ASCII */ ascii = read_quoted_char(&scan_extra, inp_stream); - } else { - ascii = ch; } - ch = getchr(inp_stream); - *chp = ch; + /* a quick way to represent ASCII */ + if (scan_extra) + *chp = getchr(inp_stream); if (sign == -1) { return MkIntegerTerm(-ascii); } return MkIntegerTerm(ascii); - } else { - switch (ch) { - case 'b': - base = 2; + } else if (base >= 10 && base <= 36) { + int upper_case = 'A' - 11 + base; + int lower_case = 'a' - 11 + base; + + while (my_isxdigit(ch, upper_case, lower_case)) { + Int oval = val; + int chval = (chtype(ch) == NU ? ch - '0' : + (my_isupper(ch) ? ch - 'A' : ch - 'a') + 10); + if (--max_size == 0) { + return num_send_error_message("Number Too Long"); + } + *sp++ = ch; + val = oval * base + chval; + if (oval != (val-chval)/base) /* overflow */ + has_overflow = (has_overflow || TRUE); ch = getchr(inp_stream); - break; - case 'o': - base = 8; - ch = getchr(inp_stream); - break; - case 'x': - base = 16; - ch = getchr(inp_stream); - break; - default: - /* floating point */ - base = 10; } } - } else { - /* base > 0, must be a number */ - if (ch == '\'') { + } else if (ch == 'x' && base == 0) { + might_be_float = FALSE; + if (--max_size == 0) { + return num_send_error_message("Number Too Long"); + } + *sp++ = ch; + ch = getchr(inp_stream); + while (my_isxdigit(ch, 'F', 'f')) { + Int oval = val; + int chval = (chtype(ch) == NU ? ch - '0' : + (my_isupper(ch) ? ch - 'A' : ch - 'a') + 10); if (--max_size == 0) { return num_send_error_message("Number Too Long"); - } - sp = s; + } + *sp++ = ch; + val = val * 16 + chval; + if (oval != (val-chval)/16) /* overflow */ + has_overflow = TRUE; ch = getchr(inp_stream); - } else { - val = base; - base = 10; } + *chp = ch; } - if (base <= 10) { - // do this fast, it is most important */ - while ( ch >= '0' && ch <= base+('0'- 1)) { - Int oval = val; - if (!has_overflow) { - val = val * base + ch - '0'; - if (val/base != oval || val -oval*base != ch-'0') /* overflow */ - has_overflow = true; - } - *sp++ = ch; - if (--max_size == 0) { - return num_send_error_message("Number Too Long"); - } - ch = getchr(inp_stream); - } + else if (ch == 'o' && base == 0) { + might_be_float = FALSE; + base = 8; + ch = getchr(inp_stream); + } else if (ch == 'b' && base == 0) { + might_be_float = FALSE; + base = 2; + ch = getchr(inp_stream); } else { - while (chtype(ch) == NU ||my_isxdigit(ch, 'a'+(base-10), 'A'+(base-10))) { - Int oval = val; - if (!has_overflow) { - int dig = - (ch >= '0' && ch <= '9' ? ch - '0' : - ch >= 'a' ? ch +10 - 'a' : ch+10-'A' ); - val = val * base + dig; - if (val/base != oval || val -oval*base != dig) /* overflow */ - has_overflow = true; - } - *sp++ = ch; + val = base; + base = 10; + } + while (chtype(ch) == NU) { + Int oval = val; + if (!(val == 0 && ch == '0') || has_overflow) { if (--max_size == 0) { return num_send_error_message("Number Too Long"); } - ch = getchr(inp_stream); + *sp++ = ch; } + if (ch - '0' >= base) { + if (sign == -1) + return MkIntegerTerm(-val); + return MkIntegerTerm(val); + } + val = val * base + ch - '0'; + if (val/base != oval || val -oval*base != ch-'0') /* overflow */ + has_overflow = TRUE; + ch = getchr(inp_stream); } if (might_be_float && ( ch == '.' || ch == 'e' || ch == 'E')) { int has_dot = ( ch == '.' ); @@ -1024,7 +1028,7 @@ get_num(int *chp, int *chbuffp, IOSTREAM *inp_stream, char *s, UInt max_size, in *sp = '\0'; /* skip base */ *chp = ch; - if (s[0] == '0' && (s[1] == 'x'|| s[1] == 'X')) + if (s[0] == '0' && s[1] == 'x') return read_int_overflow(s+2,16,val,sign); else if (s[0] == '0' && s[1] == 'o') return read_int_overflow(s+2,8,val,sign); diff --git a/C/signals.c b/C/signals.c index 6fee4033d..379df3f60 100755 --- a/C/signals.c +++ b/C/signals.c @@ -156,7 +156,7 @@ get_signal(yap_signals sig USES_REGS) #if THREADS uint64_t old; - // first, clear the Interrupted Marker, now if someone sets it it is their problem + // first, clear the Creep Flag, now if someone sets it it is their problem CalculateStackGap( PASS_REGS1 ); // reset the flag if ( (old =__sync_fetch_and_and( &LOCAL_Signals, ~SIGNAL_TO_BIT(sig) ) ) != diff --git a/C/stdpreds.c b/C/stdpreds.c index 1b2463ab2..9c10b746c 100644 --- a/C/stdpreds.c +++ b/C/stdpreds.c @@ -827,41 +827,52 @@ static Int cont_current_predicate(USES_REGS1) { Functor f; if (IsNonVarTerm(t1)) { - PropEntry *p = AddressOfTerm(EXTRA_CBACK_ARG(4, 1)), *p0 = p; - PropEntry *q = AddressOfTerm(EXTRA_CBACK_ARG(4, 2)), *q0 = q; - PredEntry *pp0; - if (q) pp0 = RepPredProp(q); - else pp0 = RepPredProp(p); - while (!pp && p ) { - if ( p->KindOfPE == PEProp && p != p0) { - pp = RepPredProp(p); - q = NULL; - } else if ( p->KindOfPE == FunctorProperty ) { - if (q0) { - q = q0->NextOfPE; - q0 = NULL; - } else { - q = RepFunctorProp(p)->PropsOfFE; - } - while (!pp && q ) { - if ( q->KindOfPE == PEProp ) - pp = RepPredProp(q); - else - q = q->NextOfPE; - } - if (!q) - p = p->NextOfPE; - } else { - p = p->NextOfPE; + PropEntry *p = AddressOfTerm(EXTRA_CBACK_ARG(4, 1)); + PropEntry *q = AddressOfTerm(EXTRA_CBACK_ARG(4, 2)); + // restart inner loop + for (; q; q = q->NextOfPE) { + if (q->KindOfPE == PEProp) { + pp = RepPredProp(q); + q = q->NextOfPE; + if (q == NIL) + p = p->NextOfPE; + if (!p) + is_det = true; + // we are done with this loop. + break; + } + } + if (!pp && p) { + // try using outer loop + for (; p; p = p->NextOfPE) { + if (p->KindOfPE == PEProp) { + q = NULL; + pp = RepPredProp(p); + p = p->NextOfPE; + if (!p) + is_det = true; + break; + } else if (p->KindOfPE == FunctorProperty) { + // looping on p/n + for (q = RepFunctorProp(p)->PropsOfFE; q; q = q->NextOfPE) { + if (q->KindOfPE == PEProp) { + pp = RepPredProp(q); + q = q->NextOfPE; + if (!q && !p->NextOfPE) + is_det = true; + break; + } + } + break; + } } } if (pp == NULL) // nothing more - is_det = true; + cut_fail(); if (!is_det) { EXTRA_CBACK_ARG(4, 1) = MkAddressTerm(p); EXTRA_CBACK_ARG(4, 2) = MkAddressTerm(q); } - pp = pp0; } else if (IsNonVarTerm(t2)) { // operating within the same module. PredEntry *npp; @@ -1003,25 +1014,12 @@ static Int init_current_predicate(USES_REGS1) { cut_fail(); } else { PropEntry *p = RepAtom(AtomOfTerm(t1))->PropsOfAE, *q = NIL; - while (!pp && p ) { - if ( p->KindOfPE == PEProp ) { - pp = RepPredProp(p); - } else if ( p->KindOfPE == FunctorProperty ) { - q = RepFunctorProp(p)->PropsOfFE; - while (!pp && q ) { - if ( q->KindOfPE == PEProp ) - pp = RepPredProp(q); - else - q = q->NextOfPE; - } - if (!q) - p = p->NextOfPE; - } else { - p = p->NextOfPE; - } + while (p && p->KindOfPE == FunctorProperty && + (q = RepFunctorProp(p)->PropsOfFE) == NIL) { + p = p->NextOfPE; } - if (!pp) - cut_fail(); + if (!p) + cut_fail(); EXTRA_CBACK_ARG(4, 1) = MkAddressTerm(p); EXTRA_CBACK_ARG(4, 2) = MkAddressTerm(q); } @@ -1197,7 +1195,7 @@ static Int p_flags(USES_REGS1) { /* $flags(+Functor,+Mod,?OldFlags,?NewFlags) */ if (EndOfPAEntr(pe)) return (FALSE); PELOCK(92, pe); - if (!Yap_unify_constant(ARG3, Yap_MkInt64Term(pe->PredFlags))) { + if (!Yap_unify_constant(ARG3, MkIntegerTerm(pe->PredFlags))) { UNLOCK(pe->PELock); return (FALSE); } @@ -1205,18 +1203,18 @@ static Int p_flags(USES_REGS1) { /* $flags(+Functor,+Mod,?OldFlags,?NewFlags) */ if (IsVarTerm(ARG4)) { UNLOCK(pe->PELock); return (TRUE); - } else if (!IsInt64Term(ARG4)) { + } else if (!IsIntegerTerm(ARG4)) { Term te = Yap_Eval(ARG4); - if (IsInt64Term(te)) { - newFl = Yap_Int64OfTerm(te); + if (IsIntegerTerm(te)) { + newFl = IntegerOfTerm(te); } else { UNLOCK(pe->PELock); Yap_Error(TYPE_ERROR_INTEGER, ARG4, "flags"); return (FALSE); } } else - newFl = Yap_Int64OfTerm(ARG4); + newFl = IntegerOfTerm(ARG4); pe->PredFlags = newFl; UNLOCK(pe->PELock); return TRUE; @@ -1270,7 +1268,7 @@ static Int if (IsVarTerm(ARG4)) { UNLOCK(pe->PELock); return (FALSE); - } else if (!IsInt64Term(v)) { + } else if (!IsIntTerm(v)) { Yap_Error(TYPE_ERROR_ATOM, v, "set_property/1"); return (FALSE); } diff --git a/C/unify_absmi_insts.h b/C/unify_absmi_insts.h deleted file mode 100644 index 61b576512..000000000 --- a/C/unify_absmi_insts.h +++ /dev/null @@ -1,3582 +0,0 @@ -/************************************************************************\ - * Get Instructions * -\************************************************************************/ - -#ifdef INDENT_CODE -{ - { - { -#endif /* INDENT_CODE */ - - Op(get_x_var, xx); - BEGD(d0); - d0 = XREG(PREG->y_u.xx.xr); - XREG(PREG->y_u.xx.xl) = d0; - PREG = NEXTOP(PREG, xx); - ENDD(d0); - GONext(); - ENDOp(); - - Op(get_y_var, yx); - BEGD(d0); - BEGP(pt0); - pt0 = YREG + PREG->y_u.yx.y; - d0 = XREG(PREG->y_u.yx.x); - PREG = NEXTOP(PREG, yx); - INITIALIZE_PERMVAR(pt0,d0); - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(get_yy_var, yyxx); - CACHE_Y(YREG); - BEGD(d0); - BEGP(pt0); - pt0 = S_YREG + PREG->y_u.yyxx.y1; - d0 = XREG(PREG->y_u.yyxx.x1); - BEGD(d1); - BEGP(pt1); - pt1 = S_YREG + PREG->y_u.yyx.y2; - d1 = XREG(PREG->y_u.yyxx.x2); - PREG = NEXTOP(PREG, yyxx); - INITIALIZE_PERMVAR(pt0,d0); - INITIALIZE_PERMVAR(pt1,d1); - ENDP(pt1); - ENDD(d1); - GONext(); - ENDP(pt0); - ENDD(d0); - ENDCACHE_Y(); - ENDOp(); - - /* The code for get_x_val is hard to follow because I use a - * lot of jumps. The convention is that in the label - * gval_X_YREG X refers to the state of the first argument, and - * YREG to the state of the second argument */ - Op(get_x_val, xx); - BEGD(d0); - d0 = XREG(PREG->y_u.xx.xl); - deref_head(d0, gvalx_unk); - - /* d0 will keep the first argument */ - gvalx_nonvar: - /* first argument is bound */ - BEGD(d1); - d1 = XREG(PREG->y_u.xx.xr); - deref_head(d1, gvalx_nonvar_unk); - - gvalx_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, xx); - UnifyBound(d0, d1); - - BEGP(pt0); - /* deref second argument */ - deref_body(d1, pt0, gvalx_nonvar_unk, gvalx_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, xx); - YapBind(pt0, d0); - GONext(); - - ENDP(pt0); - ENDD(d1); - - BEGP(pt0); - /* first argument may be unbound */ - deref_body(d0, pt0, gvalx_unk, gvalx_nonvar); - /* first argument is unbound and in pt0 and in d0 */ - BEGD(d1); - d1 = XREG(PREG->y_u.xx.xr); - deref_head(d1, gvalx_var_unk); - - gvalx_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, xx); - YapBind(pt0, d1); - GONext(); - - BEGP(pt1); - deref_body(d1, pt1, gvalx_var_unk, gvalx_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, xx); - UnifyCells(pt0, pt1); - GONext(); - ENDP(pt1); - ENDD(d1); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - /* The code for get_y_val mostly uses the code for get_x_val - */ - - Op(get_y_val, yx); - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = YREG + PREG->y_u.yx.y; - d0 = *pt0; - - /* From now on, it's just a copy of the code for get_x_val */ - - deref_head(d0, gvaly_unk); - gvaly_nonvar: - - /* first argument is bound */ - d1 = XREG(PREG->y_u.yx.x); - deref_head(d1, gvaly_nonvar_unk); - gvaly_nonvar_nonvar: - - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, yx); - UnifyBound(d0, d1); - - BEGP(pt1); - /* deref second argument */ - deref_body(d1, pt1, gvaly_nonvar_unk, gvaly_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, yx); - YapBind(pt1, d0); - GONext(); - ENDP(pt1); - - - /* first argument may be unbound */ - derefa_body(d0, pt0, gvaly_unk, gvaly_nonvar); - /* first argument is unbound */ - d1 = XREG(PREG->y_u.yx.x); - deref_head(d1, gvaly_var_unk); - - gvaly_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, yx); - YapBind(pt0, d1); - GONext(); - - BEGP(pt1); - deref_body(d1, pt1, gvaly_var_unk, gvaly_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, yx); - UnifyCells(pt0, pt1); - GONext(); - ENDP(pt1); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(get_atom, xc); - BEGD(d0); - BEGD(d1); - /* fetch arguments */ - d0 = XREG(PREG->y_u.xc.x); - d1 = PREG->y_u.xc.c; - - BEGP(pt0); - deref_head(d0, gatom_unk); - /* argument is nonvar */ - gatom_nonvar: - if (d0 == d1) { - PREG = NEXTOP(PREG, xc); - GONext(); - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_unk, gatom_nonvar); - /* argument is a variable */ - PREG = NEXTOP(PREG, xc); - YapBind(pt0, d1); - GONext(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(get_atom_exo, x); - BEGD(d0); - BEGD(d1); - /* fetch arguments */ - d0 = XREG(PREG->y_u.x.x); - d1 = *SREG; - SREG++; - - BEGP(pt0); - deref_head(d0, gatom_exo_unk); - /* argument is nonvar */ - gatom_exo_nonvar: - if (d0 == d1) { - PREG = NEXTOP(PREG, x); - GONext(); - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_exo_unk, gatom_exo_nonvar); - /* argument is a variable */ - pt0 = (CELL *)d0; - PREG = NEXTOP(PREG, x); - YapBind(pt0, d1); - GONext(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(get_2atoms, cc); - BEGD(d0); - BEGD(d1); - /* fetch arguments */ - d0 = ARG1; - - BEGP(pt0); - deref_head(d0, gatom_2unk); - /* argument is nonvar */ - gatom_2nonvar: - if (d0 == PREG->y_u.cc.c1) { - goto gatom_2b; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_2unk, gatom_2nonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.cc.c1); - ENDP(pt0); - gatom_2b: - /* fetch arguments */ - d0 = ARG2; - d1 = PREG->y_u.cc.c2; - - BEGP(pt0); - deref_head(d0, gatom_2bunk); - /* argument is nonvar */ - gatom_2bnonvar: - if (d0 == d1) { - PREG = NEXTOP(PREG, cc); - GONext(); - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_2bunk, gatom_2bnonvar); - /* argument is a variable */ - PREG = NEXTOP(PREG, cc); - YapBind(pt0, d1); - GONext(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(get_3atoms, ccc); - BEGD(d0); - BEGD(d1); - /* fetch arguments */ - d0 = ARG1; - - BEGP(pt0); - deref_head(d0, gatom_3unk); - /* argument is nonvar */ - gatom_3nonvar: - if (d0 == PREG->y_u.ccc.c1) { - goto gatom_3b; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_3unk, gatom_3nonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.ccc.c1); - ENDP(pt0); - gatom_3b: - /* fetch arguments */ - d0 = ARG2; - - BEGP(pt0); - deref_head(d0, gatom_3bunk); - /* argument is nonvar */ - gatom_3bnonvar: - if (d0 == PREG->y_u.ccc.c2) { - goto gatom_3c; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_3bunk, gatom_3bnonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.ccc.c2); - ENDP(pt0); - gatom_3c: - /* fetch arguments */ - d0 = ARG3; - d1 = PREG->y_u.ccc.c3; - - BEGP(pt0); - deref_head(d0, gatom_3cunk); - /* argument is nonvar */ - gatom_3cnonvar: - if (d0 == d1) { - PREG = NEXTOP(PREG, ccc); - GONext(); - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_3cunk, gatom_3cnonvar); - /* argument is a variable */ - PREG = NEXTOP(PREG, ccc); - YapBind(pt0, d1); - GONext(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(get_4atoms, cccc); - BEGD(d0); - BEGD(d1); - /* fetch arguments */ - d0 = ARG1; - - BEGP(pt0); - deref_head(d0, gatom_4unk); - /* argument is nonvar */ - gatom_4nonvar: - if (d0 == PREG->y_u.cccc.c1) { - goto gatom_4b; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_4unk, gatom_4nonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.cccc.c1); - ENDP(pt0); - gatom_4b: - /* fetch arguments */ - d0 = ARG2; - - BEGP(pt0); - deref_head(d0, gatom_4bunk); - /* argument is nonvar */ - gatom_4bnonvar: - if (d0 == PREG->y_u.cccc.c2) { - goto gatom_4c; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_4bunk, gatom_4bnonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.cccc.c2); - ENDP(pt0); - gatom_4c: - /* fetch arguments */ - d0 = ARG3; - - BEGP(pt0); - deref_head(d0, gatom_4cunk); - /* argument is nonvar */ - gatom_4cnonvar: - if (d0 == PREG->y_u.cccc.c3) { - goto gatom_4d; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_4cunk, gatom_4cnonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.cccc.c3); - ENDP(pt0); - gatom_4d: - /* fetch arguments */ - d0 = ARG4; - d1 = PREG->y_u.cccc.c4; - - BEGP(pt0); - deref_head(d0, gatom_4dunk); - /* argument is nonvar */ - gatom_4dnonvar: - if (d0 == d1) { - PREG = NEXTOP(PREG, cccc); - GONext(); - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_4dunk, gatom_4dnonvar); - /* argument is a variable */ - PREG = NEXTOP(PREG, cccc); - YapBind(pt0, d1); - GONext(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(get_5atoms, ccccc); - BEGD(d0); - BEGD(d1); - /* fetch arguments */ - d0 = ARG1; - - BEGP(pt0); - deref_head(d0, gatom_5unk); - /* argument is nonvar */ - gatom_5nonvar: - if (d0 == PREG->y_u.ccccc.c1) { - goto gatom_5b; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_5unk, gatom_5nonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.ccccc.c1); - ENDP(pt0); - gatom_5b: - /* fetch arguments */ - d0 = ARG2; - - BEGP(pt0); - deref_head(d0, gatom_5bunk); - /* argument is nonvar */ - gatom_5bnonvar: - if (d0 == PREG->y_u.ccccc.c2) { - goto gatom_5c; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_5bunk, gatom_5bnonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.ccccc.c2); - ENDP(pt0); - gatom_5c: - /* fetch arguments */ - d0 = ARG3; - - BEGP(pt0); - deref_head(d0, gatom_5cunk); - /* argument is nonvar */ - gatom_5cnonvar: - if (d0 == PREG->y_u.ccccc.c3) { - goto gatom_5d; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_5cunk, gatom_5cnonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.ccccc.c3); - ENDP(pt0); - gatom_5d: - /* fetch arguments */ - d0 = ARG4; - - BEGP(pt0); - deref_head(d0, gatom_5dunk); - /* argument is nonvar */ - gatom_5dnonvar: - if (d0 == PREG->y_u.ccccc.c4) { - goto gatom_5e; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_5dunk, gatom_5dnonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.ccccc.c4); - ENDP(pt0); - gatom_5e: - /* fetch arguments */ - d0 = ARG5; - d1 = PREG->y_u.ccccc.c5; - - BEGP(pt0); - deref_head(d0, gatom_5eunk); - /* argument is nonvar */ - gatom_5enonvar: - if (d0 == d1) { - PREG = NEXTOP(PREG, ccccc); - GONext(); - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_5eunk, gatom_5enonvar); - /* argument is a variable */ - PREG = NEXTOP(PREG, ccccc); - YapBind(pt0, d1); - GONext(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(get_6atoms, cccccc); - BEGD(d0); - BEGD(d1); - /* fetch arguments */ - d0 = ARG1; - - BEGP(pt0); - deref_head(d0, gatom_6unk); - /* argument is nonvar */ - gatom_6nonvar: - if (d0 == PREG->y_u.cccccc.c1) { - goto gatom_6b; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_6unk, gatom_6nonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.cccccc.c1); - ENDP(pt0); - gatom_6b: - /* fetch arguments */ - d0 = ARG2; - - BEGP(pt0); - deref_head(d0, gatom_6bunk); - /* argument is nonvar */ - gatom_6bnonvar: - if (d0 == PREG->y_u.cccccc.c2) { - goto gatom_6c; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_6bunk, gatom_6bnonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.cccccc.c2); - ENDP(pt0); - gatom_6c: - /* fetch arguments */ - d0 = ARG3; - - BEGP(pt0); - deref_head(d0, gatom_6cunk); - /* argument is nonvar */ - gatom_6cnonvar: - if (d0 == PREG->y_u.cccccc.c3) { - goto gatom_6d; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_6cunk, gatom_6cnonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.cccccc.c3); - ENDP(pt0); - gatom_6d: - /* fetch arguments */ - d0 = ARG4; - - BEGP(pt0); - deref_head(d0, gatom_6dunk); - /* argument is nonvar */ - gatom_6dnonvar: - if (d0 == PREG->y_u.cccccc.c4) { - goto gatom_6e; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_6dunk, gatom_6dnonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.cccccc.c4); - ENDP(pt0); - gatom_6e: - /* fetch arguments */ - d0 = ARG5; - - BEGP(pt0); - deref_head(d0, gatom_6eunk); - /* argument is nonvar */ - gatom_6enonvar: - if (d0 == PREG->y_u.cccccc.c5) { - goto gatom_6f; - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_6eunk, gatom_6enonvar); - /* argument is a variable */ - YapBind(pt0, PREG->y_u.cccccc.c5); - ENDP(pt0); - gatom_6f: - /* fetch arguments */ - d0 = ARG6; - d1 = PREG->y_u.cccccc.c6; - - BEGP(pt0); - deref_head(d0, gatom_6funk); - /* argument is nonvar */ - gatom_6fnonvar: - if (d0 == d1) { - PREG = NEXTOP(PREG, cccccc); - GONext(); - } - else { - FAIL(); - } - - deref_body(d0, pt0, gatom_6funk, gatom_6fnonvar); - /* argument is a variable */ - PREG = NEXTOP(PREG, cccccc); - YapBind(pt0, d1); - GONext(); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - /* The next instructions can lead to either the READ stream - * or the write stream */ - - OpRW(get_list, x); - BEGD(d0); - d0 = XREG(PREG->y_u.x.x); - deref_head(d0, glist_unk); - - glist_nonvar: - /* did we find a list? */ - if (!IsPairTerm(d0)) { - FAIL(); - } - START_PREFETCH(x); - PREG = NEXTOP(PREG, x); - /* enter read mode */ - SREG = RepPair(d0); - GONext(); - END_PREFETCH(); - - BEGP(pt0); - deref_body(d0, pt0, glist_unk, glist_nonvar); - /* glist var */ - /* enter write mode */ - CACHE_S(); - S_SREG = HR; - START_PREFETCH_W(x); - PREG = NEXTOP(PREG, x); - BEGD(d0); - d0 = AbsPair(S_SREG); - YapBind(pt0, d0); - S_SREG = HR; - /* don't put an ENDD just after a label */ - HR = S_SREG + 2; - ENDD(d0); - WRITEBACK_S(S_SREG); - GONextW(); - - - END_PREFETCH_W(); - ENDCACHE_S(); - ENDP(pt0); - - ENDD(d0); - ENDOpRW(); - - OpRW(get_struct, xfa); - BEGD(d0); - d0 = XREG(PREG->y_u.xfa.x); - deref_head(d0, gstruct_unk); - - gstruct_nonvar: - if (!IsApplTerm(d0)) - FAIL(); - /* we have met a compound term */ - START_PREFETCH(xfa); - CACHE_S(); - S_SREG = RepAppl(d0); - /* check functor */ - d0 = (CELL) (PREG->y_u.xfa.f); - if (*S_SREG != d0) { - FAIL(); - } - WRITEBACK_S(S_SREG+1); - ENDCACHE_S(); - PREG = NEXTOP(PREG, xfa); - /* enter read mode */ - GONext(); - END_PREFETCH(); - - BEGP(pt0); - deref_body(d0, pt0, gstruct_unk, gstruct_nonvar); - /* Enter Write mode */ - /* set d1 to be the new structure we are going to create */ - START_PREFETCH_W(xfa); - BEGD(d1); - d1 = AbsAppl(HR); - YapBind(pt0, d1); - /* now, set pt0 to point to the heap where we are going to - * build our term */ - pt0 = HR; - ENDD(d1); - /* first, put the functor */ - d0 = (CELL) (PREG->y_u.xfa.f); - *pt0++ = d0; - HR = pt0 + PREG->y_u.xfa.a; - PREG = NEXTOP(PREG, xfa); - /* set SREG */ - SREG = pt0; - /* update HR */ - GONextW(); - END_PREFETCH_W(); - ENDP(pt0); - - ENDD(d0); - ENDOpRW(); - - Op(get_float, xd); - BEGD(d0); - d0 = XREG(PREG->y_u.xd.x); - deref_head(d0, gfloat_unk); - - gfloat_nonvar: - if (!IsApplTerm(d0)) - FAIL(); - /* we have met a preexisting float */ - START_PREFETCH(xd); - BEGP(pt0); - pt0 = RepAppl(d0); - /* check functor */ - if (*pt0 != (CELL)FunctorDouble) { - FAIL(); - } - BEGP(pt1); - pt1 = PREG->y_u.xd.d; - PREG = NEXTOP(PREG, xd); - if ( - pt1[1] != pt0[1] -#if SIZEOF_DOUBLE == 2*SIZEOF_INT_P - || pt1[2] != pt0[2] -#endif - ) FAIL(); - ENDP(pt1); - ENDP(pt0); - /* enter read mode */ - GONext(); - END_PREFETCH(); - - BEGP(pt0); - deref_body(d0, pt0, gfloat_unk, gfloat_nonvar); - /* Enter Write mode */ - /* set d1 to be the new structure we are going to create */ - START_PREFETCH(xc); - BEGD(d1); - d1 = AbsAppl(PREG->y_u.xd.d); - PREG = NEXTOP(PREG, xd); - YapBind(pt0, d1); - GONext(); - ENDD(d1); - END_PREFETCH(); - ENDP(pt0); - - ENDD(d0); - ENDOp(); - - Op(get_string, xu); - BEGD(d0); - d0 = XREG(PREG->y_u.xu.x); - deref_head(d0, gstring_unk); - - gstring_nonvar: - if (!IsApplTerm(d0)) - FAIL(); - /* we have met a preexisting string */ - START_PREFETCH(xu); - BEGP(pt0); - pt0 = RepAppl(d0); - /* check functor */ - if (*pt0 != (CELL)FunctorString) { - FAIL(); - } - BEGP(pt1); - pt1 = RepAppl(PREG->y_u.xu.ut); - PREG = NEXTOP(PREG, xu); - if ( - pt1[1] != pt0[1] || - strcmp((const char *)(pt1+2), (const char *)(pt0+2)) - ) FAIL(); - ENDP(pt1); - ENDP(pt0); - /* enter read mode */ - GONext(); - END_PREFETCH(); - - BEGP(pt0); - deref_body(d0, pt0, gstring_unk, gstring_nonvar); - /* Enter Write mode */ - /* set d1 to be the new structure we are going to create */ - START_PREFETCH(xc); - BEGD(d1); - d1 = PREG->y_u.xu.ut; - PREG = NEXTOP(PREG, xu); - YapBind(pt0, d1); - GONext(); - ENDD(d1); - END_PREFETCH(); - ENDP(pt0); - - ENDD(d0); - ENDOp(); - - Op(get_longint, xi); - BEGD(d0); - d0 = XREG(PREG->y_u.xi.x); - deref_head(d0, glongint_unk); - - glongint_nonvar: - if (!IsApplTerm(d0)) - FAIL(); - /* we have met a preexisting longint */ - START_PREFETCH(xi); - BEGP(pt0); - pt0 = RepAppl(d0); - /* check functor */ - if (*pt0 != (CELL)FunctorLongInt) { - FAIL(); - } - if (PREG->y_u.xi.i[1] != (CELL)pt0[1]) FAIL(); - ENDP(pt0); - PREG = NEXTOP(PREG, xi); - /* enter read mode */ - GONext(); - END_PREFETCH(); - - BEGP(pt0); - deref_body(d0, pt0, glongint_unk, glongint_nonvar); - /* Enter Write mode */ - /* set d1 to be the new structure we are going to create */ - START_PREFETCH(xi); - BEGD(d1); - d1 = AbsAppl(PREG->y_u.xi.i); - PREG = NEXTOP(PREG, xi); - YapBind(pt0, d1); - GONext(); - ENDD(d1); - END_PREFETCH(); - ENDP(pt0); - - ENDD(d0); - ENDOp(); - - Op(get_bigint, xN); -#ifdef USE_GMP - BEGD(d0); - d0 = XREG(PREG->y_u.xN.x); - deref_head(d0, gbigint_unk); - - gbigint_nonvar: - if (!IsApplTerm(d0)) - FAIL(); - /* we have met a preexisting bigint */ - START_PREFETCH(xN); - BEGP(pt0); - pt0 = RepAppl(d0); - /* check functor */ - if (*pt0 != (CELL)FunctorBigInt) - { - FAIL(); - } - if (Yap_gmp_tcmp_big_big(d0,PREG->y_u.xN.b)) - FAIL(); - PREG = NEXTOP(PREG, xN); - ENDP(pt0); - /* enter read mode */ - GONext(); - END_PREFETCH(); - - BEGP(pt0); - deref_body(d0, pt0, gbigint_unk, gbigint_nonvar); - /* Enter Write mode */ - /* set d1 to be the new structure we are going to create */ - START_PREFETCH(xN); - BEGD(d1); - d1 = PREG->y_u.xN.b; - PREG = NEXTOP(PREG, xN); - YapBind(pt0, d1); - GONext(); - ENDD(d1); - END_PREFETCH(); - ENDP(pt0); - - ENDD(d0); -#else - FAIL(); -#endif - ENDOp(); - - - Op(get_dbterm, xD); - BEGD(d0); - d0 = XREG(PREG->y_u.xD.x); - deref_head(d0, gdbterm_unk); - - gdbterm_nonvar: - BEGD(d1); - /* we have met a preexisting dbterm */ - d1 = PREG->y_u.xD.D; - PREG = NEXTOP(PREG, xD); - UnifyBound(d0,d1); - ENDD(d1); - - BEGP(pt0); - deref_body(d0, pt0, gdbterm_unk, gdbterm_nonvar); - /* Enter Write mode */ - /* set d1 to be the new structure we are going to create */ - START_PREFETCH(xD); - BEGD(d1); - d1 = PREG->y_u.xD.D; - PREG = NEXTOP(PREG, xD); - YapBind(pt0, d1); - GONext(); - ENDD(d1); - END_PREFETCH(); - ENDP(pt0); - - ENDD(d0); - ENDOp(); - - /************************************************************************\ - * Optimised Get List Instructions * -\************************************************************************/ - OpRW(glist_valx, xx); - BEGD(d0); - d0 = XREG(PREG->y_u.xx.xl); - deref_head(d0, glist_valx_write); - glist_valx_read: - BEGP(pt0); - /* did we find a list? */ - if (!IsPairTerm(d0)) - FAIL(); - /* enter read mode */ - START_PREFETCH(xx); - pt0 = RepPair(d0); - SREG = pt0 + 1; - /* start unification with first argument */ - d0 = *pt0; - deref_head(d0, glist_valx_unk); - - /* first argument is in d0 */ - glist_valx_nonvar: - /* first argument is bound */ - BEGD(d1); - d1 = XREG(PREG->y_u.xx.xr); - deref_head(d1, glist_valx_nonvar_unk); - - glist_valx_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, xx); - UnifyBound(d0, d1); - - BEGP(pt1); - /* deref second argument */ - deref_body(d1, pt1, glist_valx_nonvar_unk, glist_valx_nonvar_nonvar); - /* head bound, argument unbound */ - PREG = NEXTOP(PREG, xx); - YapBind(pt1, d0); - GONext(); - ENDP(pt1); - - - ENDD(d1); - - /* head may be unbound */ - derefa_body(d0, pt0, glist_valx_unk, glist_valx_nonvar); - /* head is unbound, pt0 has the value */ - d0 = XREG(PREG->y_u.xx.xr); - deref_head(d0, glist_valx_var_unk); - - glist_valx_var_nonvar: - /* head is unbound, second arg bound */ - PREG = NEXTOP(PREG, xx); - Bind_Global(pt0, d0); - GONext(); - - BEGP(pt1); - deref_body(d0, pt1, glist_valx_var_unk, glist_valx_var_nonvar); - /* head and second argument are unbound */ - PREG = NEXTOP(PREG, xx); - UnifyGlobalCellToCell(pt0, pt1); - GONext(); - ENDP(pt1); - ENDP(pt0); - END_PREFETCH(); - - BEGP(pt0); - deref_body(d0, pt0, glist_valx_write, glist_valx_read); - CACHE_S(); - /* enter write mode */ - S_SREG = HR; - BEGD(d1); - d1 = XREG(PREG->y_u.xx.xr); - d0 = AbsPair(S_SREG); - S_SREG[0] = d1; - ENDD(d1); - ALWAYS_START_PREFETCH_W(xx); - PREG = NEXTOP(PREG, xx); - HR = S_SREG + 2; - WRITEBACK_S(S_SREG+1); - YapBind(pt0, d0); - ALWAYS_GONextW(); - ALWAYS_END_PREFETCH_W(); - ENDCACHE_S(); - ENDP(pt0); - - ENDD(d0); - ENDOpRW(); - - OpRW(glist_valy, yx); - BEGD(d0); - d0 = XREG(PREG->y_u.yx.x); - deref_head(d0, glist_valy_write); - glist_valy_read: - BEGP(pt0); - /* did we find a list? */ - if (!IsPairTerm(d0)) - FAIL(); - START_PREFETCH(yx); - /* enter read mode */ - pt0 = RepPair(d0); - SREG = pt0 + 1; - /* start unification with first argument */ - d0 = *pt0; - deref_head(d0, glist_valy_unk); - - glist_valy_nonvar: - /* first argument is bound */ - BEGD(d1); - BEGP(pt1); - pt1 = YREG + PREG->y_u.yx.y; - d1 = *pt1; - PREG = NEXTOP(PREG, yx); - deref_head(d1, glist_valy_nonvar_unk); - - glist_valy_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - SREG = pt0 + 1; - UnifyBound(d0, d1); - - /* deref second argument */ - derefa_body(d1, pt1, glist_valy_nonvar_unk, glist_valy_nonvar_nonvar); - /* first argument bound, second unbound */ - YapBind(pt1, d0); - GONext(); - - - ENDP(pt1); - - /* first argument may be unbound */ - derefa_body(d0, pt0, glist_valy_unk, glist_valy_nonvar); - /* first argument is unbound */ - BEGP(pt1); - pt1 = YREG+PREG->y_u.yx.y; - d1 = *pt1; - deref_head(d1, glist_valy_var_unk); - glist_valy_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, yx); - Bind_Global(pt0, d1); - GONext(); - - derefa_body(d1, pt1, glist_valy_var_unk, glist_valy_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, yx); - UnifyGlobalCellToCell(pt0, pt1); - GONext(); - ENDP(pt1); - ENDD(d1); - - END_PREFETCH(); - ENDP(pt0); - - BEGP(pt0); - deref_body(d0, pt0, glist_valy_write, glist_valy_read); - /* enter write mode */ - START_PREFETCH_W(yx); - BEGP(pt1); - pt1 = HR; - d0 = AbsPair(pt1); - YapBind(pt0, d0); - BEGD(d0); - /* include XREG on it */ - d0 = YREG[PREG->y_u.yx.y]; - pt1[0] = d0; - ENDD(d0); - HR = pt1 + 2; - SREG = pt1 + 1; - ENDP(pt1); - PREG = NEXTOP(PREG, yx); - GONextW(); - END_PREFETCH_W(); - ENDP(pt0); - - ENDD(d0); - ENDOpRW(); - - Op(gl_void_varx, xx); - BEGD(d0); - d0 = XREG(PREG->y_u.xx.xl); - deref_head(d0, glist_void_varx_write); - glist_void_varx_read: - /* did we find a list? */ - if (!IsPairTerm(d0)) - FAIL(); - ALWAYS_START_PREFETCH(xx); - /* enter read mode */ - BEGP(pt0); - pt0 = RepPair(d0); - d0 = pt0[1]; - XREG(PREG->y_u.xx.xr) = d0; - PREG = NEXTOP(PREG, xx); - ALWAYS_GONext(); - ENDP(pt0); - ALWAYS_END_PREFETCH(); - - BEGP(pt0); - deref_body(d0, pt0, glist_void_varx_write, glist_void_varx_read); - /* enter write mode */ - BEGP(pt1); - pt1 = HR; - /* include XREG on it */ - XREG(PREG->y_u.xx.xr) = - Unsigned(pt1 + 1); - RESET_VARIABLE(pt1); - RESET_VARIABLE(pt1+1); - HR = pt1 + 2; - BEGD(d0); - d0 = AbsPair(pt1); - YapBind(pt0, d0); - PREG = NEXTOP(PREG, xx); - ENDD(d0); - ENDP(pt1); - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(gl_void_vary, yx); - BEGD(d0); - d0 = XREG(PREG->y_u.yx.x); - deref_head(d0, glist_void_vary_write); - glist_void_vary_read: - /* did we find a list? */ - if (!IsPairTerm(d0)) - FAIL(); - /* enter read mode */ - BEGP(pt0); - pt0 = RepPair(d0); - d0 = pt0[1]; - ENDP(pt0); - INITIALIZE_PERMVAR(YREG+PREG->y_u.yx.y,d0); - PREG = NEXTOP(PREG, yx); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, glist_void_vary_write, glist_void_vary_read); - /* enter write mode */ - BEGP(pt1); - pt1 = HR; - /* include XREG on it */ - INITIALIZE_PERMVAR(YREG+PREG->y_u.yx.y,Unsigned(pt1 + 1)); - PREG = NEXTOP(PREG, yx); - RESET_VARIABLE(pt1); - RESET_VARIABLE(pt1+1); - d0 = AbsPair(pt1); - HR = pt1 + 2; - YapBind(pt0, d0); - GONext(); - ENDP(pt1); - ENDP(pt0); - - ENDD(d0); - ENDOp(); - - Op(gl_void_valx, xx); - BEGD(d0); - d0 = XREG(PREG->y_u.xx.xl); - deref_head(d0, glist_void_valx_write); - glist_void_valx_read: - BEGP(pt0); - /* did we find a list? */ - if (!IsPairTerm(d0)) - FAIL(); - /* enter read mode */ - pt0 = RepPair(d0)+1; - /* start unification with first argument */ - d0 = *pt0; - deref_head(d0, glist_void_valx_unk); - - glist_void_valx_nonvar: - /* first argument is bound */ - BEGD(d1); - d1 = XREG(PREG->y_u.xx.xr); - deref_head(d1, glist_void_valx_nonvar_unk); - - glist_void_valx_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, xx); - UnifyBound(d0, d1); - - /* deref second argument */ - BEGP(pt1); - deref_body(d1, pt1, glist_void_valx_nonvar_unk, glist_void_valx_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, xx); - YapBind(pt1, d0); - GONext(); - ENDP(pt1); - ENDD(d1); - - /* first argument may be unbound */ - derefa_body(d0, pt0, glist_void_valx_unk, glist_void_valx_nonvar); - /* first argument is unbound */ - BEGD(d1); - d1 = XREG(PREG->y_u.xx.xr); - deref_head(d1, glist_void_valx_var_unk); - - glist_void_valx_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, xx); - Bind_Global(pt0, d1); - GONext(); - - BEGP(pt1); - deref_body(d1, pt1, glist_void_valx_var_unk, glist_void_valx_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, xx); - UnifyGlobalCellToCell(pt0, pt1); - GONext(); - ENDP(pt1); - ENDD(d1); - ENDP(pt0); - - BEGP(pt0); - deref_body(d0, pt0, glist_void_valx_write, glist_void_valx_read); - /* enter write mode */ - BEGP(pt1); - pt1 = HR; - d0 = AbsPair(pt1); - YapBind(pt0, d0); - pt1 = HR; - BEGD(d0); - /* include XREG on it */ - d0 = XREG(PREG->y_u.xx.xr); - RESET_VARIABLE(pt1); - pt1[1] = d0; - HR = pt1 + 2; - ENDD(d0); - ENDP(pt1); - PREG = NEXTOP(PREG, xx); - GONext(); - ENDP(pt0); - - ENDD(d0); - ENDOp(); - - Op(gl_void_valy, yx); - BEGD(d0); - d0 = XREG(PREG->y_u.yx.x); - deref_head(d0, glist_void_valy_write); - glist_void_valy_read: - BEGP(pt0); - /* did we find a list? */ - if (!IsPairTerm(d0)) - FAIL(); - /* enter read mode */ - pt0 = RepPair(d0)+1; - /* start unification with first argument */ - d0 = *pt0; - deref_head(d0, glist_void_valy_unk); - - glist_void_valy_nonvar: - /* first argument is bound */ - BEGD(d1); - BEGP(pt1); - pt1 = YREG+PREG->y_u.yx.y; - d1 = *pt1; - deref_head(d1, glist_void_valy_nonvar_unk); - - glist_void_valy_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, yx); - UnifyBound(d0, d1); - - /* deref second argument */ - derefa_body(d1, pt1, glist_void_valy_nonvar_unk, glist_void_valy_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, yx); - YapBind(pt1, d0); - GONext(); - - ENDP(pt1); - - /* first argument may be unbound */ - derefa_body(d0, pt0, glist_void_valy_unk, glist_void_valy_nonvar); - /* first argument is unbound */ - BEGP(pt1); - pt1 = YREG+PREG->y_u.yx.y; - d1 = *pt1; - deref_head(d1, glist_void_valy_var_unk); - - glist_void_valy_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, yx); - Bind_Global(pt0, d1); - GONext(); - - deref_body(d1, pt1, glist_void_valy_var_unk, glist_void_valy_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, yx); - UnifyGlobalCellToCell(pt0, pt1); - GONext(); - ENDP(pt1); - ENDD(d1); - ENDP(pt0); - - BEGP(pt0); - deref_body(d0, pt0, glist_void_valy_write, glist_void_valy_read); - /* enter write mode */ - CACHE_S(); - S_SREG = HR; - d0 = AbsPair(S_SREG); - YapBind(pt0, d0); - S_SREG = HR; - /* include XREG on it */ - BEGD(d1); - d1 = YREG[PREG->y_u.yx.y]; - RESET_VARIABLE(S_SREG); - S_SREG[1] = d1; - ENDD(d1); - PREG = NEXTOP(PREG, yx); - HR = S_SREG + 2; - ENDCACHE_S(); - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - - - /************************************************************************\ - * Unify instructions * -\************************************************************************/ - - Op(unify_x_var, ox); - CACHE_S(); - READ_IN_S(); - BEGD(d0); - d0 = *S_SREG; -#ifdef YAPOR_SBA - if (d0 == 0) - d0 = (CELL)S_SREG; -#endif - WRITEBACK_S(S_SREG+1); - ALWAYS_START_PREFETCH(ox); - XREG(PREG->y_u.ox.x) = d0; - PREG = NEXTOP(PREG, ox); - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - ENDD(d0); - ENDCACHE_S(); - ENDOp(); - - OpW(unify_x_var_write, ox); - CACHE_S(); - READ_IN_S(); - BEGP(pt0); - pt0 = &XREG(PREG->y_u.ox.x); - PREG = NEXTOP(PREG, ox); - RESET_VARIABLE(S_SREG); - *pt0 = (CELL) S_SREG; - WRITEBACK_S(S_SREG+1); - ENDP(pt0); - ENDCACHE_S(); - GONextW(); - ENDOpW(); - - BOp(unify_l_x_var, ox); - ALWAYS_START_PREFETCH(ox); - BEGP(pt0); - BEGD(d0); - d0 = SREG[0]; - pt0 = &XREG(PREG->y_u.ox.x); - PREG = NEXTOP(PREG, ox); -#ifdef YAPOR_SBA - if (d0 == 0) - d0 = (CELL)SREG; -#endif - *pt0 = d0; - ALWAYS_GONext(); - ENDD(d0); - ENDP(pt0); - ALWAYS_END_PREFETCH(); - ENDBOp(); - - BOp(unify_l_x_var_write, ox); - ALWAYS_START_PREFETCH(ox); - CACHE_S(); - READ_IN_S(); - BEGP(pt0); - pt0 = &XREG(PREG->y_u.ox.x); - PREG = NEXTOP(PREG, ox); - RESET_VARIABLE(S_SREG); - *pt0 = (CELL)S_SREG; - ENDP(pt0); - ENDCACHE_S(); - ALWAYS_GONext(); - ENDBOp(); - ALWAYS_END_PREFETCH(); - - BOp(unify_x_var2, oxx); - CACHE_S(); - ALWAYS_START_PREFETCH(oxx); - READ_IN_S(); - BEGP(pt0); - pt0 = &XREG(PREG->y_u.oxx.xr); - BEGD(d0); - d0 = S_SREG[0]; - BEGD(d1); - d1 = S_SREG[1]; -#ifdef YAPOR_SBA - if (d0 == 0) - d0 = (CELL)S_SREG; - if (d1 == 0) - d1 = (CELL)(S_SREG+1); -#endif - WRITEBACK_S(S_SREG+2); - XREG(PREG->y_u.oxx.xl) = d0; - PREG = NEXTOP(PREG, oxx); - *pt0 = d1; - ENDD(d0); - ENDD(d1); - ENDP(pt0); - ALWAYS_GONext(); - ENDBOp(); - ALWAYS_END_PREFETCH(); - ENDCACHE_S(); - - OpW(unify_x_var2_write, oxx); - CACHE_S(); - READ_IN_S(); - BEGP(pt0); - pt0 = &XREG(PREG->y_u.oxx.xr); - RESET_VARIABLE(S_SREG); - XREG(PREG->y_u.oxx.xl) = (CELL) S_SREG; - S_SREG++; - PREG = NEXTOP(PREG, oxx); - RESET_VARIABLE(S_SREG); - *pt0 = (CELL) S_SREG; - ENDP(pt0); - WRITEBACK_S(S_SREG+1); - ENDCACHE_S(); - GONextW(); - ENDOpW(); - - BOp(unify_l_x_var2, oxx); - ALWAYS_START_PREFETCH(oxx); - CACHE_S(); - READ_IN_S(); - BEGP(pt0); - pt0 = &XREG(PREG->y_u.oxx.xr); - BEGD(d0); - d0 = S_SREG[0]; - BEGD(d1); - d1 = S_SREG[1]; -#ifdef YAPOR_SBA - if (d0 == 0) - XREG(PREG->y_u.oxx.xl) = (CELL)S_SREG; - else -#endif - XREG(PREG->y_u.oxx.xl) = d0; - PREG = NEXTOP(PREG, oxx); -#ifdef YAPOR_SBA - if (d1 == 0) - *pt0 = (CELL)(S_SREG+1); - else -#endif - *pt0 = d1; - ENDD(d0); - ENDD(d1); - ENDP(pt0); - ENDCACHE_S(); - ALWAYS_GONext(); - ENDBOp(); - ALWAYS_END_PREFETCH(); - - Op(unify_l_x_var2_write, oxx); - CACHE_S(); - READ_IN_S(); - BEGP(pt0); - pt0 = &XREG(PREG->y_u.oxx.xr); - XREG(PREG->y_u.oxx.xl) = (CELL) S_SREG; - RESET_VARIABLE(S_SREG); - S_SREG++; - *pt0 = (CELL) S_SREG; - PREG = NEXTOP(PREG, oxx); - RESET_VARIABLE(S_SREG); - ENDP(pt0); - ENDCACHE_S(); - GONext(); - ENDOp(); - - Op(unify_y_var, oy); - BEGD(d0); - d0 = *SREG++; -#ifdef YAPOR_SBA - if (d0 == 0) { - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,(CELL)(SREG-1)); - } else -#else - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,d0); -#endif /* YAPOR_SBA */ - PREG = NEXTOP(PREG, oy); - GONext(); - ENDD(d0); - ENDOp(); - - OpW(unify_y_var_write, oy); - CACHE_S(); - READ_IN_S(); - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,(CELL) S_SREG); - PREG = NEXTOP(PREG, oy); - RESET_VARIABLE(S_SREG); - WRITEBACK_S(S_SREG+1); - ENDCACHE_S(); - GONextW(); - ENDOpW(); - - Op(unify_l_y_var, oy); - BEGD(d0); - d0 = SREG[0]; -#ifdef YAPOR_SBA - if (d0 == 0) { - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,(CELL)SREG); - } else -#else - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,d0); -#endif /* YAPOR_SBA */ - PREG = NEXTOP(PREG, oy); - GONext(); - ENDD(d0); - ENDOp(); - - Op(unify_l_y_var_write, oy); - CACHE_S(); - READ_IN_S(); - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,(CELL) S_SREG); - PREG = NEXTOP(PREG, oy); - RESET_VARIABLE(S_SREG); - ENDCACHE_S(); - GONext(); - ENDOp(); - - /* We assume the value in X is pointing to an object in the - * global stack */ - Op(unify_x_val, ox); - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, uvalx_unk); - - uvalx_nonvar: - /* first argument is bound */ - d1 = XREG(PREG->y_u.ox.x); - deref_head(d1, uvalx_nonvar_unk); - - uvalx_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, ox); - SREG++; - UnifyBound(d0, d1); - - /* deref second argument */ - /* pt0 is in the structure and pt1 the register */ - BEGP(pt1); - deref_body(d1, pt1, uvalx_nonvar_unk, uvalx_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, ox); - SREG++; - YapBind(pt1, d0); - GONext(); - ENDP(pt1); - - /* first argument may be unbound */ - derefa_body(d0, pt0, uvalx_unk, uvalx_nonvar); - /* first argument is unbound */ - d1 = XREG(PREG->y_u.ox.x); - deref_head(d1, uvalx_var_unk); - - uvalx_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, ox); - SREG++; - Bind_Global(pt0, d1); - GONext(); - - BEGP(pt1); - deref_body(d1, pt1, uvalx_var_unk, uvalx_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, ox); - SREG++; - UnifyGlobalCellToCell(pt0, pt1); - GONext(); - ENDP(pt1); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - OpW(unify_x_val_write, ox); - /* we are in write mode */ - *SREG++ = XREG(PREG->y_u.ox.x); - PREG = NEXTOP(PREG, ox); - GONextW(); - ENDOpW(); - - /* We assume the value in X is pointing to an object in the - * global stack */ - Op(unify_l_x_val, ox); - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, ulvalx_unk); - - ulvalx_nonvar: - /* first argument is bound */ - d1 = XREG(PREG->y_u.ox.x); - deref_head(d1, ulvalx_nonvar_unk); - - ulvalx_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, ox); - UnifyBound(d0, d1); - - BEGP(pt1); - /* deref second argument */ - deref_body(d1, pt1, ulvalx_nonvar_unk, ulvalx_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, ox); - YapBind(pt1, d0); - GONext(); - ENDP(pt1); - - /* first argument may be unbound */ - derefa_body(d0, pt0, ulvalx_unk, ulvalx_nonvar); - /* first argument is unbound */ - d1 = XREG(PREG->y_u.ox.x); - deref_head(d1, ulvalx_var_unk); - - ulvalx_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, ox); - Bind_Global(pt0, d1); - GONext(); - - BEGP(pt1); - deref_body(d1, pt1, ulvalx_var_unk, ulvalx_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, ox); - UnifyGlobalCellToCell(pt0, pt1); - GONext(); - ENDP(pt1); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(unify_l_x_val_write, ox); - /* we are in write mode */ - SREG[0] = XREG(PREG->y_u.ox.x); - PREG = NEXTOP(PREG, ox); - GONext(); - ENDOp(); - - /* We assume the value in X is pointing to an object in the - * global stack */ - Op(unify_y_val, oy); - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, uvaly_unk); - - uvaly_nonvar: - /* first argument is bound */ - BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; - d1 = *pt1; - deref_head(d1, uvaly_nonvar_unk); - - uvaly_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, oy); - SREG++; - UnifyBound(d0, d1); - - /* deref second argument */ - derefa_body(d1, pt1, uvaly_nonvar_unk, uvaly_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, oy); - SREG++; - YapBind(pt1, d0); - GONext(); - ENDP(pt1); - - /* first argument may be unbound */ - derefa_body(d0, pt0, uvaly_unk, uvaly_nonvar); - /* first argument is unbound */ - BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; - d1 = *pt1; - deref_head(d1, uvaly_var_unk); - - uvaly_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, oy); - SREG++; - Bind_Global(pt0, d1); - GONext(); - - derefa_body(d1, pt1, uvaly_var_unk, uvaly_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, oy); - SREG++; - UnifyGlobalCellToCell(pt0, pt1); - GONext(); - ENDP(pt1); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - OpW(unify_y_val_write, oy); - /* we are in write mode */ - BEGD(d0); - d0 = YREG[PREG->y_u.oy.y]; -#ifdef YAPOR_SBA - if (d0 == 0) /* free variable */ - *SREG++ = (CELL)(YREG+PREG->y_u.oy.y); - else -#endif - *SREG++ = d0; - ENDD(d0); - PREG = NEXTOP(PREG, oy); - GONextW(); - ENDOpW(); - - /* We assume the value in X is pointing to an object in the - * global stack */ - Op(unify_l_y_val, oy); - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, ulvaly_unk); - - ulvaly_nonvar: - /* first argument is bound */ - BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; - d1 = *pt1; - deref_head(d1, ulvaly_nonvar_unk); - - ulvaly_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, oy); - UnifyBound(d0, d1); - - /* deref second argument */ - derefa_body(d1, pt1, ulvaly_nonvar_unk, ulvaly_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, oy); - YapBind(pt1, d0); - GONext(); - ENDP(pt1); - - /* first argument may be unbound */ - derefa_body(d0, pt0, ulvaly_unk, ulvaly_nonvar); - /* first argument is unbound */ - BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; - d1 = *pt1; - deref_head(d1, ulvaly_var_unk); - - ulvaly_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, oy); - Bind_Global(pt0, d1); - GONext(); - - /* Here we are in trouble: we have a clash between pt1 and - * SREG. We address this by storing SREG in d0 for the duration. */ - derefa_body(d1, pt1, ulvaly_var_unk, ulvaly_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, oy); - UnifyGlobalCellToCell(pt0, pt1); - GONext(); - ENDP(pt1); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(unify_l_y_val_write, oy); - /* we are in write mode */ - BEGD(d0); - d0 = YREG[PREG->y_u.oy.y]; -#ifdef YAPOR_SBA - if (d0 == 0) /* new variable */ - SREG[0] = (CELL)(YREG+PREG->y_u.oy.y); - else -#endif - SREG[0] = d0; - ENDD(d0); - PREG = NEXTOP(PREG, oy); - GONext(); - ENDOp(); - - /* In the next instructions, we do not know anything about - * what is in X */ - Op(unify_x_loc, ox); - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, uvalx_loc_unk); - - uvalx_loc_nonvar: - /* first argument is bound */ - d1 = XREG(PREG->y_u.ox.x); - deref_head(d1, uvalx_loc_nonvar_unk); - - uvalx_loc_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, ox); - SREG++; - UnifyBound(d0, d1); - - BEGP(pt1); - /* deref second argument */ - deref_body(d1, pt1, uvalx_loc_nonvar_unk, uvalx_loc_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, ox); - SREG++; - YapBind(pt1, d0); - GONext(); - ENDP(pt1); - - - /* first argument may be unbound */ - derefa_body(d0, pt0, uvalx_loc_unk, uvalx_loc_nonvar); - /* first argument is unbound */ - d1 = XREG(PREG->y_u.ox.x); - deref_head(d1, uvalx_loc_var_unk); - - uvalx_loc_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, ox); - SREG++; - Bind_Global(pt0, d1); - GONext(); - - /* Here we are in trouble: we have a clash between pt1 and - * SREG. We address this by storing SREG in d0 for the duration. */ - BEGP(pt1); - deref_body(d1, pt1, uvalx_loc_var_unk, uvalx_loc_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, ox); - SREG++; - UnifyCells(pt0, pt1); - GONext(); - ENDP(pt1); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - OpW(unify_x_loc_write, ox); - /* we are in write mode */ - BEGD(d0); - d0 = XREG(PREG->y_u.ox.x); - deref_head(d0, unify_x_loc_unk); - unify_x_loc_nonvar: - *SREG++ = d0; - PREG = NEXTOP(PREG, ox); - GONextW(); - - BEGP(pt0); - deref_body(d0, pt0, unify_x_loc_unk, unify_x_loc_nonvar); - /* move ahead in the instructions */ - PREG = NEXTOP(PREG, ox); - /* d0 is a variable, check whether we need to globalise it */ - if (pt0 < HR) { - /* variable is global */ - *SREG++ = Unsigned(pt0); - GONextW(); - } - else { - /* bind our variable to the structure */ - CACHE_S(); - READ_IN_S(); - Bind_Local(pt0, Unsigned(S_SREG)); - RESET_VARIABLE(S_SREG); - WRITEBACK_S(S_SREG+1); - ENDCACHE_S(); - GONextW(); - } - ENDP(pt0); - ENDD(d0); - ENDOpW(); - - /* In the next instructions, we do not know anything about - * what is in X */ - Op(unify_l_x_loc, ox); - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, ulvalx_loc_unk); - - ulvalx_loc_nonvar: - /* first argument is bound */ - d1 = XREG(PREG->y_u.ox.x); - deref_head(d1, ulvalx_loc_nonvar_unk); - - ulvalx_loc_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, ox); - UnifyBound(d0, d1); - - /* deref second argument */ - deref_body(d1, pt0, ulvalx_loc_nonvar_unk, ulvalx_loc_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, ox); - YapBind(pt0, d0); - GONext(); - - /* first argument may be unbound */ - derefa_body(d0, pt0, ulvalx_loc_unk, ulvalx_loc_nonvar); - /* first argument is unbound */ - d1 = XREG(PREG->y_u.ox.x); - deref_head(d1, ulvalx_loc_var_unk); - - ulvalx_loc_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, ox); - Bind_Global(pt0, d1); - GONext(); - - BEGP(pt1); - deref_body(d1, pt1, ulvalx_loc_var_unk, ulvalx_loc_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, ox); - UnifyGlobalCellToCell(pt0, pt1); - GONext(); - ENDP(pt1); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(unify_l_x_loc_write, ox); - /* we are in write mode */ - BEGD(d0); - d0 = XREG(PREG->y_u.ox.x); - deref_head(d0, ulnify_x_loc_unk); - ulnify_x_loc_nonvar: - SREG[0] = d0; - PREG = NEXTOP(PREG, ox); - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, ulnify_x_loc_unk, ulnify_x_loc_nonvar); - /* d0 is a variable, check whether we need to globalise it */ - PREG = NEXTOP(PREG, ox); - if (pt0 < HR) { - /* variable is global */ - SREG[0] = Unsigned(pt0); - GONext(); - } - else { - /* create a new Heap variable and bind our variable to it */ - Bind_Local(pt0, Unsigned(SREG)); - RESET_VARIABLE(SREG); - GONext(); - } - ENDP(pt0); - ENDD(d0); - ENDOpW(); - - Op(unify_y_loc, oy); - /* we are in read mode */ - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, uvaly_loc_unk); - - uvaly_loc_nonvar: - /* structure is bound */ - BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; - d1 = *pt1; - deref_head(d1, uvaly_loc_nonvar_unk); - - uvaly_loc_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, oy); - SREG++; - UnifyBound(d0, d1); - - /* deref second argument */ - derefa_body(d1, pt1, uvaly_loc_nonvar_unk, uvaly_loc_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, oy); - SREG++; - YapBind(pt1, d0); - GONext(); - ENDP(pt1); - - /* first argument may be unbound */ - derefa_body(d0, pt0, uvaly_loc_unk, uvaly_loc_nonvar); - /* first argument is unbound */ - BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; - d1 = *pt1; - deref_head(d1, uvaly_loc_var_unk); - - uvaly_loc_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, oy); - SREG++; - Bind_Global(pt0, d1); - GONext(); - - /* Here we are in trouble: we have a clash between pt1 and - * SREG. We address this by storing SREG in d0 for the duration. */ - derefa_body(d1, pt1, uvaly_loc_var_unk, uvaly_loc_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, oy); - SREG++; - UnifyCells(pt0, pt1); - GONext(); - ENDP(pt1); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - OpW(unify_y_loc_write, oy); - /* we are in write mode */ - BEGD(d0); - BEGP(pt0); - pt0 = YREG+PREG->y_u.oy.y; - d0 = *pt0; - deref_head(d0, unify_y_loc_unk); - unify_y_loc_nonvar: - *SREG++ = d0; - PREG = NEXTOP(PREG, oy); - GONextW(); - - derefa_body(d0, pt0, unify_y_loc_unk, unify_y_loc_nonvar); - /* d0 is a variable, check whether we need to globalise it */ - PREG = NEXTOP(PREG, oy); - if (pt0 < HR) { - /* variable is global */ - *SREG++ = Unsigned(pt0); - GONextW(); - } - else { - /* create a new Heap variable and bind our variable to it */ - CACHE_S(); - READ_IN_S(); - Bind_Local(pt0, Unsigned(S_SREG)); - RESET_VARIABLE(S_SREG); - WRITEBACK_S(S_SREG+1); - ENDCACHE_S(); - GONextW(); - } - ENDP(pt0); - ENDD(d0); - ENDOpW(); - - Op(unify_l_y_loc, oy); - /* else we are in read mode */ - BEGD(d0); - BEGD(d1); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, ulvaly_loc_unk); - - ulvaly_loc_nonvar: - /* structure is bound */ - BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; - d1 = *pt1; - deref_head(d1, ulvaly_loc_nonvar_unk); - - ulvaly_loc_nonvar_nonvar: - /* both arguments are bound */ - /* we may have to bind structures */ - PREG = NEXTOP(PREG, oy); - UnifyBound(d0, d1); - - /* deref second argument */ - derefa_body(d1, pt1, ulvaly_loc_nonvar_unk, ulvaly_loc_nonvar_nonvar); - /* first argument bound, second unbound */ - PREG = NEXTOP(PREG, oy); - YapBind(pt1, d0); - GONext(); - ENDP(pt1); - - /* first argument may be unbound */ - derefa_body(d0, pt0, ulvaly_loc_unk, ulvaly_loc_nonvar); - /* first argument is unbound */ - BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; - d1 = *pt1; - deref_head(d1, ulvaly_loc_var_unk); - - ulvaly_loc_var_nonvar: - /* first unbound, second bound */ - PREG = NEXTOP(PREG, oy); - Bind_Global(pt0, d1); - GONext(); - - /* Here we are in trouble: we have a clash between pt1 and - * SREG. We address this by storing SREG in d0 for the duration. */ - derefa_body(d1, pt1, ulvaly_loc_var_unk, ulvaly_loc_var_nonvar); - /* both arguments are unbound */ - PREG = NEXTOP(PREG, oy); - UnifyGlobalCellToCell(pt0, pt1); - GONext(); - ENDP(pt1); - ENDP(pt0); - ENDD(d1); - ENDD(d0); - ENDOp(); - - Op(unify_l_y_loc_write, oy); - /* we are in write mode */ - BEGD(d0); - BEGP(pt0); - pt0 = YREG+PREG->y_u.oy.y; - d0 = *pt0; - deref_head(d0, ulunify_y_loc_unk); - ulunify_y_loc_nonvar: - SREG[0] = d0; - PREG = NEXTOP(PREG, oy); - GONext(); - - derefa_body(d0, pt0, ulunify_y_loc_unk, ulunify_y_loc_nonvar); - /* d0 is a variable, check whether we need to globalise it */ - PREG = NEXTOP(PREG, oy); - if (pt0 < HR) { - /* variable is global */ - SREG[0] = Unsigned(pt0); - GONext(); - } - else { - /* create a new Heap variable and bind our variable to it */ - CACHE_S(); - READ_IN_S(); - Bind_Local(pt0, Unsigned(S_SREG)); - RESET_VARIABLE(S_SREG); - ENDCACHE_S(); - GONext(); - } - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(unify_void, o); - START_PREFETCH(o); - PREG = NEXTOP(PREG, o); - SREG++; - GONext(); - END_PREFETCH(); - ENDOp(); - - OpW(unify_void_write, o); - CACHE_S(); - READ_IN_S(); - PREG = NEXTOP(PREG, o); - RESET_VARIABLE(S_SREG); - WRITEBACK_S(S_SREG+1); - ENDCACHE_S(); - GONextW(); - ENDOpW(); - - Op(unify_l_void, o); - PREG = NEXTOP(PREG, o); - GONext(); - ENDOp(); - - Op(unify_l_void_write, o); - PREG = NEXTOP(PREG, o); - RESET_VARIABLE(SREG); - GONext(); - ENDOp(); - - Op(unify_n_voids, os); - SREG += PREG->y_u.os.s; - PREG = NEXTOP(PREG, os); - GONext(); - ENDOp(); - - OpW(unify_n_voids_write, os); - BEGD(d0); - CACHE_S(); - d0 = PREG->y_u.os.s; - READ_IN_S(); - PREG = NEXTOP(PREG, os); - for (; d0 > 0; d0--) { - RESET_VARIABLE(S_SREG); - S_SREG++; - } - WRITEBACK_S(S_SREG); - ENDCACHE_S(); - ENDD(d0); - GONextW(); - ENDOpW(); - - Op(unify_l_n_voids, os); - PREG = NEXTOP(PREG, os); - GONext(); - ENDOp(); - - Op(unify_l_n_voids_write, os); - BEGD(d0); - d0 = PREG->y_u.os.s; - PREG = NEXTOP(PREG, os); - CACHE_S(); - READ_IN_S(); - for (; d0 > 0; d0--) { - RESET_VARIABLE(S_SREG); - S_SREG++; - } - ENDCACHE_S(); - ENDD(d0); - GONext(); - ENDOp(); - - Op(unify_atom, oc); - BEGD(d0); - BEGP(pt0); - pt0 = SREG++; - d0 = *pt0; - deref_head(d0, uatom_unk); - uatom_nonvar: - if (d0 != PREG->y_u.oc.c) { - FAIL(); - } - PREG = NEXTOP(PREG, oc); - GONext(); - - derefa_body(d0, pt0, uatom_unk, uatom_nonvar); - d0 = PREG->y_u.oc.c; - PREG = NEXTOP(PREG, oc); - Bind_Global(pt0, d0); - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - OpW(unify_atom_write, oc); - * SREG++ = PREG->y_u.oc.c; - PREG = NEXTOP(PREG, oc); - GONextW(); - ENDOpW(); - - Op(unify_l_atom, oc); - BEGD(d0); - BEGP(pt0); - pt0 = SREG; - d0 = *SREG; - deref_head(d0, ulatom_unk); - ulatom_nonvar: - if (d0 != PREG->y_u.oc.c) { - FAIL(); - } - PREG = NEXTOP(PREG, oc); - GONext(); - - derefa_body(d0, pt0, ulatom_unk, ulatom_nonvar); - d0 = PREG->y_u.oc.c; - PREG = NEXTOP(PREG, oc); - Bind_Global(pt0, d0); - GONext(); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(unify_l_atom_write, oc); - SREG[0] = PREG->y_u.oc.c; - PREG = NEXTOP(PREG, oc); - GONext(); - ENDOp(); - - Op(unify_n_atoms, osc); - { - register Int i = PREG->y_u.osc.s; /* not enough registers */ - - BEGD(d1); - d1 = PREG->y_u.osc.c; - for (; i > 0; i--) { - BEGD(d0); - BEGP(pt0); - pt0 = SREG++; - d0 = *pt0; - deref_head(d0, uatom_n_var); - uatom_n_nonvar: - if (d0 != d1) { - FAIL(); - } - continue; - - derefa_body(d0, pt0, uatom_n_var, uatom_n_nonvar); - Bind_Global(pt0, d1); - continue; - ENDP(pt0); - ENDD(d0); - } - ENDD(d1); - } - PREG = NEXTOP(PREG, osc); - GONext(); - ENDOp(); - - OpW(unify_n_atoms_write, osc); - BEGD(d0); - BEGD(d1); - d0 = PREG->y_u.osc.s; - d1 = PREG->y_u.osc.c; - /* write N atoms */ - CACHE_S(); - READ_IN_S(); - PREG = NEXTOP(PREG, osc); - for (; d0 > 0; d0--) - *S_SREG++ = d1; - WRITEBACK_S(S_SREG); - ENDCACHE_S(); - ENDD(d1); - ENDD(d0); - GONextW(); - ENDOpW(); - - Op(unify_float, od); - BEGD(d0); - BEGP(pt0); - pt0 = SREG++; - d0 = *pt0; - deref_head(d0, ufloat_unk); - ufloat_nonvar: - if (!IsApplTerm(d0)) { - FAIL(); - } - /* look inside term */ - BEGP(pt0); - pt0 = RepAppl(d0); - BEGD(d0); - d0 = *pt0; - if (d0 != (CELL)FunctorDouble) { - FAIL(); - } - ENDD(d0); - BEGP(pt1); - pt1 = PREG->y_u.od.d; - PREG = NEXTOP(PREG, od); - if ( - pt1[1] != pt0[1] -#if SIZEOF_DOUBLE == 2*SIZEOF_INT_P - || pt1[2] != pt0[2] -#endif - ) FAIL(); - ENDP(pt1); - ENDP(pt0); - GONext(); - - derefa_body(d0, pt0, ufloat_unk, ufloat_nonvar); - BEGD(d1); - d1 = AbsAppl(PREG->y_u.od.d); - PREG = NEXTOP(PREG, od); - Bind_Global(pt0, d1); - GONext(); - ENDD(d1); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - OpW(unify_float_write, od); - * SREG++ = AbsAppl(PREG->y_u.od.d); - PREG = NEXTOP(PREG, od); - GONextW(); - ENDOpW(); - - Op(unify_l_float, od); - BEGD(d0); - CACHE_S(); - READ_IN_S(); - d0 = *S_SREG; - deref_head(d0, ulfloat_unk); - ulfloat_nonvar: - if (!IsApplTerm(d0)) { - FAIL(); - } - BEGP(pt0); - pt0 = RepAppl(d0); - BEGD(d0); - d0 = *pt0; - if (d0 != (CELL)FunctorDouble) { - FAIL(); - } - ENDD(d0); - BEGP(pt1); - pt1 = PREG->y_u.od.d; - PREG = NEXTOP(PREG, od); - if ( - pt1[1] != pt0[1] -#if SIZEOF_DOUBLE == 2*SIZEOF_INT_P - || pt1[2] != pt0[2] -#endif - ) FAIL(); - ENDP(pt1); - ENDP(pt0); - GONext(); - - derefa_body(d0, S_SREG, ulfloat_unk, ulfloat_nonvar); - BEGD(d1); - d1 = AbsAppl(PREG->y_u.od.d); - PREG = NEXTOP(PREG, od); - Bind_Global(S_SREG, d1); - GONext(); - ENDD(d1); - ENDCACHE_S(); - ENDD(d0); - ENDOp(); - - Op(unify_l_float_write, od); - SREG[0] = AbsAppl(PREG->y_u.od.d); - PREG = NEXTOP(PREG, od); - GONext(); - ENDOp(); - - Op(unify_string, ou); - BEGD(d0); - BEGP(pt0); - pt0 = SREG++; - d0 = *pt0; - deref_head(d0, ustring_unk); - ustring_nonvar: - if (!IsApplTerm(d0)) { - FAIL(); - } - /* look inside term */ - BEGP(pt0); - pt0 = RepAppl(d0); - BEGD(d0); - d0 = *pt0; - if (d0 != (CELL)FunctorString) { - FAIL(); - } - ENDD(d0); - BEGP(pt1); - pt1 = RepAppl(PREG->y_u.ou.ut); - PREG = NEXTOP(PREG, ou); - if ( - pt1[1] != pt0[1] - || strcmp( (const char *)(pt1 + 2), (const char *)(pt0+2) ) - ) FAIL(); - ENDP(pt1); - ENDP(pt0); - GONext(); - - derefa_body(d0, pt0, ustring_unk, ustring_nonvar); - BEGD(d1); - d1 = PREG->y_u.ou.ut; - PREG = NEXTOP(PREG, ou); - Bind_Global(pt0, d1); - GONext(); - ENDD(d1); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(unify_l_string, ou); - BEGD(d0); - CACHE_S(); - READ_IN_S(); - d0 = *S_SREG; - deref_head(d0, ulstring_unk); - ulstring_nonvar: - if (!IsApplTerm(d0)) { - FAIL(); - } - BEGP(pt0); - pt0 = RepAppl(d0); - BEGD(d0); - d0 = *pt0; - if (d0 != (CELL)FunctorString) { - FAIL(); - } - ENDD(d0); - BEGP(pt1); - pt1 = RepAppl(PREG->y_u.ou.ut); - PREG = NEXTOP(PREG, ou); - if ( - pt1[1] != pt0[1] - || strcmp( (const char *)(pt1 + 2), (const char *)(pt0+2) ) - ) FAIL(); - ENDP(pt1); - ENDP(pt0); - GONext(); - - derefa_body(d0, S_SREG, ulstring_unk, ulstring_nonvar); - BEGD(d1); - d1 = PREG->y_u.ou.ut; - PREG = NEXTOP(PREG, ou); - Bind_Global(S_SREG, d1); - GONext(); - ENDD(d1); - ENDCACHE_S(); - ENDD(d0); - ENDOp(); - - Op(unify_longint, oi); - BEGD(d0); - BEGP(pt0); - pt0 = SREG++; - d0 = *pt0; - deref_head(d0, ulongint_unk); - ulongint_nonvar: - /* look inside term */ - if (!IsApplTerm(d0)) { - FAIL(); - } - BEGP(pt0); - pt0 = RepAppl(d0); - BEGD(d0); - d0 = *pt0; - if (d0 != (CELL)FunctorLongInt) { - FAIL(); - } - ENDD(d0); - BEGP(pt1); - pt1 = PREG->y_u.oi.i; - PREG = NEXTOP(PREG, oi); - if (pt1[1] != pt0[1]) FAIL(); - ENDP(pt1); - ENDP(pt0); - GONext(); - - derefa_body(d0, pt0, ulongint_unk, ulongint_nonvar); - BEGD(d1); - d1 = AbsAppl(PREG->y_u.oi.i); - PREG = NEXTOP(PREG, oi); - Bind_Global(pt0, d1); - GONext(); - ENDD(d1); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - OpW(unify_longint_write, oi); - * SREG++ = AbsAppl(PREG->y_u.oi.i); - PREG = NEXTOP(PREG, oi); - GONextW(); - ENDOpW(); - - Op(unify_l_longint, oi); - BEGD(d0); - CACHE_S(); - READ_IN_S(); - d0 = *S_SREG; - deref_head(d0, ullongint_unk); - ullongint_nonvar: - if (!IsApplTerm(d0)) { - FAIL(); - } - BEGP(pt0); - pt0 = RepAppl(d0); - BEGD(d0); - d0 = *pt0; - if (d0 != (CELL)FunctorLongInt) { - FAIL(); - } - ENDD(d0); - BEGP(pt1); - pt1 = PREG->y_u.oi.i; - PREG = NEXTOP(PREG, oi); - if (pt1[1] != pt0[1]) FAIL(); - ENDP(pt1); - ENDP(pt0); - GONext(); - - derefa_body(d0, S_SREG, ullongint_unk, ullongint_nonvar); - BEGD(d1); - d1 = AbsAppl(PREG->y_u.oi.i); - PREG = NEXTOP(PREG, oi); - Bind_Global(S_SREG, d1); - GONext(); - ENDD(d1); - ENDCACHE_S(); - ENDD(d0); - ENDOp(); - - Op(unify_l_longint_write, oi); - SREG[0] = AbsAppl(PREG->y_u.oi.i); - PREG = NEXTOP(PREG, oi); - GONext(); - ENDOp(); - - Op(unify_bigint, oN); -#ifdef USE_GMP - BEGD(d0); - BEGP(pt0); - pt0 = SREG++; - d0 = *pt0; - deref_head(d0, ubigint_unk); - ubigint_nonvar: - /* look inside term */ - if (!IsApplTerm(d0)) { - FAIL(); - } - BEGP(pt0); - pt0 = RepAppl(d0); - BEGD(d1); - d1 = *pt0; - if (d1 != (CELL)FunctorBigInt) - { - FAIL(); - } - ENDD(d1); - if (Yap_gmp_tcmp_big_big(d0,PREG->y_u.oN.b)) - FAIL(); - PREG = NEXTOP(PREG, oN); - ENDP(pt0); - GONext(); - - derefa_body(d0, pt0, ubigint_unk, ubigint_nonvar); - BEGD(d1); - d1 = PREG->y_u.oN.b; - PREG = NEXTOP(PREG, oN); - Bind_Global(pt0, d1); - GONext(); - ENDD(d1); - ENDP(pt0); - ENDD(d0); -#else - FAIL(); -#endif - ENDOp(); - - Op(unify_l_bigint, oN); -#ifdef USE_GMP - BEGD(d0); - CACHE_S(); - READ_IN_S(); - d0 = *S_SREG; - deref_head(d0, ulbigint_unk); - ulbigint_nonvar: - if (!IsApplTerm(d0)) { - FAIL(); - } - BEGP(pt0); - pt0 = RepAppl(d0); - BEGD(d0); - d0 = *pt0; - if (d0 != (CELL)FunctorBigInt) - { - FAIL(); - } - ENDD(d0); - if (Yap_gmp_tcmp_big_big(d0,PREG->y_u.oN.b)) - FAIL(); - PREG = NEXTOP(PREG, oN); - ENDP(pt0); - GONext(); - - derefa_body(d0, S_SREG, ulbigint_unk, ulbigint_nonvar); - BEGD(d1); - d1 = PREG->y_u.oN.b; - PREG = NEXTOP(PREG, oN); - Bind_Global(S_SREG, d1); - GONext(); - ENDD(d1); - ENDCACHE_S(); - ENDD(d0); -#else - FAIL(); -#endif - ENDOp(); - - Op(unify_dbterm, oD); - BEGD(d0); - BEGP(pt0); - pt0 = SREG++; - d0 = *pt0; - deref_head(d0, udbterm_unk); - udbterm_nonvar: - BEGD(d1); - /* we have met a preexisting dbterm */ - d1 = PREG->y_u.oD.D; - PREG = NEXTOP(PREG, oD); - UnifyBound(d0,d1); - ENDD(d1); - - derefa_body(d0, pt0, udbterm_unk, udbterm_nonvar); - BEGD(d1); - d1 = PREG->y_u.oD.D; - PREG = NEXTOP(PREG, oD); - Bind_Global(pt0, d1); - GONext(); - ENDD(d1); - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(unify_l_dbterm, oD); - BEGD(d0); - CACHE_S(); - READ_IN_S(); - d0 = *S_SREG; - deref_head(d0, uldbterm_unk); - uldbterm_nonvar: - BEGD(d1); - /* we have met a preexisting dbterm */ - d1 = PREG->y_u.oD.D; - PREG = NEXTOP(PREG, oD); - UnifyBound(d0,d1); - ENDD(d1); - - derefa_body(d0, S_SREG, uldbterm_unk, uldbterm_nonvar); - BEGD(d1); - d1 = PREG->y_u.oD.D; - PREG = NEXTOP(PREG, oD); - Bind_Global(S_SREG, d1); - GONext(); - ENDD(d1); - ENDCACHE_S(); - ENDD(d0); - ENDOp(); - - OpRW(unify_list, o); - *--SP = Unsigned(SREG + 1); - *--SP = READ_MODE; - BEGD(d0); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, ulist_unk); - ulist_nonvar: - if (!IsPairTerm(d0)) { - FAIL(); - } - /* we continue in read mode */ - START_PREFETCH(o); - SREG = RepPair(d0); - PREG = NEXTOP(PREG, o); - GONext(); - END_PREFETCH(); - - derefa_body(d0, pt0, ulist_unk, ulist_nonvar); - /* we enter write mode */ - START_PREFETCH_W(o); - CACHE_S(); - READ_IN_S(); - S_SREG = HR; - PREG = NEXTOP(PREG, o); - HR = S_SREG + 2; - d0 = AbsPair(S_SREG); - WRITEBACK_S(S_SREG); - ENDCACHE_S(); - Bind_Global(pt0, d0); - GONextW(); - END_PREFETCH_W(); - - ENDP(pt0); - - ENDD(d0); - ENDOpRW(); - - OpW(unify_list_write, o); - PREG = NEXTOP(PREG, o); - BEGD(d0); - d0 = AbsPair(HR); - CACHE_S(); - READ_IN_S(); - SP -= 2; - SP[0] = WRITE_MODE; - SP[1] = Unsigned(S_SREG + 1); - S_SREG[0] = d0; - S_SREG = HR; - HR = S_SREG + 2; - WRITEBACK_S(S_SREG); - ENDCACHE_S(); - GONextW(); - ENDD(d0); - ENDOpW(); - - OpRW(unify_l_list, o); - BEGD(d0); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, ullist_unk); - ullist_nonvar: - START_PREFETCH(o); - if (!IsPairTerm(d0)) { - FAIL(); - } - /* we continue in read mode */ - PREG = NEXTOP(PREG, o); - SREG = RepPair(d0); - GONext(); - END_PREFETCH(); - - derefa_body(d0, pt0, ullist_unk, ullist_nonvar); - /* we enter write mode */ - START_PREFETCH_W(o); - PREG = NEXTOP(PREG, o); - CACHE_S(); - READ_IN_S(); - S_SREG = HR; - HR = S_SREG + 2; - d0 = AbsPair(S_SREG); - WRITEBACK_S(S_SREG); - ENDCACHE_S(); - Bind_Global(pt0, d0); - GONextW(); - END_PREFETCH_W(); - - ENDP(pt0); - ENDD(d0); - ENDOpRW(); - - OpW(unify_l_list_write, o); - /* we continue in write mode */ - BEGD(d0); - d0 = AbsPair(HR); - PREG = NEXTOP(PREG, o); - CACHE_S(); - READ_IN_S(); - S_SREG[0] = d0; - S_SREG = HR; - HR = S_SREG + 2; - WRITEBACK_S(S_SREG); - ENDCACHE_S(); - GONextW(); - ENDD(d0); - ENDOpW(); - - OpRW(unify_struct, ofa); - *--SP = Unsigned(SREG + 1); - *--SP = READ_MODE; - BEGD(d0); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - START_PREFETCH(ofa); - deref_head(d0, ustruct_unk); - ustruct_nonvar: - /* we are in read mode */ - if (!IsApplTerm(d0)) { - FAIL(); - } - CACHE_S(); - READ_IN_S(); - /* we continue in read mode */ - S_SREG = RepAppl(d0); - /* just check functor */ - d0 = (CELL) (PREG->y_u.ofa.f); - if (*S_SREG != d0) { - FAIL(); - } - PREG = NEXTOP(PREG, ofa); - WRITEBACK_S(S_SREG+1); - ENDCACHE_S(); - GONext(); - END_PREFETCH(); - - derefa_body(d0, pt0, ustruct_unk, ustruct_nonvar); - /* Enter Write mode */ - START_PREFETCH_W(ofa); - /* set d1 to be the new structure we are going to create */ - BEGD(d1); - d1 = AbsAppl(HR); - /* we know the variable must be in the heap */ - Bind_Global(pt0, d1); - /* now, set pt0 to point to the heap where we are going to - * build our term */ - pt0 = HR; - ENDD(d1); - /* first, put the functor */ - d0 = (CELL) (PREG->y_u.ofa.f); - *pt0++ = d0; - HR = pt0 + PREG->y_u.ofa.a; - PREG = NEXTOP(PREG, ofa); - /* set SREG */ - SREG = pt0; - /* update H */ - GONextW(); - END_PREFETCH_W(); - - ENDP(pt0); - - ENDD(d0); - ENDOpRW(); - - OpW(unify_struct_write, ofa); - CACHE_S(); - READ_IN_S(); - *--SP = Unsigned(S_SREG + 1); - *--SP = WRITE_MODE; - /* we continue in write mode */ - BEGD(d0); - d0 = AbsAppl(HR); - S_SREG[0] = d0; - S_SREG = HR; - d0 = (CELL) (PREG->y_u.ofa.f); - *S_SREG++ = d0; - HR = S_SREG + PREG->y_u.ofa.a; - PREG = NEXTOP(PREG, ofa); - WRITEBACK_S(S_SREG); - ENDCACHE_S(); - ENDD(d0); - GONextW(); - ENDOpW(); - - OpRW(unify_l_struc, ofa); - BEGD(d0); - BEGP(pt0); - pt0 = SREG; - d0 = *pt0; - deref_head(d0, ulstruct_unk); - ulstruct_nonvar: - /* we are in read mode */ - START_PREFETCH(ofa); - if (!IsApplTerm(d0)) { - FAIL(); - } - /* we continue in read mode */ - SREG = RepAppl(d0); - /* just check functor */ - d0 = (CELL) (PREG->y_u.ofa.f); - if (*SREG++ != d0) { - FAIL(); - } - PREG = NEXTOP(PREG, ofa); - GONext(); - END_PREFETCH(); - - derefa_body(d0, pt0, ulstruct_unk, ulstruct_nonvar); - /* Enter Write mode */ - /* set d1 to be the new structure we are going to create */ - START_PREFETCH_W(ofa); - BEGD(d1); - d1 = AbsAppl(HR); - /* we know the variable must be in the heap */ - Bind_Global(pt0, d1); - /* now, set pt0 to point to the heap where we are going to - * build our term */ - pt0 = HR; - ENDD(d1); - /* first, put the functor */ - d0 = (CELL) (PREG->y_u.ofa.f); - *pt0++ = d0; - HR = pt0 + PREG->y_u.ofa.a; - PREG = NEXTOP(PREG, ofa); - /* set SREG */ - SREG = pt0; - /* update H */ - GONextW(); - END_PREFETCH_W(); - ENDP(pt0); - - ENDD(d0); - ENDOpRW(); - - OpW(unify_l_struc_write, ofa); - BEGD(d0); - d0 = AbsAppl(HR); - CACHE_S(); - READ_IN_S(); - S_SREG[0] = d0; - S_SREG = HR; - d0 = (CELL) (PREG->y_u.ofa.f); - *S_SREG++ = d0; - HR = S_SREG + PREG->y_u.ofa.a; - PREG = NEXTOP(PREG, ofa); - WRITEBACK_S(S_SREG); - ENDCACHE_S(); - ENDD(d0); - GONextW(); - ENDOpW(); - - - /************************************************************************\ - * Put Instructions * -\************************************************************************/ - - Op(put_x_var, xx); - BEGP(pt0); - pt0 = HR; - XREG(PREG->y_u.xx.xl) = Unsigned(pt0); - HR = pt0 + 1; - XREG(PREG->y_u.xx.xr) = Unsigned(pt0); - PREG = NEXTOP(PREG, xx); - RESET_VARIABLE(pt0); - ENDP(pt0); - GONext(); - ENDOp(); - - Op(put_y_var, yx); - BEGP(pt0); - pt0 = YREG + PREG->y_u.yx.y; - XREG(PREG->y_u.yx.x) = (CELL) pt0; - PREG = NEXTOP(PREG, yx); -#if defined(YAPOR_SBA) && defined(FROZEN_STACKS) - /* We must initialise a shared variable to point to the SBA */ - if (Unsigned((Int)(pt0)-(Int)(H_FZ)) > - Unsigned((Int)(B_FZ)-(Int)(H_FZ))) { - *pt0 = (CELL)STACK_TO_SBA(pt0); - } else -#endif /* YAPOR_SBA && FROZEN_STACKS */ - INITIALIZE_PERMVAR(pt0, (CELL)pt0); - ENDP(pt0); - GONext(); - ENDOp(); - - Op(put_x_val, xx); - BEGD(d0); - d0 = XREG(PREG->y_u.xx.xl); - XREG(PREG->y_u.xx.xr) = d0; - ENDD(d0); - PREG = NEXTOP(PREG, xx); - GONext(); - ENDOp(); - - Op(put_xx_val, xxxx); - BEGD(d0); - BEGD(d1); - d0 = XREG(PREG->y_u.xxxx.xl1); - d1 = XREG(PREG->y_u.xxxx.xl2); - XREG(PREG->y_u.xxxx.xr1) = d0; - XREG(PREG->y_u.xxxx.xr2) = d1; - ENDD(d1); - ENDD(d0); - PREG = NEXTOP(PREG, xxxx); - GONext(); - ENDOp(); - - Op(put_y_val, yx); - BEGD(d0); - d0 = YREG[PREG->y_u.yx.y]; -#ifdef YAPOR_SBA - if (d0 == 0) /* new variable */ - XREG(PREG->y_u.yx.x) = (CELL)(YREG+PREG->y_u.yx.y); - else -#endif - XREG(PREG->y_u.yx.x) = d0; - ENDD(d0); - PREG = NEXTOP(PREG, yx); - GONext(); - ENDOp(); - - Op(put_y_vals, yyxx); - ALWAYS_START_PREFETCH(yyxx); - BEGD(d0); - d0 = YREG[PREG->y_u.yyxx.y1]; -#ifdef YAPOR_SBA - if (d0 == 0) /* new variable */ - XREG(PREG->y_u.yyxx.x1) = (CELL)(YREG+PREG->y_u.yyxx.y1); - else -#endif - XREG(PREG->y_u.yyxx.x1) = d0; - ENDD(d0); - /* allow for some prefetching */ - PREG = NEXTOP(PREG, yyxx); - BEGD(d1); - d1 = YREG[PREVOP(PREG,yyxx)->y_u.yyxx.y2]; -#ifdef YAPOR_SBA - if (d1 == 0) /* new variable */ - XREG(PREVOP(PREG->y_u.yyxx,yyxx).x2) = (CELL)(YREG+PREG->y_u.yyxx.y2); - else -#endif - XREG(PREVOP(PREG,yyxx)->y_u.yyxx.x2) = d1; - ENDD(d1); - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - ENDOp(); - - Op(put_unsafe, yx); - BEGD(d0); - BEGP(pt0); - pt0 = YREG+PREG->y_u.yx.y; - d0 = *pt0; - deref_head(d0, punsafe_unk); - punsafe_nonvar: - XREG(PREG->y_u.yx.x) = d0; - PREG = NEXTOP(PREG, yx); - GONext(); - - derefa_body(d0, pt0, punsafe_unk, punsafe_nonvar); - /* d0 is a variable, check whether we need to globalise it */ - if (pt0 <= HR || pt0 >= YREG) { - /* variable is safe */ - XREG(PREG->y_u.yx.x) = Unsigned(pt0); - PREG = NEXTOP(PREG, yx); - GONext(); - } - else { - /* create a new Heap variable and bind our variable to it */ - Bind_Local(pt0, Unsigned(HR)); - XREG(PREG->y_u.yx.x) = (CELL) HR; - RESET_VARIABLE(HR); - HR++; - PREG = NEXTOP(PREG, yx); - GONext(); - } - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(put_atom, xc); - BEGD(d0); - d0 = PREG->y_u.xc.c; - XREG(PREG->y_u.xc.x) = d0; - PREG = NEXTOP(PREG, xc); - GONext(); - ENDD(d0); - ENDOp(); - - Op(put_dbterm, xD); - BEGD(d0); - d0 = PREG->y_u.xD.D; - XREG(PREG->y_u.xD.x) = d0; - PREG = NEXTOP(PREG, xD); - GONext(); - ENDD(d0); - ENDOp(); - - Op(put_bigint, xN); - BEGD(d0); - d0 = PREG->y_u.xN.b; - XREG(PREG->y_u.xN.x) = d0; - PREG = NEXTOP(PREG, xN); - GONext(); - ENDD(d0); - ENDOp(); - - Op(put_float, xd); - BEGD(d0); - d0 = AbsAppl(PREG->y_u.xd.d); - XREG(PREG->y_u.xd.x) = d0; - PREG = NEXTOP(PREG, xd); - GONext(); - ENDD(d0); - ENDOp(); - - Op(put_longint, xi); - BEGD(d0); - d0 = AbsAppl(PREG->y_u.xi.i); - XREG(PREG->y_u.xi.x) = d0; - PREG = NEXTOP(PREG, xi); - GONext(); - ENDD(d0); - ENDOp(); - - Op(put_list, x); - CACHE_S(); - READ_IN_S(); - S_SREG = HR; - HR += 2; - BEGD(d0); - d0 = AbsPair(S_SREG); - XREG(PREG->y_u.x.x) = d0; - PREG = NEXTOP(PREG, x); - ENDD(d0); - WRITEBACK_S(S_SREG); - ENDCACHE_S(); - GONext(); - ENDOp(); - - Op(put_struct, xfa); - BEGD(d0); - d0 = AbsAppl(HR); - XREG(PREG->y_u.xfa.x) = d0; - d0 = (CELL) (PREG->y_u.xfa.f); - *HR++ = d0; - SREG = HR; - HR += PREG->y_u.xfa.a; - ENDD(d0); - PREG = NEXTOP(PREG, xfa); - GONext(); - ENDOp(); - - /************************************************************************\ - * Write Instructions * -\************************************************************************/ - - Op(write_x_var, x); - XREG(PREG->y_u.x.x) = Unsigned(SREG); - PREG = NEXTOP(PREG, x); - RESET_VARIABLE(SREG); - SREG++; - GONext(); - ENDOp(); - - Op(write_void, e); - PREG = NEXTOP(PREG, e); - RESET_VARIABLE(SREG); - SREG++; - GONext(); - ENDOp(); - - Op(write_n_voids, s); - BEGD(d0); - d0 = PREG->y_u.s.s; - PREG = NEXTOP(PREG, s); - for (; d0 > 0; d0--) { - RESET_VARIABLE(SREG); - SREG++; - } - ENDD(d0); - GONext(); - ENDOp(); - - Op(write_y_var, y); - INITIALIZE_PERMVAR(YREG+PREG->y_u.y.y,Unsigned(SREG)); - PREG = NEXTOP(PREG, y); - RESET_VARIABLE(SREG); - SREG++; - GONext(); - ENDOp(); - - Op(write_x_val, x); - BEGD(d0); - d0 = XREG(PREG->y_u.x.x); - *SREG++ = d0; - ENDD(d0); - PREG = NEXTOP(PREG, x); - GONext(); - ENDOp(); - - Op(write_x_loc, x); - BEGD(d0); - d0 = XREG(PREG->y_u.x.x); - PREG = NEXTOP(PREG, x); - deref_head(d0, w_x_unk); - w_x_bound: - *SREG++ = d0; - GONext(); - - BEGP(pt0); - deref_body(d0, pt0, w_x_unk, w_x_bound); -#if defined(YAPOR_SBA) && defined(FROZEN_STACKS) - if (pt0 > HR && pt0<(CELL *)B_FZ) { -#else - if (pt0 > HR) { -#endif /* YAPOR_SBA && FROZEN_STACKS */ - /* local variable: let us bind it to the list */ -#ifdef FROZEN_STACKS /* TRAIL */ - Bind_Local(pt0, Unsigned(SREG)); -#else - TRAIL_LOCAL(pt0, Unsigned(SREG)); - *pt0 = Unsigned(SREG); -#endif /* FROZEN_STACKS */ - RESET_VARIABLE(SREG); - SREG++; - GONext(); - } - else { - *SREG++ = Unsigned(pt0); - GONext(); - } - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(write_y_val, y); - BEGD(d0); - d0 = YREG[PREG->y_u.y.y]; -#ifdef YAPOR_SBA - if (d0 == 0) /* new variable */ - *SREG++ = (CELL)(YREG+PREG->y_u.y.y); - else -#endif - *SREG++ = d0; - ENDD(d0); - PREG = NEXTOP(PREG, y); - GONext(); - ENDOp(); - - Op(write_y_loc, y); - BEGD(d0); - BEGP(pt0); - pt0 = YREG+PREG->y_u.y.y; - d0 = *pt0; - deref_head(d0, w_y_unk); - w_y_bound: - PREG = NEXTOP(PREG, y); - *SREG++ = d0; - GONext(); - - derefa_body(d0, pt0, w_y_unk, w_y_bound); - if (pt0 > HR -#if defined(YAPOR_SBA) && defined(FROZEN_STACKS) - && pt0<(CELL *)B_FZ -#endif /* YAPOR_SBA && FROZEN_STACKS */ - ) { - PREG = NEXTOP(PREG, y); - /* local variable: let us bind it to the list */ -#ifdef FROZEN_STACKS - Bind_Local(pt0, Unsigned(SREG)); -#else - *pt0 = Unsigned(SREG); - TRAIL_LOCAL(pt0, Unsigned(SREG)); -#endif /* FROZEN_STACKS */ - RESET_VARIABLE(SREG); - SREG++; - GONext(); - } else { - PREG = NEXTOP(PREG, y); - *SREG++ = Unsigned(pt0); - GONext(); - } - ENDP(pt0); - ENDD(d0); - ENDOp(); - - Op(write_atom, c); - BEGD(d0); - d0 = PREG->y_u.c.c; - *SREG++ = d0; - ENDD(d0); - PREG = NEXTOP(PREG, c); - GONext(); - ENDOp(); - - Op(write_bigint, N); - BEGD(d0); - d0 = PREG->y_u.N.b; - *SREG++ = d0; - ENDD(d0); - PREG = NEXTOP(PREG, N); - GONext(); - ENDOp(); - - Op(write_dbterm, D); - BEGD(d0); - d0 = PREG->y_u.D.D; - *SREG++ = d0; - ENDD(d0); - PREG = NEXTOP(PREG, D); - GONext(); - ENDOp(); - - Op(write_float, d); - BEGD(d0); - d0 = AbsAppl(PREG->y_u.d.d); - *SREG++ = d0; - ENDD(d0); - PREG = NEXTOP(PREG, d); - GONext(); - ENDOp(); - - Op(write_longint, i); - BEGD(d0); - d0 = AbsAppl(PREG->y_u.i.i); - *SREG++ = d0; - ENDD(d0); - PREG = NEXTOP(PREG, i); - GONext(); - ENDOp(); - - Op(write_n_atoms, sc); - BEGD(d0); - BEGD(d1); - d0 = PREG->y_u.sc.s; - d1 = PREG->y_u.sc.c; - for (; d0 > 0; d0--) - *SREG++ = d1; - ENDD(d1); - ENDD(d0); - PREG = NEXTOP(PREG, sc); - GONext(); - ENDOp(); - - Op(write_list, e); - BEGD(d0); - d0 = AbsPair(HR); - *SREG++ = d0; - /* I will not actually store the mode in the stack */ - SP[-1] = Unsigned(SREG); - SP[-2] = 1; /* Put instructions follow the main stream */ - SP -= 2; - SREG = HR; - HR += 2; - ENDD(d0); - PREG = NEXTOP(PREG, e); - GONext(); - ENDOp(); - - Op(write_l_list, e); - ALWAYS_START_PREFETCH(e); - PREG = NEXTOP(PREG, e); - BEGD(d0); - CACHE_S(); - READ_IN_S(); - d0 = AbsPair(HR); - *S_SREG = d0; - WRITEBACK_S(HR); - HR += 2; - ENDCACHE_S(); - ENDD(d0); - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - ENDOp(); - - Op(write_struct, fa); - BEGD(d0); - d0 = AbsAppl(HR); - *SREG++ = d0; - SP[-1] = Unsigned(SREG); - SP[-2] = 1; /* Put instructions follow the main stream */ - SP -= 2; - d0 = (CELL) (PREG->y_u.fa.f); - *HR++ = d0; - ENDD(d0); - BEGD(d0); - d0 = PREG->y_u.fa.a; - PREG = NEXTOP(PREG, fa); - SREG = HR; - HR += d0; - ENDD(d0); - GONext(); - ENDOp(); - - Op(write_l_struc, fa); - BEGD(d0); - d0 = AbsAppl(HR); - *SREG = d0; - d0 = (CELL) (PREG->y_u.fa.f); - *HR++ = d0; - SREG = HR; - ENDD(d0); - BEGD(d0); - d0 = PREG->y_u.fa.a; - PREG = NEXTOP(PREG, fa); - HR += d0; - ENDD(d0); - GONext(); - ENDOp(); - - /************************************************************************\ - * Save last unified struct or list * -\************************************************************************/ - - /* vitor: I think I should kill these two instructions, by expanding the - * othe instructions. - */ - - Op(save_pair_x, ox); - XREG(PREG->y_u.ox.x) = AbsPair(SREG); - PREG = NEXTOP(PREG, ox); - GONext(); - ENDOp(); - - OpW(save_pair_x_write, ox); - XREG(PREG->y_u.ox.x) = AbsPair(SREG); - PREG = NEXTOP(PREG, ox); - GONextW(); - ENDOpW(); - - Op(save_pair_y, oy); - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,AbsPair(SREG)); - PREG = NEXTOP(PREG, oy); - GONext(); - ENDOp(); - - OpW(save_pair_y_write, oy); - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,AbsPair(SREG)); - PREG = NEXTOP(PREG, oy); - GONextW(); - ENDOpW(); - - Op(save_appl_x, ox); - XREG(PREG->y_u.ox.x) = AbsAppl(SREG - 1); - PREG = NEXTOP(PREG, ox); - GONext(); - ENDOp(); - - OpW(save_appl_x_write, ox); - XREG(PREG->y_u.ox.x) = AbsAppl(SREG - 1); - PREG = NEXTOP(PREG, ox); - GONextW(); - ENDOpW(); - - Op(save_appl_y, oy); - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,AbsAppl(SREG-1)); - PREG = NEXTOP(PREG, oy); - GONext(); - ENDOp(); - - OpW(save_appl_y_write, oy); - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,AbsAppl(SREG-1)); - PREG = NEXTOP(PREG, oy); - GONextW(); - ENDOpW(); - - diff --git a/C/utilpreds.c b/C/utilpreds.c index 11a941490..1bf1667f6 100644 --- a/C/utilpreds.c +++ b/C/utilpreds.c @@ -4559,7 +4559,7 @@ p_is_list( USES_REGS1 ) return Yap_IsListTerm(Deref(ARG1)); } -int +bool Yap_IsListOrPartialListTerm(Term t) { Term *tailp, tail; diff --git a/C/write.c b/C/write.c index 536a73b3a..ec7df439a 100644 --- a/C/write.c +++ b/C/write.c @@ -556,7 +556,7 @@ write_quoted(wchar_t ch, wchar_t quote, wrf stream) char esc[8]; /* last backslash in ISO mode */ - snprintf(esc, 7, "\\%03o\\", (unsigned int)ch); + sprintf(esc, "\\%03o\\", ch); wrputs(esc, stream); } } diff --git a/H/YapHandles.h b/H/YapHandles.h index 784231882..43c7ce602 100755 --- a/H/YapHandles.h +++ b/H/YapHandles.h @@ -112,7 +112,7 @@ Yap_PutInSlot(yhandle_t slot, Term t USES_REGS) /// @brief allocate n empty new slots static inline yhandle_t -Yap_NewSlots(size_t n USES_REGS) +Yap_NewSlots(int n USES_REGS) { yhandle_t old_slots = IntOfTerm(ASP[0]), oldn = n; while (n > 0) { @@ -132,7 +132,7 @@ Yap_countSlots( USES_REGS1 ) } /// @brief create a new slot with term t -static inline yhandle_t +static inline Int Yap_InitSlot(Term t USES_REGS) { yhandle_t old_slots = IntOfTerm(ASP[0]); @@ -143,8 +143,8 @@ Yap_InitSlot(Term t USES_REGS) } /// @brief Succeeds if it is to recover the space allocated for $n$ contiguos slots starting at topSlot. -static inline bool -Yap_RecoverSlots(size_t n, yhandle_t topSlot USES_REGS) +static inline int +Yap_RecoverSlots(int n, yhandle_t topSlot USES_REGS) { yhandle_t old_slots = IntOfTerm(ASP[0]), new_slots = old_slots-n; @@ -152,10 +152,10 @@ Yap_RecoverSlots(size_t n, yhandle_t topSlot USES_REGS) return FALSE; } if (ASP+1 != LCL0+topSlot) - return false; + return FALSE; ASP += n; ASP[new_slots+1] = ASP[0] = MkIntTerm(new_slots); - return true; + return TRUE; } #endif diff --git a/H/Yapproto.h b/H/Yapproto.h index 01ba66fe4..66d327dcf 100755 --- a/H/Yapproto.h +++ b/H/Yapproto.h @@ -115,7 +115,7 @@ Int YAP_Execute(struct pred_entry *, CPredicate); Int YAP_ExecuteFirst(struct pred_entry *, CPredicate); Int YAP_ExecuteNext(struct pred_entry *, CPredicate); Int YAP_ExecuteOnCut(struct pred_entry *, CPredicate, struct cut_c_str *); -extern Int Yap_RunGoalOnce(Term); +Int YAP_RunGoalOnce(Term); #endif /* cdmgr.c */ @@ -133,10 +133,8 @@ void Yap_BuildMegaClause(struct pred_entry *); void Yap_EraseMegaClause(yamop *,struct pred_entry *); void Yap_ResetConsultStack(void); void Yap_AssertzClause(struct pred_entry *, yamop *); -void Yap_HidePred(struct pred_entry *pe, bool offline); +void Yap_HidePred(struct pred_entry *pe); int Yap_SetNoTrace(char *name, UInt arity, Term tmod); -struct pred_entry* Yap_getPred(Term t, Term tmod, char *msg); -struct pred_entry* Yap_Pred(Term t, Term tmod, char *msg); /* cmppreds.c */ Int Yap_compare_terms(Term,Term); @@ -169,8 +167,8 @@ Yap_PrintPredName( struct pred_entry *ap ); #endif void Yap_RestartYap(int); void Yap_exit(int); -yamop *Yap_Error(yap_error_number,Term, const char *msg, ...); -yamop *Yap_NilError(yap_error_number, const char *msg, ...); +yamop *Yap_Error(yap_error_number,Term,char *msg, ...); +yamop *Yap_NilError(yap_error_number,char *msg, ...); int Yap_HandleError( const char *msg, ... ); int Yap_SWIHandleError( const char *, ... ); @@ -421,7 +419,7 @@ size_t Yap_ExportTerm(Term, char *, size_t, UInt); size_t Yap_SizeOfExportedTerm(char *); Term Yap_ImportTerm(char *); int Yap_IsListTerm(Term); -int Yap_IsListOrPartialListTerm(Term); +bool Yap_IsListOrPartialListTerm(Term); Term Yap_CopyTermNoShare(Term); int Yap_SizeGroundTerm(Term, int); int Yap_IsGroundTerm(Term); @@ -430,6 +428,7 @@ void Yap_InitUtilCPreds(void); Int Yap_TermHash(Term, Int, Int, int); Int Yap_NumberVars(Term, Int, int); Term Yap_TermVariables( Term t, UInt arity USES_REGS ); +int Yap_IsListOrPartialListTerm( UInt arity USES_REGS ); Term Yap_UnNumberTerm(Term, int); Int Yap_SkipList(Term *, Term **); /* yap.c */ diff --git a/H/Yatom.h b/H/Yatom.h index 7891e082f..f78ca05bc 100755 --- a/H/Yatom.h +++ b/H/Yatom.h @@ -651,39 +651,39 @@ IsValProperty (int flags) don't forget to also add in qly.h */ -#define DiscontiguousPredFlag ((pred_flags_t)0x1000000000LL) /* predicates whose clauses may be all-over the place.. */ -#define SysExportPredFlag ((pred_flags_t)0x800000000LL) +#define DiscontiguousPredFlag ((pred_flags_t)0x1000000000) /* predicates whose clauses may be all-over the place.. */ +#define SysExportPredFlag ((pred_flags_t)0x800000000) /* reuse export list to prolog module. */ -#define NoTracePredFlag ((pred_flags_t)0x400000000LL) /* cannot trace this predicate */ -#define NoSpyPredFlag ((pred_flags_t)0x200000000LL) /* cannot spy this predicate */ -#define QuasiQuotationPredFlag ((pred_flags_t)0x100000000LL) /* SWI-like quasi quotations */ -#define MegaClausePredFlag ((pred_flags_t)0x80000000LL) /* predicate is implemented as a mega-clause */ -#define ThreadLocalPredFlag ((pred_flags_t)0x40000000LL) /* local to a thread */ -#define MultiFileFlag ((pred_flags_t)0x20000000LL) /* is multi-file */ -#define UserCPredFlag ((pred_flags_t)0x10000000LL) /* CPred defined by the user */ -#define LogUpdatePredFlag ((pred_flags_t)0x08000000LL) /* dynamic predicate with log. upd. sem. */ -#define InUsePredFlag ((pred_flags_t)0x04000000LL) /* count calls to pred */ -#define CountPredFlag ((pred_flags_t)0x02000000LL) /* count calls to pred */ -#define HiddenPredFlag ((pred_flags_t)0x01000000LL) /* invisible predicate */ -#define CArgsPredFlag ((pred_flags_t)0x00800000LL) /* SWI-like C-interface pred. */ -#define SourcePredFlag ((pred_flags_t)0x00400000LL) /* static predicate with source declaration */ -#define MetaPredFlag ((pred_flags_t)0x00200000LL) /* predicate subject to a meta declaration */ -#define SyncPredFlag ((pred_flags_t)0x00100000LL) /* has to synch before it can execute */ -#define NumberDBPredFlag ((pred_flags_t)0x00080000LL) /* entry for a number key */ -#define AtomDBPredFlag ((pred_flags_t)0x00040000LL) /* entry for an atom key */ -#define GoalExPredFlag ((pred_flags_t)0x00020000LL) /* predicate that is called by goal_expand */ -#define TestPredFlag ((pred_flags_t)0x00010000LL) /* is a test (optim. comit) */ -#define AsmPredFlag ((pred_flags_t)0x00008000LL) /* inline */ -#define StandardPredFlag ((pred_flags_t)0x00004000LL) /* system predicate */ -#define DynamicPredFlag ((pred_flags_t)0x00002000LL) /* dynamic predicate */ -#define CPredFlag ((pred_flags_t)0x00001000LL) /* written in C */ -#define SafePredFlag ((pred_flags_t)0x00000800LL) /* does not alter arguments */ -#define CompiledPredFlag ((pred_flags_t)0x00000400LL) /* is static */ -#define IndexedPredFlag ((pred_flags_t)0x00000200LL) /* has indexing code */ -#define SpiedPredFlag ((pred_flags_t)0x00000100LL) /* is a spy point */ -#define BinaryPredFlag ((pred_flags_t)0x00000080LL) /* test predicate */ -#define TabledPredFlag ((pred_flags_t)0x00000040LL) /* is tabled */ -#define SequentialPredFlag ((pred_flags_t)0x00000020LL) /* may not create parallel choice points! */ +#define NoTracePredFlag ((pred_flags_t)0x400000000) /* cannot trace this predicate */ +#define NoSpyPredFlag ((pred_flags_t)0x200000000) /* cannot spy this predicate */ +#define QuasiQuotationPredFlag ((pred_flags_t)0x100000000) /* SWI-like quasi quotations */ +#define MegaClausePredFlag ((pred_flags_t)0x80000000) /* predicate is implemented as a mega-clause */ +#define ThreadLocalPredFlag ((pred_flags_t)0x40000000) /* local to a thread */ +#define MultiFileFlag ((pred_flags_t)0x20000000) /* is multi-file */ +#define UserCPredFlag ((pred_flags_t)0x10000000) /* CPred defined by the user */ +#define LogUpdatePredFlag ((pred_flags_t)0x08000000) /* dynamic predicate with log. upd. sem. */ +#define InUsePredFlag ((pred_flags_t)0x04000000) /* count calls to pred */ +#define CountPredFlag ((pred_flags_t)0x02000000) /* count calls to pred */ +#define HiddenPredFlag ((pred_flags_t)0x01000000) /* invisible predicate */ +#define CArgsPredFlag ((pred_flags_t)0x00800000) /* SWI-like C-interface pred. */ +#define SourcePredFlag ((pred_flags_t)0x00400000) /* static predicate with source declaration */ +#define MetaPredFlag ((pred_flags_t)0x00200000) /* predicate subject to a meta declaration */ +#define SyncPredFlag ((pred_flags_t)0x00100000) /* has to synch before it can execute */ +#define NumberDBPredFlag ((pred_flags_t)0x00080000) /* entry for a number key */ +#define AtomDBPredFlag ((pred_flags_t)0x00040000) /* entry for an atom key */ +#define GoalExPredFlag ((pred_flags_t)0x00020000) /* predicate that is called by goal_expand */ +#define TestPredFlag ((pred_flags_t)0x00010000) /* is a test (optim. comit) */ +#define AsmPredFlag ((pred_flags_t)0x00008000) /* inline */ +#define StandardPredFlag ((pred_flags_t)0x00004000) /* system predicate */ +#define DynamicPredFlag ((pred_flags_t)0x00002000) /* dynamic predicate */ +#define CPredFlag ((pred_flags_t)0x00001000) /* written in C */ +#define SafePredFlag ((pred_flags_t)0x00000800) /* does not alter arguments */ +#define CompiledPredFlag ((pred_flags_t)0x00000400) /* is static */ +#define IndexedPredFlag ((pred_flags_t)0x00000200) /* has indexing code */ +#define SpiedPredFlag ((pred_flags_t)0x00000100) /* is a spy point */ +#define BinaryPredFlag ((pred_flags_t)0x00000080) /* test predicate */ +#define TabledPredFlag ((pred_flags_t)0x00000040) /* is tabled */ +#define SequentialPredFlag ((pred_flags_t)0x00000020) /* may not create parallel choice points! */ #define ProfiledPredFlag ((pred_flags_t)0x00000010) /* pred is being profiled */ #define BackCPredFlag ((pred_flags_t)0x00000008) /* Myddas Imported pred */ #define ModuleTransparentPredFlag ((pred_flags_t)0x00000004) /* ModuleTransparent pred */ @@ -1865,58 +1865,6 @@ PredPropByAtomAndMod (Atom at, Term cur_mod) return Yap_NewPredPropByAtom (ae, cur_mod); } -// -// report arity, name, and module for a predicate. -// -INLINE_ONLY inline EXTERN - UInt IndicatorOfPred(PredEntry * ap, const char **name, const char **module); - -INLINE_ONLY inline EXTERN - UInt IndicatorOfPred(PredEntry * ap, const char **name, const char **module) -{ - if (module) { - Term tmod = ap->ModuleOfPred; - if (!tmod) *module = "prolog"; - else *module = RepAtom(AtomOfTerm( tmod ))->StrOfAE; - } - if (ap->ModuleOfPred == IDB_MODULE) { - if (ap->PredFlags & NumberDBPredFlag ) { - if (name) { - Int id = ap->src.IndxId; - char *s = (char *)malloc(16); - snprintf(s, 15, Int_FORMAT, id); - *name = s; - } - return 0; - } else if (ap->PredFlags & AtomDBPredFlag) { - if (name) { - Atom At = (Atom)ap->FunctorOfPred; - *name = RepAtom(At)->StrOfAE; - } - return 0; - } else { - Functor f = ap->FunctorOfPred; - if (name) { - Atom At = NameOfFunctor(f); - *name = RepAtom(At)->StrOfAE; - } - return ArityOfFunctor(f); - } - } else { - if (name) { - if (ap->ArityOfPE == 0) { - Atom At = (Atom)ap->FunctorOfPred; - *name = RepAtom(At)->StrOfAE; - } else { - Functor f = ap->FunctorOfPred; - Atom At = NameOfFunctor(f); - *name = RepAtom(At)->StrOfAE; - } - } - return ap->ArityOfPE; - } -} - #if DEBUG_PELOCKING #define PELOCK(I,Z) \ { LOCK((Z)->PELock); (Z)->StatisticsForPred.NOfEntries=(I);(Z)->StatisticsForPred.NOfHeadSuccesses=pthread_self(); } diff --git a/H/eval.h b/H/eval.h index 854a4e223..9b3448c9f 100644 --- a/H/eval.h +++ b/H/eval.h @@ -489,8 +489,7 @@ Term Yap_gmp_exp_big_big(Term,Term); Term Yap_gmp_gcd_int_big(Int,Term); Term Yap_gmp_gcd_big_big(Term,Term); -Term Yap_gmp_big_from_64bits(int64_t); -int64_t Yap_gmp_big_to_64bits(Term); +Term Yap_gmp_big_from_64bits(YAP_LONG_LONG); Term Yap_gmp_float_to_big(Float); Term Yap_gmp_float_to_rational(Float); @@ -539,12 +538,12 @@ int Yap_term_to_existing_rat(Term, MP_RAT *); void Yap_gmp_set_bit(Int i, Term t); #endif -#define Yap_MkInt64Term(i) __Yap_MkInt64Term((i) PASS_REGS) +#define Yap_Mk64IntegerTerm(i) __Yap_Mk64IntegerTerm((i) PASS_REGS) -INLINE_ONLY inline EXTERN Term __Yap_MkInt64Term(YAP_LONG_LONG USES_REGS); +INLINE_ONLY inline EXTERN Term __Yap_Mk64IntegerTerm(YAP_LONG_LONG USES_REGS); INLINE_ONLY inline EXTERN Term -__Yap_MkInt64Term(YAP_LONG_LONG i USES_REGS) +__Yap_Mk64IntegerTerm(YAP_LONG_LONG i USES_REGS) { if (i <= Int_MAX && i >= Int_MIN) { return MkIntegerTerm((Int)i); @@ -557,37 +556,6 @@ __Yap_MkInt64Term(YAP_LONG_LONG i USES_REGS) } } -INLINE_ONLY inline EXTERN bool IsInt64Term (Term); - -INLINE_ONLY inline EXTERN bool -IsInt64Term (Term t) -{ - CELL *pt; - return IsIntegerTerm (t) - ||(FunctorOfTerm (t) == FunctorBigInt && - ( pt = RepAppl(t)) && - pt[1] == BIG_INT && - mpz_sizeinbase(Yap_BigIntOfTerm(t), 2) < 64); -} - -#define Yap_Int64OfTerm(i) __Yap_Int64OfTerm((i) PASS_REGS) - -INLINE_ONLY inline EXTERN int64_t __Yap_Int64OfTerm(Term t USES_REGS); - -INLINE_ONLY inline EXTERN int64_t -__Yap_Int64OfTerm( Term t USES_REGS) -{ - if (IsIntegerTerm( t )) { - return IntegerOfTerm(t); - } else { -#if USE_GMP - return Yap_gmp_big_to_64bits(t); -#else - return 0; -#endif - } -} - #if __clang__ && FALSE /* not in OSX yet */ #define DO_ADD() if (__builtin_sadd_overflow( i1, i2, & z ) ) { goto overflow; } diff --git a/H/qly.h b/H/qly.h index 04df20f47..273a757ad 100644 --- a/H/qly.h +++ b/H/qly.h @@ -101,14 +101,9 @@ typedef enum { QLY_ATOM_BLOB = 17 } qlf_tag_t; -#define STATIC_PRED_FLAGS (HiddenPredFlag|AtomDBPredFlag|NumberDBPredFlag|MetaPredFlag|SyncPredFlag|SYSTEM_PRED_FLAGS|PROP_PRED_FLAGS|SWI_PRED_FLAGS|EXTRA_PRED_FLAGS) - +#define STATIC_PRED_FLAGS (SourcePredFlag|DynamicPredFlag|LogUpdatePredFlag|CompiledPredFlag|MultiFileFlag|TabledPredFlag|MegaClausePredFlag|CountPredFlag|ProfiledPredFlag|ThreadLocalPredFlag|AtomDBPredFlag|ModuleTransparentPredFlag|NumberDBPredFlag|MetaPredFlag|SyncPredFlag|BackCPredFlag) #define EXTRA_PRED_FLAGS (QuasiQuotationPredFlag|NoTracePredFlag|NoSpyPredFlag) -#define PROP_PRED_FLAGS (SourcePredFlag|DynamicPredFlag|LogUpdatePredFlag|CompiledPredFlag|MultiFileFlag|TabledPredFlag|MegaClausePredFlag|ModuleTransparentPredFlag|CountPredFlag|ProfiledPredFlag|ThreadLocalPredFlag) - -#define SWI_PRED_FLAGS (SWIEnvPredFlag|CArgsPredFlag) - #define SYSTEM_PRED_FLAGS (BackCPredFlag|UserCPredFlag|CArgsPredFlag|AsmPredFlag|CPredFlag|BinaryPredFlag) #define CHECK(F) { size_t r = (F); if (!r) return r; } diff --git a/JIT/HPP/EnvironmentInit.h b/JIT/HPP/EnvironmentInit.h index 253806cfe..8138f2efb 100644 --- a/JIT/HPP/EnvironmentInit.h +++ b/JIT/HPP/EnvironmentInit.h @@ -13,19 +13,19 @@ extern Environment ExpEnv; #if YAP_JIT -Int Get_N_Cores(void); -X_API Int Init_Analysis_Struc(void); -X_API Int Init_Transform_Struc(void); -X_API Int Init_Codegen_Struc(void); -X_API Int Init_Config_Struc(void); +Int STD_PROTO(Get_N_Cores,(void)); +X_API Int STD_PROTO(Init_Analysis_Struc,(void)); +X_API Int STD_PROTO(Init_Transform_Struc,(void)); +X_API Int STD_PROTO(Init_Codegen_Struc,(void)); +X_API Int STD_PROTO(Init_Config_Struc,(void)); #if YAP_STAT_PREDS -X_API Int Init_Stats_Struc(void); +X_API Int STD_PROTO(Init_Stats_Struc, (void)); #endif #endif /* YAP_JIT */ #if YAP_DBG_PREDS -X_API Int Init_Debug_Struc(void); +X_API Int STD_PROTO(Init_Debug_Struc,(void)); #endif -X_API Int YAP_Init_ExpEnv(void); +X_API Int STD_PROTO(YAP_Init_ExpEnv,(void)); #if YAP_JIT Int @@ -39,11 +39,11 @@ Get_N_Cores() { size_t len = 4; uint32_t count; - nm[0] = CTL_HW; nm[1] = HW_AVAILCPU; + nm[0] = CTL_HW; nm[1] = HRW_AVAILCPU; sysctl(nm, 2, &count, &len, NULL, 0); if(count < 1) { - nm[1] = HW_NCPU; + nm[1] = HRW_NCPU; sysctl(nm, 2, &count, &len, NULL, 0); if(count < 1) { count = 1; } } @@ -119,7 +119,7 @@ Init_Config_Struc() ExpEnv.config_struc.frequency_type = COUNTER; ExpEnv.config_struc.frequency_bound = 1024.0; ExpEnv.config_struc.profiling_startp = 0.72; - ExpEnv.config_struc.mainclause_ty = HOT_AND_CALLEE; + ExpEnv.config_struc.mainclause_ty = HROT_AND_CALLEE; ExpEnv.config_struc.torecompile = 1; } else { diff --git a/JIT/HPP/IsGround.h b/JIT/HPP/IsGround.h index b7c4fe4c7..a35001958 100644 --- a/JIT/HPP/IsGround.h +++ b/JIT/HPP/IsGround.h @@ -9,2409 +9,2409 @@ IsGround(yamop* _p) { n += 1; switch(op){ case _Ystop : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _Nstop : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _try_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _retry_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _trust_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _enter_profiling : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _retry_profiled : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _profiled_retry_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _profiled_trust_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _profiled_retry_logical : - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _profiled_trust_logical : - _p = ((yamop *)(&((_p)->y_u.OtILl.next))); + _p = ((yamop *)(&((_p)->u.OtILl.next))); break; case _count_call : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _count_retry : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _count_retry_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _count_trust_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _count_retry_logical : - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _count_trust_logical : - _p = ((yamop *)(&((_p)->y_u.OtILl.next))); + _p = ((yamop *)(&((_p)->u.OtILl.next))); break; case _lock_lu : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _unlock_lu : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _alloc_for_logical_pred : - _p = ((yamop *)(&((_p)->y_u.L.next))); + _p = ((yamop *)(&((_p)->u.L.next))); break; case _copy_idb_term : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _unify_idb_term : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _ensure_space : - _p = ((yamop *)(&((_p)->y_u.Osbpa.next))); + _p = ((yamop *)(&((_p)->u.Osbpa.next))); break; case _spy_or_trymark : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _try_and_mark : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _count_retry_and_mark : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _profiled_retry_and_mark : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _retry_and_mark : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _trust_fail : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _op_fail : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _cut : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); c = 1; break; case _cut_t : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); c = 1; break; case _cut_e : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); c = 1; break; case _save_b_x : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _save_b_y : - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _commit_b_x : - _p = ((yamop *)(&((_p)->y_u.xps.next))); + _p = ((yamop *)(&((_p)->u.xps.next))); break; case _commit_b_y : - _p = ((yamop *)(&((_p)->y_u.yps.next))); + _p = ((yamop *)(&((_p)->u.yps.next))); break; case _execute : - _p = ((yamop *)(&((_p)->y_u.pp.next))); + _p = ((yamop *)(&((_p)->u.pp.next))); l = (CELL)_p; if (n > 5) return 0; break; case _dexecute : - _p = ((yamop *)(&((_p)->y_u.pp.next))); + _p = ((yamop *)(&((_p)->u.pp.next))); l = (CELL)_p; if (n > 5) return 0; break; case _fcall : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); if (c || n <= 3) { c = 0; break; } return 0; case _call : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); if (c || n <= 3) { c = 0; break; } return 0; case _procceed : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); l = (CELL)_p; break; case _allocate : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _deallocate : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; #ifdef BEAM case _retry_eam : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif #ifdef BEAM case _run_eam : - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; #endif case _get_x_var : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _get_y_var : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _get_yy_var : - _p = ((yamop *)(&((_p)->y_u.yyxx.next))); + _p = ((yamop *)(&((_p)->u.yyxx.next))); break; case _get_x_val : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _get_y_val : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _get_atom : - _p = ((yamop *)(&((_p)->y_u.xc.next))); + _p = ((yamop *)(&((_p)->u.xc.next))); break; case _get_2atoms : - _p = ((yamop *)(&((_p)->y_u.cc.next))); + _p = ((yamop *)(&((_p)->u.cc.next))); break; case _get_3atoms : - _p = ((yamop *)(&((_p)->y_u.ccc.next))); + _p = ((yamop *)(&((_p)->u.ccc.next))); break; case _get_4atoms : - _p = ((yamop *)(&((_p)->y_u.cccc.next))); + _p = ((yamop *)(&((_p)->u.cccc.next))); break; case _get_5atoms : - _p = ((yamop *)(&((_p)->y_u.ccccc.next))); + _p = ((yamop *)(&((_p)->u.ccccc.next))); break; case _get_6atoms : - _p = ((yamop *)(&((_p)->y_u.cccccc.next))); + _p = ((yamop *)(&((_p)->u.cccccc.next))); break; case _get_list : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _get_struct : - _p = ((yamop *)(&((_p)->y_u.xfa.next))); + _p = ((yamop *)(&((_p)->u.xfa.next))); break; case _get_float : - _p = ((yamop *)(&((_p)->y_u.xd.next))); + _p = ((yamop *)(&((_p)->u.xd.next))); break; case _get_longint : - _p = ((yamop *)(&((_p)->y_u.xi.next))); + _p = ((yamop *)(&((_p)->u.xi.next))); break; case _get_bigint : - _p = ((yamop *)(&((_p)->y_u.xN.next))); + _p = ((yamop *)(&((_p)->u.xN.next))); break; case _get_dbterm : - _p = ((yamop *)(&((_p)->y_u.xD.next))); + _p = ((yamop *)(&((_p)->u.xD.next))); break; case _glist_valx : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _glist_valy : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _gl_void_varx : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _gl_void_vary : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _gl_void_valx : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _gl_void_valy : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _unify_x_var : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_x_var_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_l_x_var : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_l_x_var_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_x_var2 : - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _unify_x_var2_write : - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _unify_l_x_var2 : - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _unify_l_x_var2_write : - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _unify_y_var : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_y_var_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_l_y_var : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_l_y_var_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_x_val : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_x_val_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_l_x_val : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_l_x_val_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_y_val : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_y_val_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_l_y_val : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_l_y_val_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_x_loc : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_x_loc_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_l_x_loc : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_l_x_loc_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_y_loc : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_y_loc_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_l_y_loc : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_l_y_loc_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_void : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_void_write : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_l_void : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_l_void_write : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_n_voids : - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _unify_n_voids_write : - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _unify_l_n_voids : - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _unify_l_n_voids_write : - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _unify_atom : - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _unify_atom_write : - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _unify_l_atom : - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _unify_l_atom_write : - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _unify_n_atoms : - _p = ((yamop *)(&((_p)->y_u.osc.next))); + _p = ((yamop *)(&((_p)->u.osc.next))); break; case _unify_n_atoms_write : - _p = ((yamop *)(&((_p)->y_u.osc.next))); + _p = ((yamop *)(&((_p)->u.osc.next))); break; case _unify_float : - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _unify_float_write : - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _unify_l_float : - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _unify_l_float_write : - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _unify_longint : - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _unify_longint_write : - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _unify_l_longint : - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _unify_l_longint_write : - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _unify_bigint : - _p = ((yamop *)(&((_p)->y_u.oN.next))); + _p = ((yamop *)(&((_p)->u.oN.next))); break; case _unify_l_bigint : - _p = ((yamop *)(&((_p)->y_u.oN.next))); + _p = ((yamop *)(&((_p)->u.oN.next))); break; case _unify_dbterm : - _p = ((yamop *)(&((_p)->y_u.oD.next))); + _p = ((yamop *)(&((_p)->u.oD.next))); break; case _unify_l_dbterm : - _p = ((yamop *)(&((_p)->y_u.oD.next))); + _p = ((yamop *)(&((_p)->u.oD.next))); break; case _unify_list : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_list_write : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_l_list : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_l_list_write : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_struct : - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _unify_struct_write : - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _unify_l_struc : - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _unify_l_struc_write : - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _put_x_var : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _put_y_var : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _put_x_val : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _put_xx_val : - _p = ((yamop *)(&((_p)->y_u.xxxx.next))); + _p = ((yamop *)(&((_p)->u.xxxx.next))); break; case _put_y_val : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _put_y_vals : - _p = ((yamop *)(&((_p)->y_u.yyxx.next))); + _p = ((yamop *)(&((_p)->u.yyxx.next))); break; case _put_unsafe : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _put_atom : - _p = ((yamop *)(&((_p)->y_u.xc.next))); + _p = ((yamop *)(&((_p)->u.xc.next))); break; case _put_dbterm : - _p = ((yamop *)(&((_p)->y_u.xD.next))); + _p = ((yamop *)(&((_p)->u.xD.next))); break; case _put_bigint : - _p = ((yamop *)(&((_p)->y_u.xN.next))); + _p = ((yamop *)(&((_p)->u.xN.next))); break; case _put_float : - _p = ((yamop *)(&((_p)->y_u.xd.next))); + _p = ((yamop *)(&((_p)->u.xd.next))); break; case _put_longint : - _p = ((yamop *)(&((_p)->y_u.xi.next))); + _p = ((yamop *)(&((_p)->u.xi.next))); break; case _put_list : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _put_struct : - _p = ((yamop *)(&((_p)->y_u.xfa.next))); + _p = ((yamop *)(&((_p)->u.xfa.next))); break; case _write_x_var : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _write_void : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _write_n_voids : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _write_y_var : - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _write_x_val : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _write_x_loc : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _write_y_val : - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _write_y_loc : - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _write_atom : - _p = ((yamop *)(&((_p)->y_u.c.next))); + _p = ((yamop *)(&((_p)->u.c.next))); break; case _write_bigint : - _p = ((yamop *)(&((_p)->y_u.N.next))); + _p = ((yamop *)(&((_p)->u.N.next))); break; case _write_dbterm : - _p = ((yamop *)(&((_p)->y_u.D.next))); + _p = ((yamop *)(&((_p)->u.D.next))); break; case _write_float : - _p = ((yamop *)(&((_p)->y_u.d.next))); + _p = ((yamop *)(&((_p)->u.d.next))); break; case _write_longint : - _p = ((yamop *)(&((_p)->y_u.i.next))); + _p = ((yamop *)(&((_p)->u.i.next))); break; case _write_n_atoms : - _p = ((yamop *)(&((_p)->y_u.sc.next))); + _p = ((yamop *)(&((_p)->u.sc.next))); break; case _write_list : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _write_l_list : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _write_struct : - _p = ((yamop *)(&((_p)->y_u.fa.next))); + _p = ((yamop *)(&((_p)->u.fa.next))); break; case _write_l_struc : - _p = ((yamop *)(&((_p)->y_u.fa.next))); + _p = ((yamop *)(&((_p)->u.fa.next))); break; case _save_pair_x : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _save_pair_x_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _save_pair_y : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _save_pair_y_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _save_appl_x : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _save_appl_x_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _save_appl_y : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _save_appl_y_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _jump : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _move_back : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _skip : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _either : - _p = ((yamop *)(&((_p)->y_u.Osblp.next))); + _p = ((yamop *)(&((_p)->u.Osblp.next))); break; case _or_else : - _p = ((yamop *)(&((_p)->y_u.Osblp.next))); + _p = ((yamop *)(&((_p)->u.Osblp.next))); break; case _pop_n : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _pop : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _call_cpred : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _execute_cpred : - _p = ((yamop *)(&((_p)->y_u.pp.next))); + _p = ((yamop *)(&((_p)->u.pp.next))); break; case _call_usercpred : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _call_c_wfail : - _p = ((yamop *)(&((_p)->y_u.slp.next))); + _p = ((yamop *)(&((_p)->u.slp.next))); break; case _try_c : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; case _retry_c : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; #ifdef CUT_C case _cut_c : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); c = 1; break; #endif case _try_userc : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; case _retry_userc : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; #ifdef CUT_C case _cut_userc : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); c = 1; break; #endif case _lock_pred : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _index_pred : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #ifdef THREADS case _thread_local : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif case _expand_index : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _expand_clauses : - _p = ((yamop *)(&((_p)->y_u.sssllp.next))); + _p = ((yamop *)(&((_p)->u.sssllp.next))); break; case _undef_p : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _spy_pred : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _try_clause : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _try_clause2 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _try_clause3 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _try_clause4 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _retry : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _retry2 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _retry3 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _retry4 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _trust : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _try_in : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _enter_lu_pred : - _p = ((yamop *)(&((_p)->y_u.Illss.next))); + _p = ((yamop *)(&((_p)->u.Illss.next))); break; case _try_logical : - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _retry_logical : - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _trust_logical : - _p = ((yamop *)(&((_p)->y_u.OtILl.next))); + _p = ((yamop *)(&((_p)->u.OtILl.next))); break; case _user_switch : - _p = ((yamop *)(&((_p)->y_u.lp.next))); + _p = ((yamop *)(&((_p)->u.lp.next))); break; case _switch_on_type : - _p = ((yamop *)(&((_p)->y_u.llll.next))); + _p = ((yamop *)(&((_p)->u.llll.next))); break; case _switch_list_nl : - _p = ((yamop *)(&((_p)->y_u.ollll.next))); + _p = ((yamop *)(&((_p)->u.ollll.next))); break; case _switch_on_arg_type : - _p = ((yamop *)(&((_p)->y_u.xllll.next))); + _p = ((yamop *)(&((_p)->u.xllll.next))); break; case _switch_on_sub_arg_type : - _p = ((yamop *)(&((_p)->y_u.sllll.next))); + _p = ((yamop *)(&((_p)->u.sllll.next))); break; case _jump_if_var : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _jump_if_nonvar : - _p = ((yamop *)(&((_p)->y_u.xll.next))); + _p = ((yamop *)(&((_p)->u.xll.next))); break; case _if_not_then : - _p = ((yamop *)(&((_p)->y_u.clll.next))); + _p = ((yamop *)(&((_p)->u.clll.next))); break; case _switch_on_func : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _switch_on_cons : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _go_on_func : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _go_on_cons : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _if_func : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _if_cons : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _index_dbref : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _index_blob : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _index_long : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _jit_handler : - _p = ((yamop *)(&((_p)->y_u.jhc.next))); + _p = ((yamop *)(&((_p)->u.jhc.next))); break; case _p_atom_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_atom_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_atomic_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_atomic_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_integer_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_integer_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_nonvar_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_nonvar_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_number_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_number_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_var_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_var_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_db_ref_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_db_ref_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_primitive_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_primitive_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_compound_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_compound_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_float_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_float_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_plus_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_plus_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_plus_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_plus_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_minus_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_minus_cv : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_minus_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_minus_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_times_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_times_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_times_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_times_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_div_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_div_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_div_cv : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_div_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_div_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_div_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_and_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_and_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_and_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_and_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_or_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_or_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_or_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_or_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_sll_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_sll_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_sll_cv : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_sll_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_sll_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_sll_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_slr_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_slr_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_slr_cv : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_slr_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_slr_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_slr_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _call_bfunc_xx : - _p = ((yamop *)(&((_p)->y_u.plxxs.next))); + _p = ((yamop *)(&((_p)->u.plxxs.next))); break; case _call_bfunc_yx : - _p = ((yamop *)(&((_p)->y_u.plxys.next))); + _p = ((yamop *)(&((_p)->u.plxys.next))); break; case _call_bfunc_xy : - _p = ((yamop *)(&((_p)->y_u.plxys.next))); + _p = ((yamop *)(&((_p)->u.plxys.next))); break; case _call_bfunc_yy : - _p = ((yamop *)(&((_p)->y_u.plyys.next))); + _p = ((yamop *)(&((_p)->u.plyys.next))); break; case _p_equal : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _p_dif : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _p_eq : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _p_arg_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_arg_cv : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_arg_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_arg_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_func2s_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_func2s_cv : - _p = ((yamop *)(&((_p)->y_u.xxc.next))); + _p = ((yamop *)(&((_p)->u.xxc.next))); break; case _p_func2s_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_func2s_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_func2s_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_func2s_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_func2f_xx : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_func2f_xy : - _p = ((yamop *)(&((_p)->y_u.xxy.next))); + _p = ((yamop *)(&((_p)->u.xxy.next))); break; case _p_func2f_yx : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_func2f_yy : - _p = ((yamop *)(&((_p)->y_u.yyx.next))); + _p = ((yamop *)(&((_p)->u.yyx.next))); break; case _p_functor : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _p_execute2 : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _p_execute : - _p = ((yamop *)(&((_p)->y_u.Osbmp.next))); + _p = ((yamop *)(&((_p)->u.Osbmp.next))); break; case _p_execute_tail : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; #ifdef YAPOR case _getwork_first_time : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _getwork : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _getwork_seq : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _sync : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; #endif #ifdef TABLING #ifdef TABLING_INNER_CUTS case _clause_with_cut : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif case _table_load_answer : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_try_answer : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_try_single : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_try_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_try : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_retry_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_retry : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_trust_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_trust : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_new_answer : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _table_answer_resolution : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_completion : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; #ifdef THREADS_CONSUMER_SHARING case _table_answer_resolution_completion: - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; #endif case _trie_do_var : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_var : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_var : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_var : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_var_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_var_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_var_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_var_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_val : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_val : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_val : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_val : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_val_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_val_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_val_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_val_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_atom : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_atom : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_atom : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_atom : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_atom_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_atom_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_atom_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_atom_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_null : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_null : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_null : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_null : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_null_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_null_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_null_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_null_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_appl : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_appl : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_appl : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_appl : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_appl_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_appl_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_appl_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_appl_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_extension : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_extension : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_extension : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_extension : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_double : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_double : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_double : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_double : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_longint : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_longint : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_longint : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_longint : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_gterm : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_gterm : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_gterm : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_gterm : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif #ifdef YAPOR case _or_last : - _p = ((yamop *)(&((_p)->y_u.sblp.next))); + _p = ((yamop *)(&((_p)->u.sblp.next))); break; #else case _or_last : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; #endif case _traced_Ystop : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_Nstop : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_try_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_retry_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_trust_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_enter_profiling : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _traced_retry_profiled : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _traced_profiled_retry_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_profiled_trust_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_profiled_retry_logical : - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _traced_profiled_trust_logical : - _p = ((yamop *)(&((_p)->y_u.OtILl.next))); + _p = ((yamop *)(&((_p)->u.OtILl.next))); break; case _traced_count_call : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _traced_count_retry : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _traced_count_retry_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_count_trust_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_count_retry_logical : - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _traced_count_trust_logical : - _p = ((yamop *)(&((_p)->y_u.OtILl.next))); + _p = ((yamop *)(&((_p)->u.OtILl.next))); break; case _traced_lock_lu : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _traced_unlock_lu : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_alloc_for_logical_pred : - _p = ((yamop *)(&((_p)->y_u.L.next))); + _p = ((yamop *)(&((_p)->u.L.next))); break; case _traced_copy_idb_term : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_unify_idb_term : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_ensure_space : - _p = ((yamop *)(&((_p)->y_u.Osbpa.next))); + _p = ((yamop *)(&((_p)->u.Osbpa.next))); break; case _traced_spy_or_trymark : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_try_and_mark : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_count_retry_and_mark : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_profiled_retry_and_mark : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_retry_and_mark : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_trust_fail : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_op_fail : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_cut : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); c = 1; break; case _traced_cut_t : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); c = 1; break; case _traced_cut_e : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); c = 1; break; case _traced_save_b_x : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _traced_save_b_y : - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _traced_commit_b_x : - _p = ((yamop *)(&((_p)->y_u.xps.next))); + _p = ((yamop *)(&((_p)->u.xps.next))); break; case _traced_commit_b_y : - _p = ((yamop *)(&((_p)->y_u.yps.next))); + _p = ((yamop *)(&((_p)->u.yps.next))); break; case _traced_execute : - _p = ((yamop *)(&((_p)->y_u.pp.next))); + _p = ((yamop *)(&((_p)->u.pp.next))); l = (CELL)_p; if (n > 5) return 0; break; case _traced_dexecute : - _p = ((yamop *)(&((_p)->y_u.pp.next))); + _p = ((yamop *)(&((_p)->u.pp.next))); l = (CELL)_p; if (n > 5) return 0; break; case _traced_fcall : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); if (c || n <= 3) { c = 0; break; } return 0; case _traced_call : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); if (c || n <= 3) { c = 0; break; } return 0; case _traced_procceed : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); l = (CELL)_p; break; case _traced_allocate : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_deallocate : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; #ifdef BEAM case _traced_retry_eam : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif #ifdef BEAM case _traced_run_eam : - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; #endif case _traced_get_x_var : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _traced_get_y_var : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_get_yy_var : - _p = ((yamop *)(&((_p)->y_u.yyxx.next))); + _p = ((yamop *)(&((_p)->u.yyxx.next))); break; case _traced_get_x_val : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _traced_get_y_val : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_get_atom : - _p = ((yamop *)(&((_p)->y_u.xc.next))); + _p = ((yamop *)(&((_p)->u.xc.next))); break; case _traced_get_2atoms : - _p = ((yamop *)(&((_p)->y_u.cc.next))); + _p = ((yamop *)(&((_p)->u.cc.next))); break; case _traced_get_3atoms : - _p = ((yamop *)(&((_p)->y_u.ccc.next))); + _p = ((yamop *)(&((_p)->u.ccc.next))); break; case _traced_get_4atoms : - _p = ((yamop *)(&((_p)->y_u.cccc.next))); + _p = ((yamop *)(&((_p)->u.cccc.next))); break; case _traced_get_5atoms : - _p = ((yamop *)(&((_p)->y_u.ccccc.next))); + _p = ((yamop *)(&((_p)->u.ccccc.next))); break; case _traced_get_6atoms : - _p = ((yamop *)(&((_p)->y_u.cccccc.next))); + _p = ((yamop *)(&((_p)->u.cccccc.next))); break; case _traced_get_list : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _traced_get_struct : - _p = ((yamop *)(&((_p)->y_u.xfa.next))); + _p = ((yamop *)(&((_p)->u.xfa.next))); break; case _traced_get_float : - _p = ((yamop *)(&((_p)->y_u.xd.next))); + _p = ((yamop *)(&((_p)->u.xd.next))); break; case _traced_get_longint : - _p = ((yamop *)(&((_p)->y_u.xi.next))); + _p = ((yamop *)(&((_p)->u.xi.next))); break; case _traced_get_bigint : - _p = ((yamop *)(&((_p)->y_u.xN.next))); + _p = ((yamop *)(&((_p)->u.xN.next))); break; case _traced_get_dbterm : - _p = ((yamop *)(&((_p)->y_u.xD.next))); + _p = ((yamop *)(&((_p)->u.xD.next))); break; case _traced_glist_valx : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _traced_glist_valy : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_gl_void_varx : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _traced_gl_void_vary : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_gl_void_valx : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _traced_gl_void_valy : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_unify_x_var : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_x_var_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_l_x_var : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_l_x_var_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_x_var2 : - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _traced_unify_x_var2_write : - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _traced_unify_l_x_var2 : - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _traced_unify_l_x_var2_write : - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _traced_unify_y_var : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_y_var_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_l_y_var : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_l_y_var_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_x_val : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_x_val_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_l_x_val : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_l_x_val_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_y_val : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_y_val_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_l_y_val : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_l_y_val_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_x_loc : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_x_loc_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_l_x_loc : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_l_x_loc_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_y_loc : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_y_loc_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_l_y_loc : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_l_y_loc_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_void : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_void_write : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_l_void : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_l_void_write : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_n_voids : - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _traced_unify_n_voids_write : - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _traced_unify_l_n_voids : - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _traced_unify_l_n_voids_write : - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _traced_unify_atom : - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _traced_unify_atom_write : - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _traced_unify_l_atom : - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _traced_unify_l_atom_write : - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _traced_unify_n_atoms : - _p = ((yamop *)(&((_p)->y_u.osc.next))); + _p = ((yamop *)(&((_p)->u.osc.next))); break; case _traced_unify_n_atoms_write : - _p = ((yamop *)(&((_p)->y_u.osc.next))); + _p = ((yamop *)(&((_p)->u.osc.next))); break; case _traced_unify_float : - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _traced_unify_float_write : - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _traced_unify_l_float : - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _traced_unify_l_float_write : - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _traced_unify_longint : - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _traced_unify_longint_write : - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _traced_unify_l_longint : - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _traced_unify_l_longint_write : - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _traced_unify_bigint : - _p = ((yamop *)(&((_p)->y_u.oN.next))); + _p = ((yamop *)(&((_p)->u.oN.next))); break; case _traced_unify_l_bigint : - _p = ((yamop *)(&((_p)->y_u.oN.next))); + _p = ((yamop *)(&((_p)->u.oN.next))); break; case _traced_unify_dbterm : - _p = ((yamop *)(&((_p)->y_u.oD.next))); + _p = ((yamop *)(&((_p)->u.oD.next))); break; case _traced_unify_l_dbterm : - _p = ((yamop *)(&((_p)->y_u.oD.next))); + _p = ((yamop *)(&((_p)->u.oD.next))); break; case _traced_unify_list : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_list_write : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_l_list : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_l_list_write : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_struct : - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _traced_unify_struct_write : - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _traced_unify_l_struc : - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _traced_unify_l_struc_write : - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _traced_put_x_var : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _traced_put_y_var : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_put_x_val : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _traced_put_xx_val : - _p = ((yamop *)(&((_p)->y_u.xxxx.next))); + _p = ((yamop *)(&((_p)->u.xxxx.next))); break; case _traced_put_y_val : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_put_y_vals : - _p = ((yamop *)(&((_p)->y_u.yyxx.next))); + _p = ((yamop *)(&((_p)->u.yyxx.next))); break; case _traced_put_unsafe : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_put_atom : - _p = ((yamop *)(&((_p)->y_u.xc.next))); + _p = ((yamop *)(&((_p)->u.xc.next))); break; case _traced_put_dbterm : - _p = ((yamop *)(&((_p)->y_u.xD.next))); + _p = ((yamop *)(&((_p)->u.xD.next))); break; case _traced_put_bigint : - _p = ((yamop *)(&((_p)->y_u.xN.next))); + _p = ((yamop *)(&((_p)->u.xN.next))); break; case _traced_put_float : - _p = ((yamop *)(&((_p)->y_u.xd.next))); + _p = ((yamop *)(&((_p)->u.xd.next))); break; case _traced_put_longint : - _p = ((yamop *)(&((_p)->y_u.xi.next))); + _p = ((yamop *)(&((_p)->u.xi.next))); break; case _traced_put_list : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _traced_put_struct : - _p = ((yamop *)(&((_p)->y_u.xfa.next))); + _p = ((yamop *)(&((_p)->u.xfa.next))); break; case _traced_write_x_var : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _traced_write_void : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_write_n_voids : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _traced_write_y_var : - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _traced_write_x_val : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _traced_write_x_loc : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _traced_write_y_val : - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _traced_write_y_loc : - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _traced_write_atom : - _p = ((yamop *)(&((_p)->y_u.c.next))); + _p = ((yamop *)(&((_p)->u.c.next))); break; case _traced_write_bigint : - _p = ((yamop *)(&((_p)->y_u.N.next))); + _p = ((yamop *)(&((_p)->u.N.next))); break; case _traced_write_dbterm : - _p = ((yamop *)(&((_p)->y_u.D.next))); + _p = ((yamop *)(&((_p)->u.D.next))); break; case _traced_write_float : - _p = ((yamop *)(&((_p)->y_u.d.next))); + _p = ((yamop *)(&((_p)->u.d.next))); break; case _traced_write_longint : - _p = ((yamop *)(&((_p)->y_u.i.next))); + _p = ((yamop *)(&((_p)->u.i.next))); break; case _traced_write_n_atoms : - _p = ((yamop *)(&((_p)->y_u.sc.next))); + _p = ((yamop *)(&((_p)->u.sc.next))); break; case _traced_write_list : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_write_l_list : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_write_struct : - _p = ((yamop *)(&((_p)->y_u.fa.next))); + _p = ((yamop *)(&((_p)->u.fa.next))); break; case _traced_write_l_struc : - _p = ((yamop *)(&((_p)->y_u.fa.next))); + _p = ((yamop *)(&((_p)->u.fa.next))); break; case _traced_save_pair_x : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_save_pair_x_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_save_pair_y : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_save_pair_y_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_save_appl_x : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_save_appl_x_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_save_appl_y : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_save_appl_y_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_jump : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_move_back : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_skip : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_either : - _p = ((yamop *)(&((_p)->y_u.Osblp.next))); + _p = ((yamop *)(&((_p)->u.Osblp.next))); break; case _traced_or_else : - _p = ((yamop *)(&((_p)->y_u.Osblp.next))); + _p = ((yamop *)(&((_p)->u.Osblp.next))); break; case _traced_pop_n : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _traced_pop : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_call_cpred : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _traced_execute_cpred : - _p = ((yamop *)(&((_p)->y_u.pp.next))); + _p = ((yamop *)(&((_p)->u.pp.next))); break; case _traced_call_usercpred : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _traced_call_c_wfail : - _p = ((yamop *)(&((_p)->y_u.slp.next))); + _p = ((yamop *)(&((_p)->u.slp.next))); break; case _traced_try_c : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; case _traced_retry_c : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; #ifdef CUT_C case _traced_cut_c : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); c = 1; break; #endif case _traced_try_userc : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; case _traced_retry_userc : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; #ifdef CUT_C case _traced_cut_userc : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); c = 1; break; #endif case _traced_lock_pred : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_index_pred : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #ifdef THREADS case _traced_thread_local : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif case _traced_expand_index : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_expand_clauses : - _p = ((yamop *)(&((_p)->y_u.sssllp.next))); + _p = ((yamop *)(&((_p)->u.sssllp.next))); break; case _traced_undef_p : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_spy_pred : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_try_clause : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_try_clause2 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_try_clause3 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_try_clause4 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_retry : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_retry2 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_retry3 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_retry4 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_trust : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_try_in : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_enter_lu_pred : - _p = ((yamop *)(&((_p)->y_u.Illss.next))); + _p = ((yamop *)(&((_p)->u.Illss.next))); break; case _traced_try_logical : - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _traced_retry_logical : - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _traced_trust_logical : - _p = ((yamop *)(&((_p)->y_u.OtILl.next))); + _p = ((yamop *)(&((_p)->u.OtILl.next))); break; case _traced_user_switch : - _p = ((yamop *)(&((_p)->y_u.lp.next))); + _p = ((yamop *)(&((_p)->u.lp.next))); break; case _traced_switch_on_type : - _p = ((yamop *)(&((_p)->y_u.llll.next))); + _p = ((yamop *)(&((_p)->u.llll.next))); break; case _traced_switch_list_nl : - _p = ((yamop *)(&((_p)->y_u.ollll.next))); + _p = ((yamop *)(&((_p)->u.ollll.next))); break; case _traced_switch_on_arg_type : - _p = ((yamop *)(&((_p)->y_u.xllll.next))); + _p = ((yamop *)(&((_p)->u.xllll.next))); break; case _traced_switch_on_sub_arg_type : - _p = ((yamop *)(&((_p)->y_u.sllll.next))); + _p = ((yamop *)(&((_p)->u.sllll.next))); break; case _traced_jump_if_var : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_jump_if_nonvar : - _p = ((yamop *)(&((_p)->y_u.xll.next))); + _p = ((yamop *)(&((_p)->u.xll.next))); break; case _traced_if_not_then : - _p = ((yamop *)(&((_p)->y_u.clll.next))); + _p = ((yamop *)(&((_p)->u.clll.next))); break; case _traced_switch_on_func : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _traced_switch_on_cons : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _traced_go_on_func : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _traced_go_on_cons : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _traced_if_func : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _traced_if_cons : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _traced_index_dbref : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_index_blob : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_index_long : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_jit_handler : - _p = ((yamop *)(&((_p)->y_u.jhc.next))); + _p = ((yamop *)(&((_p)->u.jhc.next))); break; case _traced_p_atom_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_atom_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_atomic_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_atomic_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_integer_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_integer_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_nonvar_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_nonvar_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_number_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_number_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_var_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_var_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_db_ref_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_db_ref_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_primitive_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_primitive_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_compound_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_compound_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_float_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_float_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_plus_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_plus_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_plus_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_plus_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_minus_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_minus_cv : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_minus_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_minus_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_times_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_times_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_times_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_times_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_div_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_div_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_div_cv : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_div_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_div_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_div_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_and_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_and_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_and_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_and_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_or_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_or_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_or_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_or_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_sll_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_sll_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_sll_cv : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_sll_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_sll_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_sll_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_slr_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_slr_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_slr_cv : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_slr_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_slr_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_slr_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_call_bfunc_xx : - _p = ((yamop *)(&((_p)->y_u.plxxs.next))); + _p = ((yamop *)(&((_p)->u.plxxs.next))); break; case _traced_call_bfunc_yx : - _p = ((yamop *)(&((_p)->y_u.plxys.next))); + _p = ((yamop *)(&((_p)->u.plxys.next))); break; case _traced_call_bfunc_xy : - _p = ((yamop *)(&((_p)->y_u.plxys.next))); + _p = ((yamop *)(&((_p)->u.plxys.next))); break; case _traced_call_bfunc_yy : - _p = ((yamop *)(&((_p)->y_u.plyys.next))); + _p = ((yamop *)(&((_p)->u.plyys.next))); break; case _traced_p_equal : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_p_dif : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_p_eq : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_p_arg_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_arg_cv : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_arg_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_arg_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_func2s_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_func2s_cv : - _p = ((yamop *)(&((_p)->y_u.xxc.next))); + _p = ((yamop *)(&((_p)->u.xxc.next))); break; case _traced_p_func2s_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_func2s_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_func2s_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_func2s_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_func2f_xx : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_func2f_xy : - _p = ((yamop *)(&((_p)->y_u.xxy.next))); + _p = ((yamop *)(&((_p)->u.xxy.next))); break; case _traced_p_func2f_yx : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_func2f_yy : - _p = ((yamop *)(&((_p)->y_u.yyx.next))); + _p = ((yamop *)(&((_p)->u.yyx.next))); break; case _traced_p_functor : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_p_execute2 : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _traced_p_execute : - _p = ((yamop *)(&((_p)->y_u.Osbmp.next))); + _p = ((yamop *)(&((_p)->u.Osbmp.next))); break; case _traced_p_execute_tail : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; #ifdef YAPOR case _traced_getwork_first_time : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_getwork : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_getwork_seq : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_sync : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; #endif #ifdef TABLING #ifdef TABLING_INNER_CUTS case _traced_clause_with_cut : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif case _traced_table_load_answer : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_try_answer : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_try_single : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_try_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_try : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_retry_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_retry : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_trust_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_trust : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_new_answer : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _traced_table_answer_resolution : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_completion : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; #ifdef THREADS_CONSUMER_SHARING case _traced_table_answer_resolution_completion: - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; #endif case _traced_trie_do_var : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_var : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_var : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_var : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_var_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_var_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_var_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_var_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_val : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_val : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_val : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_val : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_val_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_val_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_val_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_val_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_atom : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_atom : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_atom : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_atom : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_atom_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_atom_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_atom_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_atom_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_null : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_null : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_null : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_null : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_null_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_null_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_null_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_null_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_appl : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_appl : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_appl : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_appl : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_appl_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_appl_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_appl_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_appl_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_extension : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_extension : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_extension : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_extension : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_double : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_double : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_double : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_double : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_longint : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_longint : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_longint : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_longint : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_gterm : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_gterm : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_gterm : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_gterm : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif #ifdef YAPOR case _traced_or_last : - _p = ((yamop *)(&((_p)->y_u.sblp.next))); + _p = ((yamop *)(&((_p)->u.sblp.next))); break; #else case _traced_or_last : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; #endif } diff --git a/JIT/HPP/JIT.hh b/JIT/HPP/JIT.hh new file mode 100644 index 000000000..2db27fa2d --- /dev/null +++ b/JIT/HPP/JIT.hh @@ -0,0 +1,24 @@ +#ifndef JIT_HPP +#define JIT_HPP + +#ifdef __cplusplus + +#include +#include +#include +#include +#include +#include +#include +#include "config.h" +#include "absmi.h" + +using namespace std; + +#else + +#define LIMIT_COUNT 4096 + +#endif + +#endif diff --git a/JIT/HPP/JIT_Compiler.hh b/JIT/HPP/JIT_Compiler.hh new file mode 100644 index 000000000..d7f0fa0cd --- /dev/null +++ b/JIT/HPP/JIT_Compiler.hh @@ -0,0 +1,104 @@ +#ifndef JIT_COMPILER_HPP +#define JIT_COMPILER_HPP + +#ifdef __cplusplus + +#include "llvm/LLVMContext.h" +#include "llvm/Module.h" +#include "llvm/Constants.h" +#include "llvm/DerivedTypes.h" +#include "llvm/Instructions.h" +#include "llvm/Linker.h" +#include "llvm/PassManager.h" +#include "llvm/CallGraphSCCPass.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/StringSet.h" +#include "llvm/ADT/Triple.h" +#include "llvm/Assembly/PrintModulePass.h" +#include "llvm/CodeGen/Passes.h" +#include "llvm/CodeGen/MachineCodeInfo.h" +#include "llvm/ExecutionEngine/JIT.h" +#include "llvm/ExecutionEngine/Interpreter.h" +#include "llvm/ExecutionEngine/GenericValue.h" +#include "llvm/ExecutionEngine/JITMemoryManager.h" +#include "llvm/ExecutionEngine/JITEventListener.h" +#include "llvm/Support/DataStream.h" +#include "llvm/Support/IRReader.h" +#include "llvm/Support/Host.h" +#include "llvm/Support/Path.h" +#include "llvm/Support/TargetSelect.h" +#include "llvm/Support/ManagedStatic.h" +#include "llvm/Support/raw_os_ostream.h" +#include "llvm/Support/IRBuilder.h" +#include "llvm/Support/PathV1.h" +#include "llvm/Support/TypeBuilder.h" +#include "llvm/Support/ToolOutputFile.h" +#include "llvm/Target/TargetData.h" +#include "llvm/Target/TargetMachine.h" +#include "llvm/Target/TargetOptions.h" +#include "llvm/Target/TargetLibraryInfo.h" +#include "llvm/Analysis/Passes.h" +#include "llvm/Analysis/IVUsers.h" +#include "llvm/Analysis/Lint.h" +#include "llvm/Analysis/DebugInfo.h" +#include "llvm/Analysis/Verifier.h" +#include "llvm/Analysis/LoopPass.h" +#include "llvm/Analysis/RegionPass.h" +#include "llvm/Analysis/CFGPrinter.h" +#include "llvm/Analysis/DomPrinter.h" +#include "llvm/Analysis/BranchProbabilityInfo.h" +#include "llvm/Analysis/RegionPrinter.h" +#include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/system_error.h" +#include "llvm/Support/Process.h" +#include "llvm/Bitcode/ReaderWriter.h" +#include "llvm/Transforms/IPO.h" +#include "llvm/Transforms/Scalar.h" +#include "llvm/Transforms/Vectorize.h" +#include "llvm/Transforms/IPO/PassManagerBuilder.h" +#include "llvm/Transforms/Utils/Cloning.h" + +using namespace llvm; + +#include +#include +#include "JIT.hpp" + +using namespace std; + +extern short global; +extern Environment ExpEnv; +extern NativeContext *NativeArea; + +class JIT_Compiler { + private: + /* main method of JIT Compiler: compiles by clang, analyzes, optimizs and generates code accordingly the user choices */ + void* compile_all(LLVMContext* &Context, yamop* p); + + /* aid method to 'compile_all': adds register allocator pass to be used. + WARNING: don't use! For some reasons llvm crashes when I use it */ + void set_regalloc_pass(PassManager &PM); + + /* aid method to 'compile_all': optimizes module by individual transform passes or transform level */ + void optimize_module(llvm::Module* &M); + + /* aid method to 'compile_all': analyzes module by individual analysis passes */ + void analyze_module(llvm::Module* &M); + public: + /* method invoked by wrapper 'call_JIT_Compiler' */ + void* compile(yamop*); +}; +#else + +struct JIT_Compiler{}; // Doing this, I can call class 'JIT_Compiler' from C code + +#endif + +#ifdef __cplusplus + +extern "C" void* call_JIT_Compiler(JIT_Compiler* jc, yamop* p) { return jc->compile(p); } +extern "C" void shutdown_llvm() { llvm_shutdown(); } + +#endif //#ifdef __cplusplus + +#endif diff --git a/JIT/HPP/PassPrinters.hh b/JIT/HPP/PassPrinters.hh new file mode 100644 index 000000000..9bc4c5ab4 --- /dev/null +++ b/JIT/HPP/PassPrinters.hh @@ -0,0 +1,183 @@ +/** +* The code below is adapted from opt tool according to clearance and conditions established in NCSA license as follows: + +* Copyright (c) 2003 University of Illinois. All rights reserved. + +* Developed by: LLVM Developer Group +* University of Illinois +* http://llvm.org/ + +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation +* files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, +* modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software +* is furnished to do so, subject to the following conditions: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers. +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers +* in the documentation and/or other materials provided with the distribution. +* Neither the names of LLVM Developer Group, University of Illinois, nor the names of its contributors may be used to endorse or +* promote products derived from this Software without specific prior written permission. + +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HROLDERS +* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +* IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + +**/ + +struct CallGraphSCCPassPrinter : public CallGraphSCCPass { + static char ID; + const PassInfo *PassToPrint; + std::string PassName; + + CallGraphSCCPassPrinter(const PassInfo *PI) : + CallGraphSCCPass(ID), PassToPrint(PI) { + std::string PassToPrintName = PassToPrint->getPassName(); + PassName = "CallGraphSCCPass Printer: " + PassToPrintName; + } + + virtual bool runOnSCC(CallGraphSCC &SCC) { + errs() << "Printing analysis '" << PassToPrint->getPassName() << "':\n"; + + // Get and print pass... + for (CallGraphSCC::iterator I = SCC.begin(), E = SCC.end(); I != E; ++I) { + Function *F = (*I)->getFunction(); + if (F) + getAnalysisID(PassToPrint->getTypeInfo()).print(errs(), + F->getParent()); + } + return false; + } + + virtual const char *getPassName() const { return PassName.c_str(); } + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequiredID(PassToPrint->getTypeInfo()); + AU.setPreservesAll(); + } +}; + +char CallGraphSCCPassPrinter::ID = 0; + +struct ModulePassPrinter : public ModulePass { + static char ID; + const PassInfo *PassToPrint; + std::string PassName; + + ModulePassPrinter(const PassInfo *PI) + : ModulePass(ID), PassToPrint(PI) { + std::string PassToPrintName = PassToPrint->getPassName(); + PassName = "ModulePass Printer: " + PassToPrintName; + } + + virtual bool runOnModule(Module &M) { + errs() << "Printing analysis '" << PassToPrint->getPassName() << "':\n"; + + // Get and print pass... + getAnalysisID(PassToPrint->getTypeInfo()).print(errs(), &M); + return false; + } + + virtual const char *getPassName() const { return PassName.c_str(); } + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequiredID(PassToPrint->getTypeInfo()); + AU.setPreservesAll(); + } +}; + +char ModulePassPrinter::ID = 0; + +struct FunctionPassPrinter : public FunctionPass { + const PassInfo *PassToPrint; + static char ID; + std::string PassName; + + FunctionPassPrinter(const PassInfo *PI) + : FunctionPass(ID), PassToPrint(PI) { + std::string PassToPrintName = PassToPrint->getPassName(); + PassName = "FunctionPass Printer: " + PassToPrintName; + } + + virtual bool runOnFunction(Function &F) { + errs() << "Printing analysis '" << PassToPrint->getPassName() + << "' for function '" << F.getName() << "':\n"; + + // Get and print pass... + getAnalysisID(PassToPrint->getTypeInfo()).print(errs(), + F.getParent()); + return false; + } + + virtual const char *getPassName() const { return PassName.c_str(); } + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequiredID(PassToPrint->getTypeInfo()); + AU.setPreservesAll(); + } +}; + +char FunctionPassPrinter::ID = 0; + +struct LoopPassPrinter : public LoopPass { + static char ID; + const PassInfo *PassToPrint; + std::string PassName; + + LoopPassPrinter(const PassInfo *PI) : + LoopPass(ID), PassToPrint(PI) { + std::string PassToPrintName = PassToPrint->getPassName(); + PassName = "LoopPass Printer: " + PassToPrintName; + } + + + virtual bool runOnLoop(Loop *L, LPPassManager &LPM) { + errs() << "Printing analysis '" << PassToPrint->getPassName() << "':\n"; + + // Get and print pass... + getAnalysisID(PassToPrint->getTypeInfo()).print(errs(), + L->getHeader()->getParent()->getParent()); + return false; + } + + virtual const char *getPassName() const { return PassName.c_str(); } + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequiredID(PassToPrint->getTypeInfo()); + AU.setPreservesAll(); + } +}; + +char LoopPassPrinter::ID = 0; + +struct RegionPassPrinter : public RegionPass { + static char ID; + const PassInfo *PassToPrint; + std::string PassName; + + RegionPassPrinter(const PassInfo *PI) : RegionPass(ID), + PassToPrint(PI) { + std::string PassToPrintName = PassToPrint->getPassName(); + PassName = "RegionPass Printer: " + PassToPrintName; + } + + virtual bool runOnRegion(Region *R, RGPassManager &RGM) { + errs() << "Printing analysis '" << PassToPrint->getPassName() << "' for " + << "region: '" << R->getNameStr() << "' in function '" + << R->getEntry()->getParent()->getName() << "':\n"; + + // Get and print pass... + getAnalysisID(PassToPrint->getTypeInfo()).print(errs(), + R->getEntry()->getParent()->getParent()); + return false; + } + + virtual const char *getPassName() const { return PassName.c_str(); } + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequiredID(PassToPrint->getTypeInfo()); + AU.setPreservesAll(); + } +}; + +char RegionPassPrinter::ID = 0; diff --git a/JIT/HPP/Yap_BasicBlocks.h b/JIT/HPP/Yap_BasicBlocks.h index b33b635c2..a8e64b8ac 100644 --- a/JIT/HPP/Yap_BasicBlocks.h +++ b/JIT/HPP/Yap_BasicBlocks.h @@ -358,7 +358,7 @@ #ifdef USE_GMP GET_BIGINT_INSTINIT, GET_BIGINT_GBIGINT_NONVAR, - GET_BIGINT_GBIGINT_UNK, + GET_BIGINT_GBIGINT_UNK #endif GET_DBTERM_INSTINIT, GET_DBTERM_GDBTERM_NONVAR, diff --git a/JIT/HPP/indexing_ext.h b/JIT/HPP/indexing_ext.h index f2201a04d..b202cc3e9 100644 --- a/JIT/HPP/indexing_ext.h +++ b/JIT/HPP/indexing_ext.h @@ -1,9 +1,9 @@ #define USER_SWITCH_INSTINIT \ BLOCKADDRESS = (CELL)(*_PREG); \ { \ - yamop *new = Yap_udi_search((*_PREG)->y_u.lp.p); \ + yamop *new = Yap_udi_search((*_PREG)->u.lp.p); \ if (!new) { \ - (*_PREG) = (*_PREG)->y_u.lp.l; \ + (*_PREG) = (*_PREG)->u.lp.l; \ JMPNext(); \ } \ else { \ @@ -34,27 +34,27 @@ (d0) = *(CELL *)(d0); \ } \ if (!nonvar) { \ - copy_jmp_address((*_PREG)->y_u.llll.l4); \ - (*_PREG) = (*_PREG)->y_u.llll.l4; \ + copy_jmp_address((*_PREG)->u.llll.l4); \ + (*_PREG) = (*_PREG)->u.llll.l4; \ JMPNext(); \ } \ } \ if (nonvar) { \ if (IsPairTerm(d0)) { \ (*_SREG) = RepPair(d0); \ - copy_jmp_address((*_PREG)->y_u.llll.l1); \ - (*_PREG) = (*_PREG)->y_u.llll.l1; \ + copy_jmp_address((*_PREG)->u.llll.l1); \ + (*_PREG) = (*_PREG)->u.llll.l1; \ JMPNext(); \ } \ else if (!IsApplTerm(d0)) { \ - copy_jmp_address((*_PREG)->y_u.llll.l2); \ - (*_PREG) = (*_PREG)->y_u.llll.l2; \ + copy_jmp_address((*_PREG)->u.llll.l2); \ + (*_PREG) = (*_PREG)->u.llll.l2; \ I_R = d0; \ JMPNext(); \ } \ else { \ - copy_jmp_address((*_PREG)->y_u.llll.l3); \ - (*_PREG) = (*_PREG)->y_u.llll.l3; \ + copy_jmp_address((*_PREG)->u.llll.l3); \ + (*_PREG) = (*_PREG)->u.llll.l3; \ (*_SREG) = RepAppl(d0); \ JMPNext(); \ } \ @@ -68,7 +68,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL *pt0; \ - ALWAYS_LOOKAHEAD((*_PREG)->y_u.ollll.pop); \ + ALWAYS_LOOKAHEAD((*_PREG)->u.ollll.pop); \ d0 = CACHED_A1(); \ Int nonvar = 0; \ Int pair = 1; \ @@ -77,18 +77,18 @@ do { \ if (!IsVarTerm(d0)) { \ if (d0 == TermNil) { \ - (*_PREG) = (*_PREG)->y_u.ollll.l2; \ + (*_PREG) = (*_PREG)->u.ollll.l2; \ JMPNext(); \ } \ else { \ if (IsApplTerm(d0)) { \ - copy_jmp_address((*_PREG)->y_u.ollll.l3); \ - (*_PREG) = (*_PREG)->y_u.ollll.l3; \ + copy_jmp_address((*_PREG)->u.ollll.l3); \ + (*_PREG) = (*_PREG)->u.ollll.l3; \ (*_SREG) = RepAppl(d0); \ JMPNext(); \ } else { \ - copy_jmp_address((*_PREG)->y_u.ollll.l3); \ - (*_PREG) = (*_PREG)->y_u.ollll.l3; \ + copy_jmp_address((*_PREG)->u.ollll.l3); \ + (*_PREG) = (*_PREG)->u.ollll.l3; \ I_R = d0; \ JMPNext(); \ } \ @@ -105,14 +105,14 @@ } \ } while (TRUE); \ if (!nonvar && !pair) { \ - copy_jmp_address((*_PREG)->y_u.ollll.l4); \ - (*_PREG) = (*_PREG)->y_u.ollll.l4; \ + copy_jmp_address((*_PREG)->u.ollll.l4); \ + (*_PREG) = (*_PREG)->u.ollll.l4; \ JMPNext(); \ } \ } \ if (!nonvar && pair) { \ - copy_jmp_address((*_PREG)->y_u.ollll.l1); \ - (*_PREG) = (*_PREG)->y_u.ollll.l1; \ + copy_jmp_address((*_PREG)->u.ollll.l1); \ + (*_PREG) = (*_PREG)->u.ollll.l1; \ (*_SREG) = RepPair(d0); \ ALWAYS_GONext(); \ } @@ -121,7 +121,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL *pt0; \ - ALWAYS_LOOKAHEAD((*_PREG)->y_u.ollll.pop); \ + ALWAYS_LOOKAHEAD((*_PREG)->u.ollll.pop); \ d0 = CACHED_A1(); \ Int nonvar = 0; \ if (IsVarTerm(d0)) { \ @@ -136,31 +136,31 @@ (d0) = *(CELL *)(d0); \ } \ if (!nonvar) { \ - copy_jmp_address((*_PREG)->y_u.ollll.l4); \ - (*_PREG) = (*_PREG)->y_u.ollll.l4; \ + copy_jmp_address((*_PREG)->u.ollll.l4); \ + (*_PREG) = (*_PREG)->u.ollll.l4; \ JMPNext(); \ } \ } \ if (nonvar) { \ if (__builtin_expect(IsPairTerm(d0),1)) { \ - copy_jmp_address((*_PREG)->y_u.ollll.l1); \ - (*_PREG) = (*_PREG)->y_u.ollll.l1; \ + copy_jmp_address((*_PREG)->u.ollll.l1); \ + (*_PREG) = (*_PREG)->u.ollll.l1; \ (*_SREG) = RepPair(d0); \ ALWAYS_GONext(); \ } \ if (d0 == TermNil) { \ - (*_PREG) = (*_PREG)->y_u.ollll.l2; \ + (*_PREG) = (*_PREG)->u.ollll.l2; \ JMPNext(); \ } \ else { \ if (IsApplTerm(d0)) { \ - copy_jmp_address((*_PREG)->y_u.ollll.l3); \ - (*_PREG) = (*_PREG)->y_u.ollll.l3; \ + copy_jmp_address((*_PREG)->u.ollll.l3); \ + (*_PREG) = (*_PREG)->u.ollll.l3; \ (*_SREG) = RepAppl(d0); \ JMPNext(); \ } else { \ - copy_jmp_address((*_PREG)->y_u.ollll.l3); \ - (*_PREG) = (*_PREG)->y_u.ollll.l3; \ + copy_jmp_address((*_PREG)->u.ollll.l3); \ + (*_PREG) = (*_PREG)->u.ollll.l3; \ I_R = d0; \ JMPNext(); \ } \ @@ -175,7 +175,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xllll.x); \ + d0 = XREG((*_PREG)->u.xllll.x); \ Int nonvar = 1; \ if (IsVarTerm(d0)) { \ nonvar = 0; \ @@ -190,27 +190,27 @@ (d0) = *(CELL *)(d0); \ } \ if (!nonvar) { \ - copy_jmp_address((*_PREG)->y_u.xllll.l4); \ - (*_PREG) = (*_PREG)->y_u.xllll.l4; \ + copy_jmp_address((*_PREG)->u.xllll.l4); \ + (*_PREG) = (*_PREG)->u.xllll.l4; \ JMPNext(); \ } \ } \ if (nonvar) { \ if (IsPairTerm(d0)) { \ - copy_jmp_address((*_PREG)->y_u.xllll.l1); \ - (*_PREG) = (*_PREG)->y_u.xllll.l1; \ + copy_jmp_address((*_PREG)->u.xllll.l1); \ + (*_PREG) = (*_PREG)->u.xllll.l1; \ (*_SREG) = RepPair(d0); \ JMPNext(); \ } \ else if (!IsApplTerm(d0)) { \ - copy_jmp_address((*_PREG)->y_u.xllll.l2); \ - (*_PREG) = (*_PREG)->y_u.xllll.l2; \ + copy_jmp_address((*_PREG)->u.xllll.l2); \ + (*_PREG) = (*_PREG)->u.xllll.l2; \ I_R = d0; \ JMPNext(); \ } \ else { \ - copy_jmp_address((*_PREG)->y_u.xllll.l3); \ - (*_PREG) = (*_PREG)->y_u.xllll.l3; \ + copy_jmp_address((*_PREG)->u.xllll.l3); \ + (*_PREG) = (*_PREG)->u.xllll.l3; \ (*_SREG) = RepAppl(d0); \ JMPNext(); \ } \ @@ -223,7 +223,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL *pt0; \ - d0 = (*_SREG)[(*_PREG)->y_u.sllll.s]; \ + d0 = (*_SREG)[(*_PREG)->u.sllll.s]; \ Int nonvar = 1; \ if (IsVarTerm(d0)) { \ nonvar = 0; \ @@ -238,27 +238,27 @@ (d0) = *(CELL *)(d0); \ } \ if (!nonvar) { \ - copy_jmp_address((*_PREG)->y_u.sllll.l4); \ - (*_PREG) = (*_PREG)->y_u.sllll.l4; \ + copy_jmp_address((*_PREG)->u.sllll.l4); \ + (*_PREG) = (*_PREG)->u.sllll.l4; \ JMPNext(); \ } \ } \ if (nonvar) { \ if (IsPairTerm(d0)) { \ - copy_jmp_address((*_PREG)->y_u.sllll.l1); \ - (*_PREG) = (*_PREG)->y_u.sllll.l1; \ + copy_jmp_address((*_PREG)->u.sllll.l1); \ + (*_PREG) = (*_PREG)->u.sllll.l1; \ (*_SREG) = RepPair(d0); \ JMPNext(); \ } \ else if (!IsApplTerm(d0)) { \ - copy_jmp_address((*_PREG)->y_u.sllll.l2); \ - (*_PREG) = (*_PREG)->y_u.sllll.l2; \ + copy_jmp_address((*_PREG)->u.sllll.l2); \ + (*_PREG) = (*_PREG)->u.sllll.l2; \ I_R = d0; \ JMPNext(); \ } \ else { \ - copy_jmp_address((*_PREG)->y_u.sllll.l3); \ - (*_PREG) = (*_PREG)->y_u.sllll.l3; \ + copy_jmp_address((*_PREG)->u.sllll.l3); \ + (*_PREG) = (*_PREG)->u.sllll.l3; \ (*_SREG) = RepAppl(d0); \ JMPNext(); \ } \ @@ -286,8 +286,8 @@ (d0) = *(CELL *)(d0); \ } \ if (!nonvar) { \ - copy_jmp_address((*_PREG)->y_u.l.l); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + copy_jmp_address((*_PREG)->u.l.l); \ + (*_PREG) = (*_PREG)->u.l.l; \ JMPNext(); \ } \ } \ @@ -303,7 +303,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xll.x); \ + d0 = XREG((*_PREG)->u.xll.x); \ Int nonvar = 0; \ if (IsVarTerm(d0)) { \ (pt0) = (CELL *)(d0); \ @@ -322,8 +322,8 @@ } \ } \ if (nonvar) { \ - copy_jmp_address((*_PREG)->y_u.xll.l1); \ - (*_PREG) = (*_PREG)->y_u.xll.l1; \ + copy_jmp_address((*_PREG)->u.xll.l1); \ + (*_PREG) = (*_PREG)->u.xll.l1; \ JMPNext(); \ } @@ -349,20 +349,20 @@ (d0) = *(CELL *)(d0); \ } \ if (!nonvar) { \ - copy_jmp_address((*_PREG)->y_u.clll.l3); \ - (*_PREG) = (*_PREG)->y_u.clll.l3; \ + copy_jmp_address((*_PREG)->u.clll.l3); \ + (*_PREG) = (*_PREG)->u.clll.l3; \ JMPNext(); \ } \ } \ if (nonvar) { \ - if (d0 == (*_PREG)->y_u.clll.c) { \ - copy_jmp_address((*_PREG)->y_u.clll.l2); \ - (*_PREG) = (*_PREG)->y_u.clll.l2; \ + if (d0 == (*_PREG)->u.clll.c) { \ + copy_jmp_address((*_PREG)->u.clll.l2); \ + (*_PREG) = (*_PREG)->u.clll.l2; \ JMPNext(); \ } \ else { \ - copy_jmp_address((*_PREG)->y_u.clll.l1); \ - (*_PREG) = (*_PREG)->y_u.clll.l1; \ + copy_jmp_address((*_PREG)->u.clll.l1); \ + (*_PREG) = (*_PREG)->u.clll.l1; \ JMPNext(); \ } \ } @@ -370,7 +370,7 @@ #define IF_NOT_THEN_END \ BLOCK = (CELL)IF_NOT_THEN_END; -#define HASH_SHIFT 6 +#define HRASH_SHIFT 6 #define SWITCH_ON_FUNC_INSTINIT \ BLOCKADDRESS = (CELL)(*_PREG); \ @@ -379,10 +379,10 @@ d1 = *(*_SREG)++; \ { \ CELL \ - Mask = ((*_PREG)->y_u.sssl.s - 1) << 1, \ - hash = d1 >> (HASH_SHIFT - 1) & Mask; \ + Mask = ((*_PREG)->u.sssl.s - 1) << 1, \ + hash = d1 >> (HRASH_SHIFT - 1) & Mask; \ CELL *base; \ - base = (CELL *)(*_PREG)->y_u.sssl.l; \ + base = (CELL *)(*_PREG)->u.sssl.l; \ pt0 = base + hash; \ d0 = pt0[0]; \ if (d0 == d1 || d0 == 0) { \ @@ -415,10 +415,10 @@ d1 = I_R; \ { \ CELL \ - Mask = ((*_PREG)->y_u.sssl.s - 1) << 1, \ - hash = d1 >> (HASH_SHIFT - 1) & Mask; \ + Mask = ((*_PREG)->u.sssl.s - 1) << 1, \ + hash = d1 >> (HRASH_SHIFT - 1) & Mask; \ CELL *base; \ - base = (CELL *)(*_PREG)->y_u.sssl.l; \ + base = (CELL *)(*_PREG)->u.sssl.l; \ pt0 = base + hash; \ d0 = pt0[0]; \ if (d0 == d1 || d0 == 0) { \ @@ -448,7 +448,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ { \ - CELL *pt = (CELL *)((*_PREG)->y_u.sssl.l); \ + CELL *pt = (CELL *)((*_PREG)->u.sssl.l); \ d0 = *(*_SREG)++; \ if (d0 == pt[0]) { \ copy_jmp_addressa(pt+1); \ @@ -468,7 +468,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ { \ - CELL *pt = (CELL *)((*_PREG)->y_u.sssl.l); \ + CELL *pt = (CELL *)((*_PREG)->u.sssl.l); \ d0 = I_R; \ if (d0 == pt[0]) { \ copy_jmp_addressa(pt+1); \ @@ -488,7 +488,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d1; \ register CELL *pt0; \ - pt0 = (CELL *) (*_PREG)->y_u.sssl.l; \ + pt0 = (CELL *) (*_PREG)->u.sssl.l; \ d1 = *(*_SREG)++; \ while (pt0[0] != d1 && pt0[0] != (CELL)NULL ) { \ pt0 += 2; \ @@ -504,7 +504,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d1; \ register CELL *pt0; \ - pt0 = (CELL *) (*_PREG)->y_u.sssl.l; \ + pt0 = (CELL *) (*_PREG)->u.sssl.l; \ d1 = I_R; \ while (pt0[0] != d1 && pt0[0] != 0L ) { \ pt0 += 2; \ diff --git a/JIT/HPP/indexing_ext_d.h b/JIT/HPP/indexing_ext_d.h index 2c5e0b998..5fd3f23ca 100644 --- a/JIT/HPP/indexing_ext_d.h +++ b/JIT/HPP/indexing_ext_d.h @@ -2,9 +2,9 @@ print_instruction((*_PREG), ON_NATIVE); \ BLOCKADDRESS = (CELL)(*_PREG); \ { \ - yamop *new = Yap_udi_search((*_PREG)->y_u.lp.p); \ + yamop *new = Yap_udi_search((*_PREG)->u.lp.p); \ if (!new) { \ - (*_PREG) = (*_PREG)->y_u.lp.l; \ + (*_PREG) = (*_PREG)->u.lp.l; \ JMPNext(); \ } \ else { \ @@ -36,27 +36,27 @@ (d0) = *(CELL *)(d0); \ } \ if (!nonvar) { \ - copy_jmp_address((*_PREG)->y_u.llll.l4); \ - (*_PREG) = (*_PREG)->y_u.llll.l4; \ + copy_jmp_address((*_PREG)->u.llll.l4); \ + (*_PREG) = (*_PREG)->u.llll.l4; \ JMPNext(); \ } \ } \ if (nonvar) { \ if (IsPairTerm(d0)) { \ (*_SREG) = RepPair(d0); \ - copy_jmp_address((*_PREG)->y_u.llll.l1); \ - (*_PREG) = (*_PREG)->y_u.llll.l1; \ + copy_jmp_address((*_PREG)->u.llll.l1); \ + (*_PREG) = (*_PREG)->u.llll.l1; \ JMPNext(); \ } \ else if (!IsApplTerm(d0)) { \ - copy_jmp_address((*_PREG)->y_u.llll.l2); \ - (*_PREG) = (*_PREG)->y_u.llll.l2; \ + copy_jmp_address((*_PREG)->u.llll.l2); \ + (*_PREG) = (*_PREG)->u.llll.l2; \ I_R = d0; \ JMPNext(); \ } \ else { \ - copy_jmp_address((*_PREG)->y_u.llll.l3); \ - (*_PREG) = (*_PREG)->y_u.llll.l3; \ + copy_jmp_address((*_PREG)->u.llll.l3); \ + (*_PREG) = (*_PREG)->u.llll.l3; \ (*_SREG) = RepAppl(d0); \ JMPNext(); \ } \ @@ -71,7 +71,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL *pt0; \ - ALWAYS_LOOKAHEAD((*_PREG)->y_u.ollll.pop); \ + ALWAYS_LOOKAHEAD((*_PREG)->u.ollll.pop); \ d0 = CACHED_A1(); \ Int nonvar = 0; \ Int pair = 1; \ @@ -80,18 +80,18 @@ do { \ if (!IsVarTerm(d0)) { \ if (d0 == TermNil) { \ - (*_PREG) = (*_PREG)->y_u.ollll.l2; \ + (*_PREG) = (*_PREG)->u.ollll.l2; \ JMPNext(); \ } \ else { \ if (IsApplTerm(d0)) { \ - copy_jmp_address((*_PREG)->y_u.ollll.l3); \ - (*_PREG) = (*_PREG)->y_u.ollll.l3; \ + copy_jmp_address((*_PREG)->u.ollll.l3); \ + (*_PREG) = (*_PREG)->u.ollll.l3; \ (*_SREG) = RepAppl(d0); \ JMPNext(); \ } else { \ - copy_jmp_address((*_PREG)->y_u.ollll.l3); \ - (*_PREG) = (*_PREG)->y_u.ollll.l3; \ + copy_jmp_address((*_PREG)->u.ollll.l3); \ + (*_PREG) = (*_PREG)->u.ollll.l3; \ I_R = d0; \ JMPNext(); \ } \ @@ -108,14 +108,14 @@ } \ } while (TRUE); \ if (!nonvar && !pair) { \ - copy_jmp_address((*_PREG)->y_u.ollll.l4); \ - (*_PREG) = (*_PREG)->y_u.ollll.l4; \ + copy_jmp_address((*_PREG)->u.ollll.l4); \ + (*_PREG) = (*_PREG)->u.ollll.l4; \ JMPNext(); \ } \ } \ if (!nonvar && pair) { \ - copy_jmp_address((*_PREG)->y_u.ollll.l1); \ - (*_PREG) = (*_PREG)->y_u.ollll.l1; \ + copy_jmp_address((*_PREG)->u.ollll.l1); \ + (*_PREG) = (*_PREG)->u.ollll.l1; \ (*_SREG) = RepPair(d0); \ ALWAYS_GONext(); \ } @@ -125,7 +125,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL *pt0; \ - ALWAYS_LOOKAHEAD((*_PREG)->y_u.ollll.pop); \ + ALWAYS_LOOKAHEAD((*_PREG)->u.ollll.pop); \ d0 = CACHED_A1(); \ Int nonvar = 0; \ if (IsVarTerm(d0)) { \ @@ -140,31 +140,31 @@ (d0) = *(CELL *)(d0); \ } \ if (!nonvar) { \ - copy_jmp_address((*_PREG)->y_u.ollll.l4); \ - (*_PREG) = (*_PREG)->y_u.ollll.l4; \ + copy_jmp_address((*_PREG)->u.ollll.l4); \ + (*_PREG) = (*_PREG)->u.ollll.l4; \ JMPNext(); \ } \ } \ if (nonvar) { \ if (__builtin_expect(IsPairTerm(d0),1)) { \ - copy_jmp_address((*_PREG)->y_u.ollll.l1); \ - (*_PREG) = (*_PREG)->y_u.ollll.l1; \ + copy_jmp_address((*_PREG)->u.ollll.l1); \ + (*_PREG) = (*_PREG)->u.ollll.l1; \ (*_SREG) = RepPair(d0); \ ALWAYS_GONext(); \ } \ if (d0 == TermNil) { \ - (*_PREG) = (*_PREG)->y_u.ollll.l2; \ + (*_PREG) = (*_PREG)->u.ollll.l2; \ JMPNext(); \ } \ else { \ if (IsApplTerm(d0)) { \ - copy_jmp_address((*_PREG)->y_u.ollll.l3); \ - (*_PREG) = (*_PREG)->y_u.ollll.l3; \ + copy_jmp_address((*_PREG)->u.ollll.l3); \ + (*_PREG) = (*_PREG)->u.ollll.l3; \ (*_SREG) = RepAppl(d0); \ JMPNext(); \ } else { \ - copy_jmp_address((*_PREG)->y_u.ollll.l3); \ - (*_PREG) = (*_PREG)->y_u.ollll.l3; \ + copy_jmp_address((*_PREG)->u.ollll.l3); \ + (*_PREG) = (*_PREG)->u.ollll.l3; \ I_R = d0; \ JMPNext(); \ } \ @@ -180,7 +180,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xllll.x); \ + d0 = XREG((*_PREG)->u.xllll.x); \ Int nonvar = 1; \ if (IsVarTerm(d0)) { \ nonvar = 0; \ @@ -195,27 +195,27 @@ (d0) = *(CELL *)(d0); \ } \ if (!nonvar) { \ - copy_jmp_address((*_PREG)->y_u.xllll.l4); \ - (*_PREG) = (*_PREG)->y_u.xllll.l4; \ + copy_jmp_address((*_PREG)->u.xllll.l4); \ + (*_PREG) = (*_PREG)->u.xllll.l4; \ JMPNext(); \ } \ } \ if (nonvar) { \ if (IsPairTerm(d0)) { \ - copy_jmp_address((*_PREG)->y_u.xllll.l1); \ - (*_PREG) = (*_PREG)->y_u.xllll.l1; \ + copy_jmp_address((*_PREG)->u.xllll.l1); \ + (*_PREG) = (*_PREG)->u.xllll.l1; \ (*_SREG) = RepPair(d0); \ JMPNext(); \ } \ else if (!IsApplTerm(d0)) { \ - copy_jmp_address((*_PREG)->y_u.xllll.l2); \ - (*_PREG) = (*_PREG)->y_u.xllll.l2; \ + copy_jmp_address((*_PREG)->u.xllll.l2); \ + (*_PREG) = (*_PREG)->u.xllll.l2; \ I_R = d0; \ JMPNext(); \ } \ else { \ - copy_jmp_address((*_PREG)->y_u.xllll.l3); \ - (*_PREG) = (*_PREG)->y_u.xllll.l3; \ + copy_jmp_address((*_PREG)->u.xllll.l3); \ + (*_PREG) = (*_PREG)->u.xllll.l3; \ (*_SREG) = RepAppl(d0); \ JMPNext(); \ } \ @@ -229,7 +229,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL *pt0; \ - d0 = (*_SREG)[(*_PREG)->y_u.sllll.s]; \ + d0 = (*_SREG)[(*_PREG)->u.sllll.s]; \ Int nonvar = 1; \ if (IsVarTerm(d0)) { \ nonvar = 0; \ @@ -244,27 +244,27 @@ (d0) = *(CELL *)(d0); \ } \ if (!nonvar) { \ - copy_jmp_address((*_PREG)->y_u.sllll.l4); \ - (*_PREG) = (*_PREG)->y_u.sllll.l4; \ + copy_jmp_address((*_PREG)->u.sllll.l4); \ + (*_PREG) = (*_PREG)->u.sllll.l4; \ JMPNext(); \ } \ } \ if (nonvar) { \ if (IsPairTerm(d0)) { \ - copy_jmp_address((*_PREG)->y_u.sllll.l1); \ - (*_PREG) = (*_PREG)->y_u.sllll.l1; \ + copy_jmp_address((*_PREG)->u.sllll.l1); \ + (*_PREG) = (*_PREG)->u.sllll.l1; \ (*_SREG) = RepPair(d0); \ JMPNext(); \ } \ else if (!IsApplTerm(d0)) { \ - copy_jmp_address((*_PREG)->y_u.sllll.l2); \ - (*_PREG) = (*_PREG)->y_u.sllll.l2; \ + copy_jmp_address((*_PREG)->u.sllll.l2); \ + (*_PREG) = (*_PREG)->u.sllll.l2; \ I_R = d0; \ JMPNext(); \ } \ else { \ - copy_jmp_address((*_PREG)->y_u.sllll.l3); \ - (*_PREG) = (*_PREG)->y_u.sllll.l3; \ + copy_jmp_address((*_PREG)->u.sllll.l3); \ + (*_PREG) = (*_PREG)->u.sllll.l3; \ (*_SREG) = RepAppl(d0); \ JMPNext(); \ } \ @@ -293,8 +293,8 @@ (d0) = *(CELL *)(d0); \ } \ if (!nonvar) { \ - copy_jmp_address((*_PREG)->y_u.l.l); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + copy_jmp_address((*_PREG)->u.l.l); \ + (*_PREG) = (*_PREG)->u.l.l; \ JMPNext(); \ } \ } \ @@ -311,7 +311,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xll.x); \ + d0 = XREG((*_PREG)->u.xll.x); \ Int nonvar = 0; \ if (IsVarTerm(d0)) { \ (pt0) = (CELL *)(d0); \ @@ -330,8 +330,8 @@ } \ } \ if (nonvar) { \ - copy_jmp_address((*_PREG)->y_u.xll.l1); \ - (*_PREG) = (*_PREG)->y_u.xll.l1; \ + copy_jmp_address((*_PREG)->u.xll.l1); \ + (*_PREG) = (*_PREG)->u.xll.l1; \ JMPNext(); \ } @@ -358,20 +358,20 @@ (d0) = *(CELL *)(d0); \ } \ if (!nonvar) { \ - copy_jmp_address((*_PREG)->y_u.clll.l3); \ - (*_PREG) = (*_PREG)->y_u.clll.l3; \ + copy_jmp_address((*_PREG)->u.clll.l3); \ + (*_PREG) = (*_PREG)->u.clll.l3; \ JMPNext(); \ } \ } \ if (nonvar) { \ - if (d0 == (*_PREG)->y_u.clll.c) { \ - copy_jmp_address((*_PREG)->y_u.clll.l2); \ - (*_PREG) = (*_PREG)->y_u.clll.l2; \ + if (d0 == (*_PREG)->u.clll.c) { \ + copy_jmp_address((*_PREG)->u.clll.l2); \ + (*_PREG) = (*_PREG)->u.clll.l2; \ JMPNext(); \ } \ else { \ - copy_jmp_address((*_PREG)->y_u.clll.l1); \ - (*_PREG) = (*_PREG)->y_u.clll.l1; \ + copy_jmp_address((*_PREG)->u.clll.l1); \ + (*_PREG) = (*_PREG)->u.clll.l1; \ JMPNext(); \ } \ } @@ -379,7 +379,7 @@ #define IF_NOT_THEN_END \ BLOCK = (CELL)IF_NOT_THEN_END; -#define HASH_SHIFT 6 +#define HRASH_SHIFT 6 #define SWITCH_ON_FUNC_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ @@ -389,10 +389,10 @@ d1 = *(*_SREG)++; \ { \ CELL \ - Mask = ((*_PREG)->y_u.sssl.s - 1) << 1, \ - hash = d1 >> (HASH_SHIFT - 1) & Mask; \ + Mask = ((*_PREG)->u.sssl.s - 1) << 1, \ + hash = d1 >> (HRASH_SHIFT - 1) & Mask; \ CELL *base; \ - base = (CELL *)(*_PREG)->y_u.sssl.l; \ + base = (CELL *)(*_PREG)->u.sssl.l; \ pt0 = base + hash; \ d0 = pt0[0]; \ if (d0 == d1 || d0 == 0) { \ @@ -426,10 +426,10 @@ d1 = I_R; \ { \ CELL \ - Mask = ((*_PREG)->y_u.sssl.s - 1) << 1, \ - hash = d1 >> (HASH_SHIFT - 1) & Mask; \ + Mask = ((*_PREG)->u.sssl.s - 1) << 1, \ + hash = d1 >> (HRASH_SHIFT - 1) & Mask; \ CELL *base; \ - base = (CELL *)(*_PREG)->y_u.sssl.l; \ + base = (CELL *)(*_PREG)->u.sssl.l; \ pt0 = base + hash; \ d0 = pt0[0]; \ if (d0 == d1 || d0 == 0) { \ @@ -460,7 +460,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ { \ - CELL *pt = (CELL *)((*_PREG)->y_u.sssl.l); \ + CELL *pt = (CELL *)((*_PREG)->u.sssl.l); \ d0 = *(*_SREG)++; \ if (d0 == pt[0]) { \ copy_jmp_addressa(pt+1); \ @@ -481,7 +481,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ { \ - CELL *pt = (CELL *)((*_PREG)->y_u.sssl.l); \ + CELL *pt = (CELL *)((*_PREG)->u.sssl.l); \ d0 = I_R; \ if (d0 == pt[0]) { \ copy_jmp_addressa(pt+1); \ @@ -502,7 +502,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d1; \ register CELL *pt0; \ - pt0 = (CELL *) (*_PREG)->y_u.sssl.l; \ + pt0 = (CELL *) (*_PREG)->u.sssl.l; \ d1 = *(*_SREG)++; \ while (pt0[0] != d1 && pt0[0] != (CELL)NULL ) { \ pt0 += 2; \ @@ -519,7 +519,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d1; \ register CELL *pt0; \ - pt0 = (CELL *) (*_PREG)->y_u.sssl.l; \ + pt0 = (CELL *) (*_PREG)->u.sssl.l; \ d1 = I_R; \ while (pt0[0] != d1 && pt0[0] != 0L ) { \ pt0 += 2; \ diff --git a/JIT/HPP/indexing_std.h b/JIT/HPP/indexing_std.h index b4c2606b0..54211a91f 100644 --- a/JIT/HPP/indexing_std.h +++ b/JIT/HPP/indexing_std.h @@ -2,8 +2,8 @@ BLOCKADDRESS = (CELL)(*_PREG); \ check_trail(TR); \ CACHE_Y(YREG); \ - store_at_least_one_arg((*_PREG)->y_u.Otapl.s); \ - store_yaam_regs((*_PREG)->y_u.Otapl.d, 0); \ + store_at_least_one_arg((*_PREG)->u.Otapl.s); \ + store_yaam_regs((*_PREG)->u.Otapl.d, 0); \ set_cut(S_YREG, B); \ B = B_YREG; @@ -21,8 +21,8 @@ #define RETRY_ME_INSTINIT \ CACHE_Y(B); \ - restore_yaam_regs((*_PREG)->y_u.Otapl.d); \ - restore_at_least_one_arg((*_PREG)->y_u.Otapl.s); + restore_yaam_regs((*_PREG)->u.Otapl.d); \ + restore_at_least_one_arg((*_PREG)->u.Otapl.s); #ifdef FROZEN_STACKS #define RETRY_ME_FROZEN \ @@ -47,14 +47,14 @@ #define TRUST_ME_YAPOR_IF \ if (SCH_top_shared_cp(B)) { \ SCH_last_alternative((*_PREG), B_YREG); \ - restore_at_least_one_arg((*_PREG)->y_u.Otapl.s); \ + restore_at_least_one_arg((*_PREG)->u.Otapl.s); \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B->cp_b); \ } \ else \ { \ pop_yaam_regs(); \ - pop_at_least_one_arg((*_PREG)->y_u.Otapl.s); \ + pop_at_least_one_arg((*_PREG)->u.Otapl.s); \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B); \ } @@ -62,13 +62,13 @@ #define TRUST_ME_YAPOR_IF \ if (SCH_top_shared_cp(B)) { \ SCH_last_alternative((*_PREG), B_YREG); \ - restore_at_least_one_arg((*_PREG)->y_u.Otapl.s); \ + restore_at_least_one_arg((*_PREG)->u.Otapl.s); \ set_cut(S_YREG, B->cp_b); \ } \ else \ { \ pop_yaam_regs(); \ - pop_at_least_one_arg((*_PREG)->y_u.Otapl.s); \ + pop_at_least_one_arg((*_PREG)->u.Otapl.s); \ set_cut(S_YREG, B); \ } #endif /* FROZEN STACKS */ @@ -77,7 +77,7 @@ #define TRUST_ME_YAPOR_IF \ { \ pop_yaam_regs(); \ - pop_at_least_one_arg((*_PREG)->y_u.Otapl.s); \ + pop_at_least_one_arg((*_PREG)->u.Otapl.s); \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B); \ } @@ -85,7 +85,7 @@ #define TRUST_ME_IF \ { \ pop_yaam_regs(); \ - pop_at_least_one_arg((*_PREG)->y_u.Otapl.s); \ + pop_at_least_one_arg((*_PREG)->u.Otapl.s); \ set_cut(S_YREG, B); \ } #endif /* FROZEN STACKS */ @@ -98,26 +98,26 @@ GONext(); #define ENTER_PROFILING_INSTINIT \ - LOCK((*_PREG)->y_u.p.p->StatisticsForPred.lock); \ - (*_PREG)->y_u.p.p->StatisticsForPred.NOfEntries++; \ - UNLOCK((*_PREG)->y_u.p.p->StatisticsForPred.lock); \ + LOCK((*_PREG)->u.p.p->StatisticsForPred.lock); \ + (*_PREG)->u.p.p->StatisticsForPred.NOfEntries++; \ + UNLOCK((*_PREG)->u.p.p->StatisticsForPred.lock); \ (*_PREG) = NEXTOP((*_PREG), p); \ GONext(); #define RETRY_PROFILED_INSTINIT \ - LOCK((*_PREG)->y_u.p.p->StatisticsForPred.lock); \ - (*_PREG)->y_u.p.p->StatisticsForPred.NOfRetries++; \ - UNLOCK((*_PREG)->y_u.p.p->StatisticsForPred.lock); \ + LOCK((*_PREG)->u.p.p->StatisticsForPred.lock); \ + (*_PREG)->u.p.p->StatisticsForPred.NOfRetries++; \ + UNLOCK((*_PREG)->u.p.p->StatisticsForPred.lock); \ (*_PREG) = NEXTOP((*_PREG), p); \ GONext(); #define PROFILED_RETRY_ME_INSTINIT \ CACHE_Y(B); \ - LOCK((*_PREG)->y_u.Otapl.p->StatisticsForPred.lock); \ - (*_PREG)->y_u.Otapl.p->StatisticsForPred.NOfRetries++; \ - UNLOCK((*_PREG)->y_u.Otapl.p->StatisticsForPred.lock); \ - restore_yaam_regs((*_PREG)->y_u.Otapl.d); \ - restore_args((*_PREG)->y_u.Otapl.s); + LOCK((*_PREG)->u.Otapl.p->StatisticsForPred.lock); \ + (*_PREG)->u.Otapl.p->StatisticsForPred.NOfRetries++; \ + UNLOCK((*_PREG)->u.Otapl.p->StatisticsForPred.lock); \ + restore_yaam_regs((*_PREG)->u.Otapl.d); \ + restore_args((*_PREG)->u.Otapl.s); #ifdef FROZEN_STACKS #define PROFILED_RETRY_ME_FROZEN \ @@ -142,14 +142,14 @@ #define PROFILED_TRUST_ME_IF \ if (SCH_top_shared_cp(B)) { \ SCH_last_alternative((*_PREG), B_YREG); \ - restore_args((*_PREG)->y_u.Otapl.s); \ + restore_args((*_PREG)->u.Otapl.s); \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B->cp_b); \ } \ else \ { \ pop_yaam_regs(); \ - pop_args((*_PREG)->y_u.Otapl.s); \ + pop_args((*_PREG)->u.Otapl.s); \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B); \ } @@ -157,13 +157,13 @@ #define PROFILED_TRUST_ME_IF \ if (SCH_top_shared_cp(B)) { \ SCH_last_alternative((*_PREG), B_YREG); \ - restore_args((*_PREG)->y_u.Otapl.s); \ + restore_args((*_PREG)->u.Otapl.s); \ set_cut(S_YREG, B->cp_b); \ } \ else \ { \ pop_yaam_regs(); \ - pop_args((*_PREG)->y_u.Otapl.s); \ + pop_args((*_PREG)->u.Otapl.s); \ set_cut(S_YREG, B); \ } #endif /* FROZEN_STACKS */ @@ -172,7 +172,7 @@ #define PROFILED_TRUST_ME_IF \ { \ pop_yaam_regs(); \ - pop_args((*_PREG)->y_u.Otapl.s); \ + pop_args((*_PREG)->u.Otapl.s); \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B); \ } @@ -180,7 +180,7 @@ #define PROFILED_TRUST_ME_IF \ { \ pop_yaam_regs(); \ - pop_args((*_PREG)->y_u.Otapl.s); \ + pop_args((*_PREG)->u.Otapl.s); \ set_cut(S_YREG, B); \ } #endif /* FROZEN_STACKS */ @@ -189,9 +189,9 @@ #define PROFILED_TRUST_ME_END \ SET_BB(B_YREG); \ ENDCACHE_Y(); \ - LOCK((*_PREG)->y_u.Otapl.p->StatisticsForPred.lock); \ - (*_PREG)->y_u.Otapl.p->StatisticsForPred.NOfRetries++; \ - UNLOCK((*_PREG)->y_u.Otapl.p->StatisticsForPred.lock); \ + LOCK((*_PREG)->u.Otapl.p->StatisticsForPred.lock); \ + (*_PREG)->u.Otapl.p->StatisticsForPred.NOfRetries++; \ + UNLOCK((*_PREG)->u.Otapl.p->StatisticsForPred.lock); \ (*_PREG) = NEXTOP((*_PREG), Otapl); \ GONext(); @@ -200,26 +200,26 @@ { \ UInt timestamp; \ CACHE_Y(B); \ - timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[(*_PREG)->y_u.OtaLl.s]); \ - if (!VALID_TIMESTAMP(timestamp, (*_PREG)->y_u.OtaLl.d)) { \ - (*_PREG)=(*_PREG)->y_u.OtaLl.n; \ + timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[(*_PREG)->u.OtaLl.s]); \ + if (!VALID_TIMESTAMP(timestamp, (*_PREG)->u.OtaLl.d)) { \ + (*_PREG)=(*_PREG)->u.OtaLl.n; \ JMPNext(); \ } \ else { \ - restore_yaam_regs((*_PREG)->y_u.OtaLl.n); \ - restore_args((*_PREG)->y_u.OtaLl.s); \ - LOCK((*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); \ - (*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; \ - UNLOCK((*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); \ + restore_yaam_regs((*_PREG)->u.OtaLl.n); \ + restore_args((*_PREG)->u.OtaLl.s); \ + LOCK((*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.lock); \ + (*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; \ + UNLOCK((*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.lock); \ } #ifdef THREADS #define PROFILED_RETRY_LOGICAL_THREADS \ - PP = (*_PREG)->y_u.OtaLl.d->ClPred; + PP = (*_PREG)->u.OtaLl.d->ClPred; #endif #define PROFILED_RETRY_LOGICAL_POST_THREADS \ - (*_PREG) = (*_PREG)->y_u.OtaLl.d->ClCode; + (*_PREG) = (*_PREG)->u.OtaLl.d->ClCode; #ifdef FROZEN_STACKS #define PROFILED_RETRY_LOGICAL_FROZEN \ @@ -245,9 +245,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -302,9 +302,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -360,9 +360,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -411,9 +411,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -466,9 +466,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ @@ -528,9 +528,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -590,9 +590,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -645,9 +645,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ @@ -704,9 +704,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -764,9 +764,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -825,9 +825,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -879,9 +879,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -939,9 +939,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ check_trail(TR); \ CACHE_Y(YREG); \ - store_at_least_one_arg((*_PREG)->y_u.Otapl.s); \ + store_at_least_one_arg((*_PREG)->u.Otapl.s); \ store_yaam_regs(NEXTOP((*_PREG), Otapl), 0); \ - (*_PREG) = (*_PREG)->y_u.Otapl.d; \ + (*_PREG) = (*_PREG)->u.Otapl.d; \ set_cut(S_YREG, B); \ B = B_YREG; @@ -967,7 +967,7 @@ B_YREG->cp_a1 = x1; \ B_YREG->cp_a2 = x2; \ } \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ set_cut(S_YREG, B); \ B = B_YREG; @@ -993,7 +993,7 @@ B_YREG->cp_a2 = ARG2; \ B_YREG->cp_a3 = ARG3; \ } \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ set_cut(S_YREG, B); \ B = B_YREG; @@ -1019,7 +1019,7 @@ B_YREG->cp_a3 = ARG3; \ B_YREG->cp_a4 = ARG4; \ } \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ set_cut(S_YREG, B); \ B = B_YREG; @@ -1038,7 +1038,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ restore_yaam_regs(NEXTOP((*_PREG), Otapl)); \ - restore_at_least_one_arg((*_PREG)->y_u.Otapl.s); + restore_at_least_one_arg((*_PREG)->u.Otapl.s); #ifdef FROZEN_STACKS #define RETRY_FROZEN \ @@ -1053,14 +1053,14 @@ BLOCK = (CELL)RETRY_END; \ SET_BB(B_YREG); \ ENDCACHE_Y(); \ - (*_PREG) = (*_PREG)->y_u.Otapl.d; \ + (*_PREG) = (*_PREG)->u.Otapl.d; \ JMPNext(); #define RETRY2_INSTINIT \ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ restore_yaam_regs(NEXTOP((*_PREG), l)); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ ARG1 = B_YREG->cp_a1; \ ARG2 = B_YREG->cp_a2; @@ -1083,7 +1083,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ restore_yaam_regs(NEXTOP((*_PREG), l)); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ ARG1 = B_YREG->cp_a1; \ ARG2 = B_YREG->cp_a2; \ ARG3 = B_YREG->cp_a3; @@ -1107,7 +1107,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ restore_yaam_regs(NEXTOP((*_PREG), l)); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ ARG1 = B_YREG->cp_a1; \ ARG2 = B_YREG->cp_a2; \ ARG3 = B_YREG->cp_a3; \ @@ -1136,7 +1136,7 @@ #define TRUST_IFOK_INIT \ if (SCH_top_shared_cp(B)) { \ SCH_last_alternative((*_PREG), B_YREG); \ - restore_at_least_one_arg((*_PREG)->y_u.Otapl.s); + restore_at_least_one_arg((*_PREG)->u.Otapl.s); #ifdef FROZEN_STACKS #define TRUST_IFOK_FROZEN \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); @@ -1150,7 +1150,7 @@ #define TRUST_NOIF_INIT \ { \ pop_yaam_regs(); \ - pop_at_least_one_arg((*_PREG)->y_u.Otapl.s); + pop_at_least_one_arg((*_PREG)->u.Otapl.s); #ifdef FROZEN_STACKS #define TRUST_NOIF_FROZEN \ @@ -1163,22 +1163,22 @@ } \ SET_BB(B_YREG); \ ENDCACHE_Y(); \ - (*_PREG) = (*_PREG)->y_u.Otapl.d; \ + (*_PREG) = (*_PREG)->u.Otapl.d; \ JMPNext(); #define TRY_IN_INSTINIT \ BLOCKADDRESS = (CELL)(*_PREG); \ B->cp_ap = NEXTOP((*_PREG), l); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ JMPNext(); #define TRY_IN_END \ BLOCK = (CELL)TRY_IN_END; #define SPY_OR_TRYMARK_INSTINIT \ - PELOCK(5, ((PredEntry *)((*_PREG)->y_u.Otapl.p))); \ - (*_PREG) = (yamop *)(&(((PredEntry *)((*_PREG)->y_u.Otapl.p))->OpcodeOfPred)); \ - UNLOCKPE(11,(PredEntry *)((*_PREG)->y_u.Otapl.p)); \ + PELOCK(5, ((PredEntry *)((*_PREG)->u.Otapl.p))); \ + (*_PREG) = (yamop *)(&(((PredEntry *)((*_PREG)->u.Otapl.p))->OpcodeOfPred)); \ + UNLOCKPE(11,(PredEntry *)((*_PREG)->u.Otapl.p)); \ return external_labels[12]; #define TRY_AND_MARK_INSTINIT \ @@ -1193,14 +1193,14 @@ #define TRY_AND_MARK_YAPOR_THREADS_NOYAPOR_IF \ BLOCK = (CELL)TRY_AND_MARK_YAPOR_THREADS_NOYAPOR_IF; \ - if ((*_PREG)->y_u.Otapl.p->PredFlags & LogUpdatePredFlag) { \ - PELOCK(6,(*_PREG)->y_u.Otapl.p); \ - PP = (*_PREG)->y_u.Otapl.p; \ + if ((*_PREG)->u.Otapl.p->PredFlags & LogUpdatePredFlag) { \ + PELOCK(6,(*_PREG)->u.Otapl.p); \ + PP = (*_PREG)->u.Otapl.p; \ } \ - if ((*_PREG)->y_u.Otapl.p->CodeOfPred != (*_PREG)) { \ + if ((*_PREG)->u.Otapl.p->CodeOfPred != (*_PREG)) { \ PP = NULL; \ - (*_PREG) = (*_PREG)->y_u.Otapl.p->CodeOfPred; \ - UNLOCKPE(12,(*_PREG)->y_u.Otapl.p); \ + (*_PREG) = (*_PREG)->u.Otapl.p->CodeOfPred; \ + UNLOCKPE(12,(*_PREG)->u.Otapl.p); \ save_pc(); \ JMPNext(); \ } @@ -1208,11 +1208,11 @@ #define TRY_AND_MARK_NOYAPOR_NOTHREADS \ CACHE_Y(YREG); \ - (*_PREG) = (*_PREG)->y_u.Otapl.d; \ + (*_PREG) = (*_PREG)->u.Otapl.d; \ LOCK(DynamicLock((*_PREG))); \ - UNLOCKPE(13,((PredEntry *)((*_PREG)->y_u.Otapl.p))); \ + UNLOCKPE(13,((PredEntry *)((*_PREG)->u.Otapl.p))); \ BEGD(d1); \ - d1 = (*_PREG)->y_u.Otapl.s; \ + d1 = (*_PREG)->u.Otapl.s; \ store_args(d1); \ store_yaam_regs((*_PREG), 0); \ ENDD(d1); \ @@ -1264,9 +1264,9 @@ } #define PROFILED_RETRY_AND_MARK_INSTINIT \ - LOCK(((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.lock); \ - ((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.NOfRetries++; \ - UNLOCK(((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.lock); \ + LOCK(((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.lock); \ + ((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.NOfRetries++; \ + UNLOCK(((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.lock); \ #define RETRY_AND_MARK_INSTINIT @@ -1276,13 +1276,13 @@ #endif #define RETRY_AND_MARK_POST_YAPOR \ - PELOCK(7,(*_PREG)->y_u.Otapl.p); \ + PELOCK(7,(*_PREG)->u.Otapl.p); \ CACHE_Y(B); \ - (*_PREG) = (*_PREG)->y_u.Otapl.d; \ + (*_PREG) = (*_PREG)->u.Otapl.d; \ LOCK(DynamicLock((*_PREG))); \ - UNLOCK((*_PREG)->y_u.Otapl.p->PELock); \ + UNLOCK((*_PREG)->u.Otapl.p->PELock); \ restore_yaam_regs((*_PREG)); \ - restore_args((*_PREG)->y_u.Otapl.s); + restore_args((*_PREG)->u.Otapl.s); #ifdef FROZEN_STACKS #define RETRY_AND_MARK_FROZEN \ diff --git a/JIT/HPP/indexing_std_d.h b/JIT/HPP/indexing_std_d.h index 1f39b0bf5..7a1f490ef 100644 --- a/JIT/HPP/indexing_std_d.h +++ b/JIT/HPP/indexing_std_d.h @@ -3,8 +3,8 @@ BLOCKADDRESS = (CELL)(*_PREG); \ check_trail(TR); \ CACHE_Y(YREG); \ - store_at_least_one_arg((*_PREG)->y_u.Otapl.s); \ - store_yaam_regs((*_PREG)->y_u.Otapl.d, 0); \ + store_at_least_one_arg((*_PREG)->u.Otapl.s); \ + store_yaam_regs((*_PREG)->u.Otapl.d, 0); \ set_cut(S_YREG, B); \ B = B_YREG; @@ -23,8 +23,8 @@ #define RETRY_ME_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ CACHE_Y(B); \ - restore_yaam_regs((*_PREG)->y_u.Otapl.d); \ - restore_at_least_one_arg((*_PREG)->y_u.Otapl.s); + restore_yaam_regs((*_PREG)->u.Otapl.d); \ + restore_at_least_one_arg((*_PREG)->u.Otapl.s); #ifdef FROZEN_STACKS #define RETRY_ME_FROZEN \ @@ -50,14 +50,14 @@ #define TRUST_ME_YAPOR_IF \ if (SCH_top_shared_cp(B)) { \ SCH_last_alternative((*_PREG), B_YREG); \ - restore_at_least_one_arg((*_PREG)->y_u.Otapl.s); \ + restore_at_least_one_arg((*_PREG)->u.Otapl.s); \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B->cp_b); \ } \ else \ { \ pop_yaam_regs(); \ - pop_at_least_one_arg((*_PREG)->y_u.Otapl.s); \ + pop_at_least_one_arg((*_PREG)->u.Otapl.s); \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B); \ } @@ -65,13 +65,13 @@ #define TRUST_ME_YAPOR_IF \ if (SCH_top_shared_cp(B)) { \ SCH_last_alternative((*_PREG), B_YREG); \ - restore_at_least_one_arg((*_PREG)->y_u.Otapl.s); \ + restore_at_least_one_arg((*_PREG)->u.Otapl.s); \ set_cut(S_YREG, B->cp_b); \ } \ else \ { \ pop_yaam_regs(); \ - pop_at_least_one_arg((*_PREG)->y_u.Otapl.s); \ + pop_at_least_one_arg((*_PREG)->u.Otapl.s); \ set_cut(S_YREG, B); \ } #endif /* FROZEN STACKS */ @@ -80,7 +80,7 @@ #define TRUST_ME_YAPOR_IF \ { \ pop_yaam_regs(); \ - pop_at_least_one_arg((*_PREG)->y_u.Otapl.s); \ + pop_at_least_one_arg((*_PREG)->u.Otapl.s); \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B); \ } @@ -88,7 +88,7 @@ #define TRUST_ME_IF \ { \ pop_yaam_regs(); \ - pop_at_least_one_arg((*_PREG)->y_u.Otapl.s); \ + pop_at_least_one_arg((*_PREG)->u.Otapl.s); \ set_cut(S_YREG, B); \ } #endif /* FROZEN STACKS */ @@ -102,28 +102,28 @@ #define ENTER_PROFILING_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - LOCK((*_PREG)->y_u.p.p->StatisticsForPred.lock); \ - (*_PREG)->y_u.p.p->StatisticsForPred.NOfEntries++; \ - UNLOCK((*_PREG)->y_u.p.p->StatisticsForPred.lock); \ + LOCK((*_PREG)->u.p.p->StatisticsForPred.lock); \ + (*_PREG)->u.p.p->StatisticsForPred.NOfEntries++; \ + UNLOCK((*_PREG)->u.p.p->StatisticsForPred.lock); \ (*_PREG) = NEXTOP((*_PREG), p); \ GONext(); #define RETRY_PROFILED_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - LOCK((*_PREG)->y_u.p.p->StatisticsForPred.lock); \ - (*_PREG)->y_u.p.p->StatisticsForPred.NOfRetries++; \ - UNLOCK((*_PREG)->y_u.p.p->StatisticsForPred.lock); \ + LOCK((*_PREG)->u.p.p->StatisticsForPred.lock); \ + (*_PREG)->u.p.p->StatisticsForPred.NOfRetries++; \ + UNLOCK((*_PREG)->u.p.p->StatisticsForPred.lock); \ (*_PREG) = NEXTOP((*_PREG), p); \ GONext(); #define PROFILED_RETRY_ME_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ CACHE_Y(B); \ - LOCK((*_PREG)->y_u.Otapl.p->StatisticsForPred.lock); \ - (*_PREG)->y_u.Otapl.p->StatisticsForPred.NOfRetries++; \ - UNLOCK((*_PREG)->y_u.Otapl.p->StatisticsForPred.lock); \ - restore_yaam_regs((*_PREG)->y_u.Otapl.d); \ - restore_args((*_PREG)->y_u.Otapl.s); + LOCK((*_PREG)->u.Otapl.p->StatisticsForPred.lock); \ + (*_PREG)->u.Otapl.p->StatisticsForPred.NOfRetries++; \ + UNLOCK((*_PREG)->u.Otapl.p->StatisticsForPred.lock); \ + restore_yaam_regs((*_PREG)->u.Otapl.d); \ + restore_args((*_PREG)->u.Otapl.s); #ifdef FROZEN_STACKS #define PROFILED_RETRY_ME_FROZEN \ @@ -149,14 +149,14 @@ #define PROFILED_TRUST_ME_IF \ if (SCH_top_shared_cp(B)) { \ SCH_last_alternative((*_PREG), B_YREG); \ - restore_args((*_PREG)->y_u.Otapl.s); \ + restore_args((*_PREG)->u.Otapl.s); \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B->cp_b); \ } \ else \ { \ pop_yaam_regs(); \ - pop_args((*_PREG)->y_u.Otapl.s); \ + pop_args((*_PREG)->u.Otapl.s); \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B); \ } @@ -164,13 +164,13 @@ #define PROFILED_TRUST_ME_IF \ if (SCH_top_shared_cp(B)) { \ SCH_last_alternative((*_PREG), B_YREG); \ - restore_args((*_PREG)->y_u.Otapl.s); \ + restore_args((*_PREG)->u.Otapl.s); \ set_cut(S_YREG, B->cp_b); \ } \ else \ { \ pop_yaam_regs(); \ - pop_args((*_PREG)->y_u.Otapl.s); \ + pop_args((*_PREG)->u.Otapl.s); \ set_cut(S_YREG, B); \ } #endif /* FROZEN_STACKS */ @@ -179,7 +179,7 @@ #define PROFILED_TRUST_ME_IF \ { \ pop_yaam_regs(); \ - pop_args((*_PREG)->y_u.Otapl.s); \ + pop_args((*_PREG)->u.Otapl.s); \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B); \ } @@ -187,7 +187,7 @@ #define PROFILED_TRUST_ME_IF \ { \ pop_yaam_regs(); \ - pop_args((*_PREG)->y_u.Otapl.s); \ + pop_args((*_PREG)->u.Otapl.s); \ set_cut(S_YREG, B); \ } #endif /* FROZEN_STACKS */ @@ -196,9 +196,9 @@ #define PROFILED_TRUST_ME_END \ SET_BB(B_YREG); \ ENDCACHE_Y(); \ - LOCK((*_PREG)->y_u.Otapl.p->StatisticsForPred.lock); \ - (*_PREG)->y_u.Otapl.p->StatisticsForPred.NOfRetries++; \ - UNLOCK((*_PREG)->y_u.Otapl.p->StatisticsForPred.lock); \ + LOCK((*_PREG)->u.Otapl.p->StatisticsForPred.lock); \ + (*_PREG)->u.Otapl.p->StatisticsForPred.NOfRetries++; \ + UNLOCK((*_PREG)->u.Otapl.p->StatisticsForPred.lock); \ (*_PREG) = NEXTOP((*_PREG), Otapl); \ GONext(); @@ -208,26 +208,26 @@ { \ UInt timestamp; \ CACHE_Y(B); \ - timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[(*_PREG)->y_u.OtaLl.s]); \ - if (!VALID_TIMESTAMP(timestamp, (*_PREG)->y_u.OtaLl.d)) { \ - (*_PREG)=(*_PREG)->y_u.OtaLl.n; \ + timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[(*_PREG)->u.OtaLl.s]); \ + if (!VALID_TIMESTAMP(timestamp, (*_PREG)->u.OtaLl.d)) { \ + (*_PREG)=(*_PREG)->u.OtaLl.n; \ JMPNext(); \ } \ else { \ - restore_yaam_regs((*_PREG)->y_u.OtaLl.n); \ - restore_args((*_PREG)->y_u.OtaLl.s); \ - LOCK((*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); \ - (*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; \ - UNLOCK((*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); \ + restore_yaam_regs((*_PREG)->u.OtaLl.n); \ + restore_args((*_PREG)->u.OtaLl.s); \ + LOCK((*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.lock); \ + (*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; \ + UNLOCK((*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.lock); \ } #ifdef THREADS #define PROFILED_RETRY_LOGICAL_THREADS \ - PP = (*_PREG)->y_u.OtaLl.d->ClPred; + PP = (*_PREG)->u.OtaLl.d->ClPred; #endif #define PROFILED_RETRY_LOGICAL_POST_THREADS \ - (*_PREG) = (*_PREG)->y_u.OtaLl.d->ClCode; + (*_PREG) = (*_PREG)->u.OtaLl.d->ClCode; #ifdef FROZEN_STACKS #define PROFILED_RETRY_LOGICAL_FROZEN \ @@ -254,9 +254,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -312,9 +312,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -371,9 +371,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -423,9 +423,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -479,9 +479,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ @@ -542,9 +542,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -605,9 +605,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -661,9 +661,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ @@ -721,9 +721,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -782,9 +782,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -844,9 +844,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -899,9 +899,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -960,9 +960,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ check_trail(TR); \ CACHE_Y(YREG); \ - store_at_least_one_arg((*_PREG)->y_u.Otapl.s); \ + store_at_least_one_arg((*_PREG)->u.Otapl.s); \ store_yaam_regs(NEXTOP((*_PREG), Otapl), 0); \ - (*_PREG) = (*_PREG)->y_u.Otapl.d; \ + (*_PREG) = (*_PREG)->u.Otapl.d; \ set_cut(S_YREG, B); \ B = B_YREG; @@ -989,7 +989,7 @@ B_YREG->cp_a1 = x1; \ B_YREG->cp_a2 = x2; \ } \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ set_cut(S_YREG, B); \ B = B_YREG; @@ -1016,7 +1016,7 @@ B_YREG->cp_a2 = ARG2; \ B_YREG->cp_a3 = ARG3; \ } \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ set_cut(S_YREG, B); \ B = B_YREG; @@ -1043,7 +1043,7 @@ B_YREG->cp_a3 = ARG3; \ B_YREG->cp_a4 = ARG4; \ } \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ set_cut(S_YREG, B); \ B = B_YREG; @@ -1063,7 +1063,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ restore_yaam_regs(NEXTOP((*_PREG), Otapl)); \ - restore_at_least_one_arg((*_PREG)->y_u.Otapl.s); + restore_at_least_one_arg((*_PREG)->u.Otapl.s); #ifdef FROZEN_STACKS #define RETRY_FROZEN \ @@ -1078,7 +1078,7 @@ BLOCK = (CELL)RETRY_END; \ SET_BB(B_YREG); \ ENDCACHE_Y(); \ - (*_PREG) = (*_PREG)->y_u.Otapl.d; \ + (*_PREG) = (*_PREG)->u.Otapl.d; \ JMPNext(); #define RETRY2_INSTINIT \ @@ -1086,7 +1086,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ restore_yaam_regs(NEXTOP((*_PREG), l)); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ ARG1 = B_YREG->cp_a1; \ ARG2 = B_YREG->cp_a2; @@ -1110,7 +1110,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ restore_yaam_regs(NEXTOP((*_PREG), l)); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ ARG1 = B_YREG->cp_a1; \ ARG2 = B_YREG->cp_a2; \ ARG3 = B_YREG->cp_a3; @@ -1135,7 +1135,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ restore_yaam_regs(NEXTOP((*_PREG), l)); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ ARG1 = B_YREG->cp_a1; \ ARG2 = B_YREG->cp_a2; \ ARG3 = B_YREG->cp_a3; \ @@ -1165,7 +1165,7 @@ #define TRUST_IFOK_INIT \ if (SCH_top_shared_cp(B)) { \ SCH_last_alternative((*_PREG), B_YREG); \ - restore_at_least_one_arg((*_PREG)->y_u.Otapl.s); + restore_at_least_one_arg((*_PREG)->u.Otapl.s); #ifdef FROZEN_STACKS #define TRUST_IFOK_FROZEN \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); @@ -1179,7 +1179,7 @@ #define TRUST_NOIF_INIT \ { \ pop_yaam_regs(); \ - pop_at_least_one_arg((*_PREG)->y_u.Otapl.s); + pop_at_least_one_arg((*_PREG)->u.Otapl.s); #ifdef FROZEN_STACKS #define TRUST_NOIF_FROZEN \ @@ -1192,14 +1192,14 @@ } \ SET_BB(B_YREG); \ ENDCACHE_Y(); \ - (*_PREG) = (*_PREG)->y_u.Otapl.d; \ + (*_PREG) = (*_PREG)->u.Otapl.d; \ JMPNext(); #define TRY_IN_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ BLOCKADDRESS = (CELL)(*_PREG); \ B->cp_ap = NEXTOP((*_PREG), l); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ JMPNext(); #define TRY_IN_END \ @@ -1207,9 +1207,9 @@ #define SPY_OR_TRYMARK_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - PELOCK(5, ((PredEntry *)((*_PREG)->y_u.Otapl.p))); \ - (*_PREG) = (yamop *)(&(((PredEntry *)((*_PREG)->y_u.Otapl.p))->OpcodeOfPred)); \ - UNLOCKPE(11,(PredEntry *)((*_PREG)->y_u.Otapl.p)); \ + PELOCK(5, ((PredEntry *)((*_PREG)->u.Otapl.p))); \ + (*_PREG) = (yamop *)(&(((PredEntry *)((*_PREG)->u.Otapl.p))->OpcodeOfPred)); \ + UNLOCKPE(11,(PredEntry *)((*_PREG)->u.Otapl.p)); \ return external_labels[12]; #define TRY_AND_MARK_INSTINIT \ @@ -1225,14 +1225,14 @@ #define TRY_AND_MARK_YAPOR_THREADS_NOYAPOR_IF \ BLOCK = (CELL)TRY_AND_MARK_YAPOR_THREADS_NOYAPOR_IF; \ - if ((*_PREG)->y_u.Otapl.p->PredFlags & LogUpdatePredFlag) { \ - PELOCK(6,(*_PREG)->y_u.Otapl.p); \ - PP = (*_PREG)->y_u.Otapl.p; \ + if ((*_PREG)->u.Otapl.p->PredFlags & LogUpdatePredFlag) { \ + PELOCK(6,(*_PREG)->u.Otapl.p); \ + PP = (*_PREG)->u.Otapl.p; \ } \ - if ((*_PREG)->y_u.Otapl.p->CodeOfPred != (*_PREG)) { \ + if ((*_PREG)->u.Otapl.p->CodeOfPred != (*_PREG)) { \ PP = NULL; \ - (*_PREG) = (*_PREG)->y_u.Otapl.p->CodeOfPred; \ - UNLOCKPE(12,(*_PREG)->y_u.Otapl.p); \ + (*_PREG) = (*_PREG)->u.Otapl.p->CodeOfPred; \ + UNLOCKPE(12,(*_PREG)->u.Otapl.p); \ save_pc(); \ JMPNext(); \ } @@ -1240,11 +1240,11 @@ #define TRY_AND_MARK_NOYAPOR_NOTHREADS \ CACHE_Y(YREG); \ - (*_PREG) = (*_PREG)->y_u.Otapl.d; \ + (*_PREG) = (*_PREG)->u.Otapl.d; \ LOCK(DynamicLock((*_PREG))); \ - UNLOCKPE(13,((PredEntry *)((*_PREG)->y_u.Otapl.p))); \ + UNLOCKPE(13,((PredEntry *)((*_PREG)->u.Otapl.p))); \ BEGD(d1); \ - d1 = (*_PREG)->y_u.Otapl.s; \ + d1 = (*_PREG)->u.Otapl.s; \ store_args(d1); \ store_yaam_regs((*_PREG), 0); \ ENDD(d1); \ @@ -1298,9 +1298,9 @@ #define PROFILED_RETRY_AND_MARK_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - LOCK(((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.lock); \ - ((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.NOfRetries++; \ - UNLOCK(((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.lock); \ + LOCK(((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.lock); \ + ((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.NOfRetries++; \ + UNLOCK(((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.lock); \ #define RETRY_AND_MARK_INSTINIT @@ -1310,13 +1310,13 @@ #endif #define RETRY_AND_MARK_POST_YAPOR \ - PELOCK(7,(*_PREG)->y_u.Otapl.p); \ + PELOCK(7,(*_PREG)->u.Otapl.p); \ CACHE_Y(B); \ - (*_PREG) = (*_PREG)->y_u.Otapl.d; \ + (*_PREG) = (*_PREG)->u.Otapl.d; \ LOCK(DynamicLock((*_PREG))); \ - UNLOCK((*_PREG)->y_u.Otapl.p->PELock); \ + UNLOCK((*_PREG)->u.Otapl.p->PELock); \ restore_yaam_regs((*_PREG)); \ - restore_args((*_PREG)->y_u.Otapl.s); + restore_args((*_PREG)->u.Otapl.s); #ifdef FROZEN_STACKS #define RETRY_AND_MARK_FROZEN \ diff --git a/JIT/HPP/jit_predicates.hh b/JIT/HPP/jit_predicates.hh new file mode 100644 index 000000000..ebf661235 --- /dev/null +++ b/JIT/HPP/jit_predicates.hh @@ -0,0 +1,45 @@ +#include "Yap.h" +#include "clause.h" +#include "eval.h" +#if HRAVE_ERRNO_H +#include +#else +extern int errno; +#endif +#include +#include + +#define UPPER_ENTRY(S) \ + tmp = (char*)malloc((strlen(S)+1)*sizeof(char)); \ + while (S[i]) { \ + if (S[i] != '-' && S[i] != '_' && S[i] != ' ') { \ + if ((S[i] >= '0' && S[i] <= '9') || (S[i] == '.')) \ + tmp[j] = S[i]; \ + else \ + tmp[j] = toupper(S[i]); \ + j++; \ + } \ + i++; \ + } \ + tmp[j] = 0; \ + strcpy(S, tmp); \ + free(tmp); + +#if YAP_JIT +void Yap_InitJitAnalysisPreds( void ); +void Yap_InitJitCodegenPreds( void ); +void Yap_InitJitConfigPreds( void ); +void Yap_InitJitTransformPreds( void ); +#if YAP_STAT_PREDS +void Yap_InitJitStatisticPreds( void ); +#endif +#endif /* YAP_JIT */ +#if YAP_DBG_PREDS +void Yap_InitJitDebugPreds( void ); +#endif + +Environment ExpEnv; +#if YAP_JIT +extern NativeContext *NativeArea; +extern IntermediatecodeContext *IntermediatecodeArea; +#endif diff --git a/JIT/HPP/lastop.h b/JIT/HPP/lastop.h index 7e1a8dd6f..f81cbd3a0 100644 --- a/JIT/HPP/lastop.h +++ b/JIT/HPP/lastop.h @@ -8,2387 +8,2387 @@ lastop_of(yamop* _p) { lastp = _p; switch(op){ case _Ystop : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _Nstop : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _try_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _retry_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _trust_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _enter_profiling : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _retry_profiled : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _profiled_retry_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _profiled_trust_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _profiled_retry_logical : - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _profiled_trust_logical : - _p = ((yamop *)(&((_p)->y_u.OtILl.next))); + _p = ((yamop *)(&((_p)->u.OtILl.next))); break; case _count_call : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _count_retry : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _count_retry_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _count_trust_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _count_retry_logical : - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _count_trust_logical : - _p = ((yamop *)(&((_p)->y_u.OtILl.next))); + _p = ((yamop *)(&((_p)->u.OtILl.next))); break; case _lock_lu : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _unlock_lu : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _alloc_for_logical_pred : - _p = ((yamop *)(&((_p)->y_u.L.next))); + _p = ((yamop *)(&((_p)->u.L.next))); break; case _copy_idb_term : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _unify_idb_term : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _ensure_space : - _p = ((yamop *)(&((_p)->y_u.Osbpa.next))); + _p = ((yamop *)(&((_p)->u.Osbpa.next))); break; case _spy_or_trymark : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _try_and_mark : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _count_retry_and_mark : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _profiled_retry_and_mark : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _retry_and_mark : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _trust_fail : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _op_fail : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _cut : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _cut_t : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _cut_e : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _save_b_x : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _save_b_y : - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _commit_b_x : - _p = ((yamop *)(&((_p)->y_u.xps.next))); + _p = ((yamop *)(&((_p)->u.xps.next))); break; case _commit_b_y : - _p = ((yamop *)(&((_p)->y_u.yps.next))); + _p = ((yamop *)(&((_p)->u.yps.next))); break; case _execute : - _p = ((yamop *)(&((_p)->y_u.pp.next))); + _p = ((yamop *)(&((_p)->u.pp.next))); break; case _dexecute : - _p = ((yamop *)(&((_p)->y_u.pp.next))); + _p = ((yamop *)(&((_p)->u.pp.next))); break; case _fcall : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _call : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _procceed : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); l = (CELL)_p; break; case _allocate : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _deallocate : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; #ifdef BEAM case _retry_eam : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif #ifdef BEAM case _run_eam : - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; #endif case _get_x_var : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _get_y_var : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _get_yy_var : - _p = ((yamop *)(&((_p)->y_u.yyxx.next))); + _p = ((yamop *)(&((_p)->u.yyxx.next))); break; case _get_x_val : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _get_y_val : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _get_atom : - _p = ((yamop *)(&((_p)->y_u.xc.next))); + _p = ((yamop *)(&((_p)->u.xc.next))); break; case _get_2atoms : - _p = ((yamop *)(&((_p)->y_u.cc.next))); + _p = ((yamop *)(&((_p)->u.cc.next))); break; case _get_3atoms : - _p = ((yamop *)(&((_p)->y_u.ccc.next))); + _p = ((yamop *)(&((_p)->u.ccc.next))); break; case _get_4atoms : - _p = ((yamop *)(&((_p)->y_u.cccc.next))); + _p = ((yamop *)(&((_p)->u.cccc.next))); break; case _get_5atoms : - _p = ((yamop *)(&((_p)->y_u.ccccc.next))); + _p = ((yamop *)(&((_p)->u.ccccc.next))); break; case _get_6atoms : - _p = ((yamop *)(&((_p)->y_u.cccccc.next))); + _p = ((yamop *)(&((_p)->u.cccccc.next))); break; case _get_list : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _get_struct : - _p = ((yamop *)(&((_p)->y_u.xfa.next))); + _p = ((yamop *)(&((_p)->u.xfa.next))); break; case _get_float : - _p = ((yamop *)(&((_p)->y_u.xd.next))); + _p = ((yamop *)(&((_p)->u.xd.next))); break; case _get_longint : - _p = ((yamop *)(&((_p)->y_u.xi.next))); + _p = ((yamop *)(&((_p)->u.xi.next))); break; case _get_bigint : - _p = ((yamop *)(&((_p)->y_u.xN.next))); + _p = ((yamop *)(&((_p)->u.xN.next))); break; case _get_dbterm : - _p = ((yamop *)(&((_p)->y_u.xD.next))); + _p = ((yamop *)(&((_p)->u.xD.next))); break; case _glist_valx : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _glist_valy : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _gl_void_varx : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _gl_void_vary : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _gl_void_valx : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _gl_void_valy : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _unify_x_var : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_x_var_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_l_x_var : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_l_x_var_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_x_var2 : - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _unify_x_var2_write : - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _unify_l_x_var2 : - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _unify_l_x_var2_write : - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _unify_y_var : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_y_var_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_l_y_var : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_l_y_var_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_x_val : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_x_val_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_l_x_val : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_l_x_val_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_y_val : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_y_val_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_l_y_val : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_l_y_val_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_x_loc : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_x_loc_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_l_x_loc : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_l_x_loc_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_y_loc : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_y_loc_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_l_y_loc : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_l_y_loc_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_void : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_void_write : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_l_void : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_l_void_write : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_n_voids : - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _unify_n_voids_write : - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _unify_l_n_voids : - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _unify_l_n_voids_write : - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _unify_atom : - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _unify_atom_write : - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _unify_l_atom : - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _unify_l_atom_write : - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _unify_n_atoms : - _p = ((yamop *)(&((_p)->y_u.osc.next))); + _p = ((yamop *)(&((_p)->u.osc.next))); break; case _unify_n_atoms_write : - _p = ((yamop *)(&((_p)->y_u.osc.next))); + _p = ((yamop *)(&((_p)->u.osc.next))); break; case _unify_float : - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _unify_float_write : - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _unify_l_float : - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _unify_l_float_write : - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _unify_longint : - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _unify_longint_write : - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _unify_l_longint : - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _unify_l_longint_write : - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _unify_bigint : - _p = ((yamop *)(&((_p)->y_u.oN.next))); + _p = ((yamop *)(&((_p)->u.oN.next))); break; case _unify_l_bigint : - _p = ((yamop *)(&((_p)->y_u.oN.next))); + _p = ((yamop *)(&((_p)->u.oN.next))); break; case _unify_dbterm : - _p = ((yamop *)(&((_p)->y_u.oD.next))); + _p = ((yamop *)(&((_p)->u.oD.next))); break; case _unify_l_dbterm : - _p = ((yamop *)(&((_p)->y_u.oD.next))); + _p = ((yamop *)(&((_p)->u.oD.next))); break; case _unify_list : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_list_write : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_l_list : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_l_list_write : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_struct : - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _unify_struct_write : - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _unify_l_struc : - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _unify_l_struc_write : - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _put_x_var : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _put_y_var : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _put_x_val : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _put_xx_val : - _p = ((yamop *)(&((_p)->y_u.xxxx.next))); + _p = ((yamop *)(&((_p)->u.xxxx.next))); break; case _put_y_val : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _put_y_vals : - _p = ((yamop *)(&((_p)->y_u.yyxx.next))); + _p = ((yamop *)(&((_p)->u.yyxx.next))); break; case _put_unsafe : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _put_atom : - _p = ((yamop *)(&((_p)->y_u.xc.next))); + _p = ((yamop *)(&((_p)->u.xc.next))); break; case _put_dbterm : - _p = ((yamop *)(&((_p)->y_u.xD.next))); + _p = ((yamop *)(&((_p)->u.xD.next))); break; case _put_bigint : - _p = ((yamop *)(&((_p)->y_u.xN.next))); + _p = ((yamop *)(&((_p)->u.xN.next))); break; case _put_float : - _p = ((yamop *)(&((_p)->y_u.xd.next))); + _p = ((yamop *)(&((_p)->u.xd.next))); break; case _put_longint : - _p = ((yamop *)(&((_p)->y_u.xi.next))); + _p = ((yamop *)(&((_p)->u.xi.next))); break; case _put_list : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _put_struct : - _p = ((yamop *)(&((_p)->y_u.xfa.next))); + _p = ((yamop *)(&((_p)->u.xfa.next))); break; case _write_x_var : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _write_void : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _write_n_voids : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _write_y_var : - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _write_x_val : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _write_x_loc : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _write_y_val : - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _write_y_loc : - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _write_atom : - _p = ((yamop *)(&((_p)->y_u.c.next))); + _p = ((yamop *)(&((_p)->u.c.next))); break; case _write_bigint : - _p = ((yamop *)(&((_p)->y_u.N.next))); + _p = ((yamop *)(&((_p)->u.N.next))); break; case _write_dbterm : - _p = ((yamop *)(&((_p)->y_u.D.next))); + _p = ((yamop *)(&((_p)->u.D.next))); break; case _write_float : - _p = ((yamop *)(&((_p)->y_u.d.next))); + _p = ((yamop *)(&((_p)->u.d.next))); break; case _write_longint : - _p = ((yamop *)(&((_p)->y_u.i.next))); + _p = ((yamop *)(&((_p)->u.i.next))); break; case _write_n_atoms : - _p = ((yamop *)(&((_p)->y_u.sc.next))); + _p = ((yamop *)(&((_p)->u.sc.next))); break; case _write_list : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _write_l_list : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _write_struct : - _p = ((yamop *)(&((_p)->y_u.fa.next))); + _p = ((yamop *)(&((_p)->u.fa.next))); break; case _write_l_struc : - _p = ((yamop *)(&((_p)->y_u.fa.next))); + _p = ((yamop *)(&((_p)->u.fa.next))); break; case _save_pair_x : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _save_pair_x_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _save_pair_y : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _save_pair_y_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _save_appl_x : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _save_appl_x_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _save_appl_y : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _save_appl_y_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _jump : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _move_back : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _skip : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _either : - _p = ((yamop *)(&((_p)->y_u.Osblp.next))); + _p = ((yamop *)(&((_p)->u.Osblp.next))); break; case _or_else : - _p = ((yamop *)(&((_p)->y_u.Osblp.next))); + _p = ((yamop *)(&((_p)->u.Osblp.next))); break; case _pop_n : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _pop : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _call_cpred : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _execute_cpred : - _p = ((yamop *)(&((_p)->y_u.pp.next))); + _p = ((yamop *)(&((_p)->u.pp.next))); break; case _call_usercpred : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _call_c_wfail : - _p = ((yamop *)(&((_p)->y_u.slp.next))); + _p = ((yamop *)(&((_p)->u.slp.next))); break; case _try_c : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; case _retry_c : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; #ifdef CUT_C case _cut_c : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; #endif case _try_userc : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; case _retry_userc : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; #ifdef CUT_C case _cut_userc : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; #endif case _lock_pred : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _index_pred : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #ifdef THREADS case _thread_local : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif case _expand_index : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _expand_clauses : - _p = ((yamop *)(&((_p)->y_u.sssllp.next))); + _p = ((yamop *)(&((_p)->u.sssllp.next))); break; case _undef_p : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _spy_pred : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _try_clause : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _try_clause2 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _try_clause3 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _try_clause4 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _retry : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _retry2 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _retry3 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _retry4 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _trust : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _try_in : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _enter_lu_pred : - _p = ((yamop *)(&((_p)->y_u.Illss.next))); + _p = ((yamop *)(&((_p)->u.Illss.next))); break; case _try_logical : - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _retry_logical : - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _trust_logical : - _p = ((yamop *)(&((_p)->y_u.OtILl.next))); + _p = ((yamop *)(&((_p)->u.OtILl.next))); break; case _user_switch : - _p = ((yamop *)(&((_p)->y_u.lp.next))); + _p = ((yamop *)(&((_p)->u.lp.next))); break; case _switch_on_type : - _p = ((yamop *)(&((_p)->y_u.llll.next))); + _p = ((yamop *)(&((_p)->u.llll.next))); break; case _switch_list_nl : - _p = ((yamop *)(&((_p)->y_u.ollll.next))); + _p = ((yamop *)(&((_p)->u.ollll.next))); break; case _switch_on_arg_type : - _p = ((yamop *)(&((_p)->y_u.xllll.next))); + _p = ((yamop *)(&((_p)->u.xllll.next))); break; case _switch_on_sub_arg_type : - _p = ((yamop *)(&((_p)->y_u.sllll.next))); + _p = ((yamop *)(&((_p)->u.sllll.next))); break; case _jump_if_var : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _jump_if_nonvar : - _p = ((yamop *)(&((_p)->y_u.xll.next))); + _p = ((yamop *)(&((_p)->u.xll.next))); break; case _if_not_then : - _p = ((yamop *)(&((_p)->y_u.clll.next))); + _p = ((yamop *)(&((_p)->u.clll.next))); break; case _switch_on_func : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _switch_on_cons : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _go_on_func : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _go_on_cons : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _if_func : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _if_cons : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _index_dbref : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _index_blob : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _index_long : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _jit_handler : - _p = ((yamop *)(&((_p)->y_u.jhc.next))); + _p = ((yamop *)(&((_p)->u.jhc.next))); break; case _p_atom_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_atom_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_atomic_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_atomic_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_integer_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_integer_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_nonvar_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_nonvar_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_number_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_number_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_var_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_var_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_db_ref_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_db_ref_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_primitive_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_primitive_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_compound_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_compound_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_float_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_float_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_plus_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_plus_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_plus_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_plus_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_minus_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_minus_cv : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_minus_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_minus_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_times_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_times_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_times_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_times_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_div_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_div_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_div_cv : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_div_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_div_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_div_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_and_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_and_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_and_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_and_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_or_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_or_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_or_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_or_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_sll_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_sll_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_sll_cv : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_sll_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_sll_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_sll_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_slr_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_slr_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_slr_cv : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_slr_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_slr_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_slr_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _call_bfunc_xx : - _p = ((yamop *)(&((_p)->y_u.plxxs.next))); + _p = ((yamop *)(&((_p)->u.plxxs.next))); break; case _call_bfunc_yx : - _p = ((yamop *)(&((_p)->y_u.plxys.next))); + _p = ((yamop *)(&((_p)->u.plxys.next))); break; case _call_bfunc_xy : - _p = ((yamop *)(&((_p)->y_u.plxys.next))); + _p = ((yamop *)(&((_p)->u.plxys.next))); break; case _call_bfunc_yy : - _p = ((yamop *)(&((_p)->y_u.plyys.next))); + _p = ((yamop *)(&((_p)->u.plyys.next))); break; case _p_equal : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _p_dif : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _p_eq : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _p_arg_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_arg_cv : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_arg_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_arg_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_func2s_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_func2s_cv : - _p = ((yamop *)(&((_p)->y_u.xxc.next))); + _p = ((yamop *)(&((_p)->u.xxc.next))); break; case _p_func2s_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_func2s_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_func2s_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_func2s_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_func2f_xx : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_func2f_xy : - _p = ((yamop *)(&((_p)->y_u.xxy.next))); + _p = ((yamop *)(&((_p)->u.xxy.next))); break; case _p_func2f_yx : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_func2f_yy : - _p = ((yamop *)(&((_p)->y_u.yyx.next))); + _p = ((yamop *)(&((_p)->u.yyx.next))); break; case _p_functor : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _p_execute2 : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _p_execute : - _p = ((yamop *)(&((_p)->y_u.Osbmp.next))); + _p = ((yamop *)(&((_p)->u.Osbmp.next))); break; case _p_execute_tail : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; #ifdef YAPOR case _getwork_first_time : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _getwork : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _getwork_seq : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _sync : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; #endif #ifdef TABLING #ifdef TABLING_INNER_CUTS case _clause_with_cut : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif case _table_load_answer : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_try_answer : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_try_single : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_try_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_try : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_retry_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_retry : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_trust_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_trust : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_new_answer : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _table_answer_resolution : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_completion : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; #ifdef THREADS_CONSUMER_SHARING case _table_answer_resolution_completion: - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; #endif case _trie_do_var : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_var : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_var : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_var : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_var_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_var_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_var_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_var_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_val : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_val : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_val : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_val : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_val_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_val_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_val_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_val_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_atom : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_atom : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_atom : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_atom : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_atom_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_atom_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_atom_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_atom_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_null : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_null : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_null : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_null : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_null_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_null_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_null_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_null_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_appl : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_appl : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_appl : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_appl : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_appl_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_appl_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_appl_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_appl_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_extension : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_extension : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_extension : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_extension : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_double : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_double : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_double : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_double : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_longint : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_longint : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_longint : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_longint : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_gterm : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_gterm : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_gterm : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_gterm : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif #ifdef YAPOR case _or_last : - _p = ((yamop *)(&((_p)->y_u.sblp.next))); + _p = ((yamop *)(&((_p)->u.sblp.next))); break; #else case _or_last : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; #endif case _traced_Ystop : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_Nstop : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_try_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_retry_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_trust_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_enter_profiling : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _traced_retry_profiled : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _traced_profiled_retry_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_profiled_trust_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_profiled_retry_logical : - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _traced_profiled_trust_logical : - _p = ((yamop *)(&((_p)->y_u.OtILl.next))); + _p = ((yamop *)(&((_p)->u.OtILl.next))); break; case _traced_count_call : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _traced_count_retry : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _traced_count_retry_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_count_trust_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_count_retry_logical : - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _traced_count_trust_logical : - _p = ((yamop *)(&((_p)->y_u.OtILl.next))); + _p = ((yamop *)(&((_p)->u.OtILl.next))); break; case _traced_lock_lu : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _traced_unlock_lu : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_alloc_for_logical_pred : - _p = ((yamop *)(&((_p)->y_u.L.next))); + _p = ((yamop *)(&((_p)->u.L.next))); break; case _traced_copy_idb_term : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_unify_idb_term : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_ensure_space : - _p = ((yamop *)(&((_p)->y_u.Osbpa.next))); + _p = ((yamop *)(&((_p)->u.Osbpa.next))); break; case _traced_spy_or_trymark : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_try_and_mark : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_count_retry_and_mark : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_profiled_retry_and_mark : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_retry_and_mark : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_trust_fail : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_op_fail : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_cut : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _traced_cut_t : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _traced_cut_e : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _traced_save_b_x : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _traced_save_b_y : - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _traced_commit_b_x : - _p = ((yamop *)(&((_p)->y_u.xps.next))); + _p = ((yamop *)(&((_p)->u.xps.next))); break; case _traced_commit_b_y : - _p = ((yamop *)(&((_p)->y_u.yps.next))); + _p = ((yamop *)(&((_p)->u.yps.next))); break; case _traced_execute : - _p = ((yamop *)(&((_p)->y_u.pp.next))); + _p = ((yamop *)(&((_p)->u.pp.next))); break; case _traced_dexecute : - _p = ((yamop *)(&((_p)->y_u.pp.next))); + _p = ((yamop *)(&((_p)->u.pp.next))); break; case _traced_fcall : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _traced_call : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _traced_procceed : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); l = (CELL)_p; break; case _traced_allocate : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_deallocate : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; #ifdef BEAM case _traced_retry_eam : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif #ifdef BEAM case _traced_run_eam : - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; #endif case _traced_get_x_var : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _traced_get_y_var : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_get_yy_var : - _p = ((yamop *)(&((_p)->y_u.yyxx.next))); + _p = ((yamop *)(&((_p)->u.yyxx.next))); break; case _traced_get_x_val : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _traced_get_y_val : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_get_atom : - _p = ((yamop *)(&((_p)->y_u.xc.next))); + _p = ((yamop *)(&((_p)->u.xc.next))); break; case _traced_get_2atoms : - _p = ((yamop *)(&((_p)->y_u.cc.next))); + _p = ((yamop *)(&((_p)->u.cc.next))); break; case _traced_get_3atoms : - _p = ((yamop *)(&((_p)->y_u.ccc.next))); + _p = ((yamop *)(&((_p)->u.ccc.next))); break; case _traced_get_4atoms : - _p = ((yamop *)(&((_p)->y_u.cccc.next))); + _p = ((yamop *)(&((_p)->u.cccc.next))); break; case _traced_get_5atoms : - _p = ((yamop *)(&((_p)->y_u.ccccc.next))); + _p = ((yamop *)(&((_p)->u.ccccc.next))); break; case _traced_get_6atoms : - _p = ((yamop *)(&((_p)->y_u.cccccc.next))); + _p = ((yamop *)(&((_p)->u.cccccc.next))); break; case _traced_get_list : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _traced_get_struct : - _p = ((yamop *)(&((_p)->y_u.xfa.next))); + _p = ((yamop *)(&((_p)->u.xfa.next))); break; case _traced_get_float : - _p = ((yamop *)(&((_p)->y_u.xd.next))); + _p = ((yamop *)(&((_p)->u.xd.next))); break; case _traced_get_longint : - _p = ((yamop *)(&((_p)->y_u.xi.next))); + _p = ((yamop *)(&((_p)->u.xi.next))); break; case _traced_get_bigint : - _p = ((yamop *)(&((_p)->y_u.xN.next))); + _p = ((yamop *)(&((_p)->u.xN.next))); break; case _traced_get_dbterm : - _p = ((yamop *)(&((_p)->y_u.xD.next))); + _p = ((yamop *)(&((_p)->u.xD.next))); break; case _traced_glist_valx : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _traced_glist_valy : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_gl_void_varx : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _traced_gl_void_vary : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_gl_void_valx : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _traced_gl_void_valy : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_unify_x_var : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_x_var_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_l_x_var : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_l_x_var_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_x_var2 : - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _traced_unify_x_var2_write : - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _traced_unify_l_x_var2 : - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _traced_unify_l_x_var2_write : - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _traced_unify_y_var : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_y_var_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_l_y_var : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_l_y_var_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_x_val : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_x_val_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_l_x_val : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_l_x_val_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_y_val : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_y_val_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_l_y_val : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_l_y_val_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_x_loc : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_x_loc_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_l_x_loc : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_l_x_loc_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_y_loc : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_y_loc_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_l_y_loc : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_l_y_loc_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_void : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_void_write : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_l_void : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_l_void_write : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_n_voids : - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _traced_unify_n_voids_write : - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _traced_unify_l_n_voids : - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _traced_unify_l_n_voids_write : - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _traced_unify_atom : - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _traced_unify_atom_write : - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _traced_unify_l_atom : - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _traced_unify_l_atom_write : - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _traced_unify_n_atoms : - _p = ((yamop *)(&((_p)->y_u.osc.next))); + _p = ((yamop *)(&((_p)->u.osc.next))); break; case _traced_unify_n_atoms_write : - _p = ((yamop *)(&((_p)->y_u.osc.next))); + _p = ((yamop *)(&((_p)->u.osc.next))); break; case _traced_unify_float : - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _traced_unify_float_write : - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _traced_unify_l_float : - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _traced_unify_l_float_write : - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _traced_unify_longint : - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _traced_unify_longint_write : - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _traced_unify_l_longint : - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _traced_unify_l_longint_write : - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _traced_unify_bigint : - _p = ((yamop *)(&((_p)->y_u.oN.next))); + _p = ((yamop *)(&((_p)->u.oN.next))); break; case _traced_unify_l_bigint : - _p = ((yamop *)(&((_p)->y_u.oN.next))); + _p = ((yamop *)(&((_p)->u.oN.next))); break; case _traced_unify_dbterm : - _p = ((yamop *)(&((_p)->y_u.oD.next))); + _p = ((yamop *)(&((_p)->u.oD.next))); break; case _traced_unify_l_dbterm : - _p = ((yamop *)(&((_p)->y_u.oD.next))); + _p = ((yamop *)(&((_p)->u.oD.next))); break; case _traced_unify_list : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_list_write : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_l_list : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_l_list_write : - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_struct : - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _traced_unify_struct_write : - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _traced_unify_l_struc : - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _traced_unify_l_struc_write : - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _traced_put_x_var : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _traced_put_y_var : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_put_x_val : - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _traced_put_xx_val : - _p = ((yamop *)(&((_p)->y_u.xxxx.next))); + _p = ((yamop *)(&((_p)->u.xxxx.next))); break; case _traced_put_y_val : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_put_y_vals : - _p = ((yamop *)(&((_p)->y_u.yyxx.next))); + _p = ((yamop *)(&((_p)->u.yyxx.next))); break; case _traced_put_unsafe : - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_put_atom : - _p = ((yamop *)(&((_p)->y_u.xc.next))); + _p = ((yamop *)(&((_p)->u.xc.next))); break; case _traced_put_dbterm : - _p = ((yamop *)(&((_p)->y_u.xD.next))); + _p = ((yamop *)(&((_p)->u.xD.next))); break; case _traced_put_bigint : - _p = ((yamop *)(&((_p)->y_u.xN.next))); + _p = ((yamop *)(&((_p)->u.xN.next))); break; case _traced_put_float : - _p = ((yamop *)(&((_p)->y_u.xd.next))); + _p = ((yamop *)(&((_p)->u.xd.next))); break; case _traced_put_longint : - _p = ((yamop *)(&((_p)->y_u.xi.next))); + _p = ((yamop *)(&((_p)->u.xi.next))); break; case _traced_put_list : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _traced_put_struct : - _p = ((yamop *)(&((_p)->y_u.xfa.next))); + _p = ((yamop *)(&((_p)->u.xfa.next))); break; case _traced_write_x_var : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _traced_write_void : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_write_n_voids : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _traced_write_y_var : - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _traced_write_x_val : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _traced_write_x_loc : - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _traced_write_y_val : - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _traced_write_y_loc : - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _traced_write_atom : - _p = ((yamop *)(&((_p)->y_u.c.next))); + _p = ((yamop *)(&((_p)->u.c.next))); break; case _traced_write_bigint : - _p = ((yamop *)(&((_p)->y_u.N.next))); + _p = ((yamop *)(&((_p)->u.N.next))); break; case _traced_write_dbterm : - _p = ((yamop *)(&((_p)->y_u.D.next))); + _p = ((yamop *)(&((_p)->u.D.next))); break; case _traced_write_float : - _p = ((yamop *)(&((_p)->y_u.d.next))); + _p = ((yamop *)(&((_p)->u.d.next))); break; case _traced_write_longint : - _p = ((yamop *)(&((_p)->y_u.i.next))); + _p = ((yamop *)(&((_p)->u.i.next))); break; case _traced_write_n_atoms : - _p = ((yamop *)(&((_p)->y_u.sc.next))); + _p = ((yamop *)(&((_p)->u.sc.next))); break; case _traced_write_list : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_write_l_list : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_write_struct : - _p = ((yamop *)(&((_p)->y_u.fa.next))); + _p = ((yamop *)(&((_p)->u.fa.next))); break; case _traced_write_l_struc : - _p = ((yamop *)(&((_p)->y_u.fa.next))); + _p = ((yamop *)(&((_p)->u.fa.next))); break; case _traced_save_pair_x : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_save_pair_x_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_save_pair_y : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_save_pair_y_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_save_appl_x : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_save_appl_x_write : - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_save_appl_y : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_save_appl_y_write : - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_jump : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_move_back : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_skip : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_either : - _p = ((yamop *)(&((_p)->y_u.Osblp.next))); + _p = ((yamop *)(&((_p)->u.Osblp.next))); break; case _traced_or_else : - _p = ((yamop *)(&((_p)->y_u.Osblp.next))); + _p = ((yamop *)(&((_p)->u.Osblp.next))); break; case _traced_pop_n : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _traced_pop : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_call_cpred : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _traced_execute_cpred : - _p = ((yamop *)(&((_p)->y_u.pp.next))); + _p = ((yamop *)(&((_p)->u.pp.next))); break; case _traced_call_usercpred : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _traced_call_c_wfail : - _p = ((yamop *)(&((_p)->y_u.slp.next))); + _p = ((yamop *)(&((_p)->u.slp.next))); break; case _traced_try_c : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; case _traced_retry_c : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; #ifdef CUT_C case _traced_cut_c : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; #endif case _traced_try_userc : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; case _traced_retry_userc : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; #ifdef CUT_C case _traced_cut_userc : - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; #endif case _traced_lock_pred : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_index_pred : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #ifdef THREADS case _traced_thread_local : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif case _traced_expand_index : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_expand_clauses : - _p = ((yamop *)(&((_p)->y_u.sssllp.next))); + _p = ((yamop *)(&((_p)->u.sssllp.next))); break; case _traced_undef_p : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_spy_pred : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_try_clause : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_try_clause2 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_try_clause3 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_try_clause4 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_retry : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_retry2 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_retry3 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_retry4 : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_trust : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_try_in : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_enter_lu_pred : - _p = ((yamop *)(&((_p)->y_u.Illss.next))); + _p = ((yamop *)(&((_p)->u.Illss.next))); break; case _traced_try_logical : - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _traced_retry_logical : - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _traced_trust_logical : - _p = ((yamop *)(&((_p)->y_u.OtILl.next))); + _p = ((yamop *)(&((_p)->u.OtILl.next))); break; case _traced_user_switch : - _p = ((yamop *)(&((_p)->y_u.lp.next))); + _p = ((yamop *)(&((_p)->u.lp.next))); break; case _traced_switch_on_type : - _p = ((yamop *)(&((_p)->y_u.llll.next))); + _p = ((yamop *)(&((_p)->u.llll.next))); break; case _traced_switch_list_nl : - _p = ((yamop *)(&((_p)->y_u.ollll.next))); + _p = ((yamop *)(&((_p)->u.ollll.next))); break; case _traced_switch_on_arg_type : - _p = ((yamop *)(&((_p)->y_u.xllll.next))); + _p = ((yamop *)(&((_p)->u.xllll.next))); break; case _traced_switch_on_sub_arg_type : - _p = ((yamop *)(&((_p)->y_u.sllll.next))); + _p = ((yamop *)(&((_p)->u.sllll.next))); break; case _traced_jump_if_var : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_jump_if_nonvar : - _p = ((yamop *)(&((_p)->y_u.xll.next))); + _p = ((yamop *)(&((_p)->u.xll.next))); break; case _traced_if_not_then : - _p = ((yamop *)(&((_p)->y_u.clll.next))); + _p = ((yamop *)(&((_p)->u.clll.next))); break; case _traced_switch_on_func : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _traced_switch_on_cons : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _traced_go_on_func : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _traced_go_on_cons : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _traced_if_func : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _traced_if_cons : - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _traced_index_dbref : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_index_blob : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_index_long : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_jit_handler : - _p = ((yamop *)(&((_p)->y_u.jhc.next))); + _p = ((yamop *)(&((_p)->u.jhc.next))); break; case _traced_p_atom_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_atom_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_atomic_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_atomic_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_integer_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_integer_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_nonvar_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_nonvar_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_number_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_number_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_var_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_var_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_db_ref_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_db_ref_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_primitive_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_primitive_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_compound_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_compound_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_float_x : - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_float_y : - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_plus_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_plus_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_plus_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_plus_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_minus_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_minus_cv : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_minus_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_minus_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_times_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_times_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_times_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_times_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_div_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_div_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_div_cv : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_div_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_div_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_div_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_and_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_and_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_and_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_and_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_or_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_or_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_or_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_or_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_sll_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_sll_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_sll_cv : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_sll_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_sll_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_sll_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_slr_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_slr_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_slr_cv : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_slr_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_slr_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_slr_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_call_bfunc_xx : - _p = ((yamop *)(&((_p)->y_u.plxxs.next))); + _p = ((yamop *)(&((_p)->u.plxxs.next))); break; case _traced_call_bfunc_yx : - _p = ((yamop *)(&((_p)->y_u.plxys.next))); + _p = ((yamop *)(&((_p)->u.plxys.next))); break; case _traced_call_bfunc_xy : - _p = ((yamop *)(&((_p)->y_u.plxys.next))); + _p = ((yamop *)(&((_p)->u.plxys.next))); break; case _traced_call_bfunc_yy : - _p = ((yamop *)(&((_p)->y_u.plyys.next))); + _p = ((yamop *)(&((_p)->u.plyys.next))); break; case _traced_p_equal : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_p_dif : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_p_eq : - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_p_arg_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_arg_cv : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_arg_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_arg_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_func2s_vv : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_func2s_cv : - _p = ((yamop *)(&((_p)->y_u.xxc.next))); + _p = ((yamop *)(&((_p)->u.xxc.next))); break; case _traced_p_func2s_vc : - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_func2s_y_vv : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_func2s_y_cv : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_func2s_y_vc : - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_func2f_xx : - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_func2f_xy : - _p = ((yamop *)(&((_p)->y_u.xxy.next))); + _p = ((yamop *)(&((_p)->u.xxy.next))); break; case _traced_p_func2f_yx : - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_func2f_yy : - _p = ((yamop *)(&((_p)->y_u.yyx.next))); + _p = ((yamop *)(&((_p)->u.yyx.next))); break; case _traced_p_functor : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_p_execute2 : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _traced_p_execute : - _p = ((yamop *)(&((_p)->y_u.Osbmp.next))); + _p = ((yamop *)(&((_p)->u.Osbmp.next))); break; case _traced_p_execute_tail : - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; #ifdef YAPOR case _traced_getwork_first_time : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_getwork : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_getwork_seq : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_sync : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; #endif #ifdef TABLING #ifdef TABLING_INNER_CUTS case _traced_clause_with_cut : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif case _traced_table_load_answer : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_try_answer : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_try_single : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_try_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_try : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_retry_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_retry : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_trust_me : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_trust : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_new_answer : - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _traced_table_answer_resolution : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_completion : - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; #ifdef THREADS_CONSUMER_SHARING case _traced_table_answer_resolution_completion: - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; #endif case _traced_trie_do_var : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_var : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_var : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_var : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_var_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_var_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_var_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_var_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_val : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_val : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_val : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_val : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_val_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_val_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_val_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_val_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_atom : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_atom : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_atom : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_atom : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_atom_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_atom_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_atom_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_atom_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_null : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_null : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_null : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_null : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_null_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_null_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_null_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_null_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_appl : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_appl : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_appl : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_appl : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_appl_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_appl_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_appl_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_appl_in_pair : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_extension : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_extension : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_extension : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_extension : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_double : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_double : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_double : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_double : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_longint : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_longint : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_longint : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_longint : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_gterm : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_gterm : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_gterm : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_gterm : - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif #ifdef YAPOR case _traced_or_last : - _p = ((yamop *)(&((_p)->y_u.sblp.next))); + _p = ((yamop *)(&((_p)->u.sblp.next))); break; #else case _traced_or_last : - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; #endif } diff --git a/JIT/HPP/native_header.h b/JIT/HPP/native_header.h index 4cceaadc5..47ba7e157 100644 --- a/JIT/HPP/native_header.h +++ b/JIT/HPP/native_header.h @@ -14,4 +14,4 @@ #include #include -extern void print_block(YAP_BBs block, enumPlace place); \ No newline at end of file +extern void print_block(YAP_BBs block, enumPlace place); diff --git a/JIT/HPP/nextof.hh b/JIT/HPP/nextof.hh new file mode 100644 index 000000000..690b51149 --- /dev/null +++ b/JIT/HPP/nextof.hh @@ -0,0 +1,2390 @@ +void NextOf(yamop**); + +void +NextOf(yamop** _p) { + op_numbers op = Yap_op_from_opcode((*_p)->opc); + switch(op){ + case _Ystop : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _Nstop : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _try_me : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _retry_me : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _trust_me : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _enter_profiling : + (*_p) = ((yamop *)(&((*_p)->u.p.next))); + break; + case _retry_profiled : + (*_p) = ((yamop *)(&((*_p)->u.p.next))); + break; + case _profiled_retry_me : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _profiled_trust_me : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _profiled_retry_logical : + (*_p) = ((yamop *)(&((*_p)->u.OtaLl.next))); + break; + case _profiled_trust_logical : + (*_p) = ((yamop *)(&((*_p)->u.OtILl.next))); + break; + case _count_call : + (*_p) = ((yamop *)(&((*_p)->u.p.next))); + break; + case _count_retry : + (*_p) = ((yamop *)(&((*_p)->u.p.next))); + break; + case _count_retry_me : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _count_trust_me : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _count_retry_logical : + (*_p) = ((yamop *)(&((*_p)->u.OtaLl.next))); + break; + case _count_trust_logical : + (*_p) = ((yamop *)(&((*_p)->u.OtILl.next))); + break; + case _lock_lu : + (*_p) = ((yamop *)(&((*_p)->u.p.next))); + break; + case _unlock_lu : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _alloc_for_logical_pred : + (*_p) = ((yamop *)(&((*_p)->u.L.next))); + break; + case _copy_idb_term : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _unify_idb_term : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _ensure_space : + (*_p) = ((yamop *)(&((*_p)->u.Osbpa.next))); + break; + case _spy_or_trymark : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _try_and_mark : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _count_retry_and_mark : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _profiled_retry_and_mark : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _retry_and_mark : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _trust_fail : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _op_fail : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _cut : + (*_p) = ((yamop *)(&((*_p)->u.s.next))); + break; + case _cut_t : + (*_p) = ((yamop *)(&((*_p)->u.s.next))); + break; + case _cut_e : + (*_p) = ((yamop *)(&((*_p)->u.s.next))); + break; + case _save_b_x : + (*_p) = ((yamop *)(&((*_p)->u.x.next))); + break; + case _save_b_y : + (*_p) = ((yamop *)(&((*_p)->u.y.next))); + break; + case _commit_b_x : + (*_p) = ((yamop *)(&((*_p)->u.xps.next))); + break; + case _commit_b_y : + (*_p) = ((yamop *)(&((*_p)->u.yps.next))); + break; + case _execute : + (*_p) = ((yamop *)(&((*_p)->u.pp.next))); + break; + case _dexecute : + (*_p) = ((yamop *)(&((*_p)->u.pp.next))); + break; + case _fcall : + (*_p) = ((yamop *)(&((*_p)->u.Osbpp.next))); + break; + case _call : + (*_p) = ((yamop *)(&((*_p)->u.Osbpp.next))); + break; + case _procceed : + (*_p) = ((yamop *)(&((*_p)->u.p.next))); + break; + case _allocate : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _deallocate : + (*_p) = ((yamop *)(&((*_p)->u.p.next))); + break; +#ifdef BEAM + case _retry_eam : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; +#endif +#ifdef BEAM + case _run_eam : + (*_p) = ((yamop *)(&((*_p)->u.os.next))); + break; +#endif + case _get_x_var : + (*_p) = ((yamop *)(&((*_p)->u.xx.next))); + break; + case _get_y_var : + (*_p) = ((yamop *)(&((*_p)->u.yx.next))); + break; + case _get_yy_var : + (*_p) = ((yamop *)(&((*_p)->u.yyxx.next))); + break; + case _get_x_val : + (*_p) = ((yamop *)(&((*_p)->u.xx.next))); + break; + case _get_y_val : + (*_p) = ((yamop *)(&((*_p)->u.yx.next))); + break; + case _get_atom : + (*_p) = ((yamop *)(&((*_p)->u.xc.next))); + break; + case _get_2atoms : + (*_p) = ((yamop *)(&((*_p)->u.cc.next))); + break; + case _get_3atoms : + (*_p) = ((yamop *)(&((*_p)->u.ccc.next))); + break; + case _get_4atoms : + (*_p) = ((yamop *)(&((*_p)->u.cccc.next))); + break; + case _get_5atoms : + (*_p) = ((yamop *)(&((*_p)->u.ccccc.next))); + break; + case _get_6atoms : + (*_p) = ((yamop *)(&((*_p)->u.cccccc.next))); + break; + case _get_list : + (*_p) = ((yamop *)(&((*_p)->u.x.next))); + break; + case _get_struct : + (*_p) = ((yamop *)(&((*_p)->u.xfa.next))); + break; + case _get_float : + (*_p) = ((yamop *)(&((*_p)->u.xd.next))); + break; + case _get_longint : + (*_p) = ((yamop *)(&((*_p)->u.xi.next))); + break; + case _get_bigint : + (*_p) = ((yamop *)(&((*_p)->u.xN.next))); + break; + case _get_dbterm : + (*_p) = ((yamop *)(&((*_p)->u.xD.next))); + break; + case _glist_valx : + (*_p) = ((yamop *)(&((*_p)->u.xx.next))); + break; + case _glist_valy : + (*_p) = ((yamop *)(&((*_p)->u.yx.next))); + break; + case _gl_void_varx : + (*_p) = ((yamop *)(&((*_p)->u.xx.next))); + break; + case _gl_void_vary : + (*_p) = ((yamop *)(&((*_p)->u.yx.next))); + break; + case _gl_void_valx : + (*_p) = ((yamop *)(&((*_p)->u.xx.next))); + break; + case _gl_void_valy : + (*_p) = ((yamop *)(&((*_p)->u.yx.next))); + break; + case _unify_x_var : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _unify_x_var_write : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _unify_l_x_var : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _unify_l_x_var_write : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _unify_x_var2 : + (*_p) = ((yamop *)(&((*_p)->u.oxx.next))); + break; + case _unify_x_var2_write : + (*_p) = ((yamop *)(&((*_p)->u.oxx.next))); + break; + case _unify_l_x_var2 : + (*_p) = ((yamop *)(&((*_p)->u.oxx.next))); + break; + case _unify_l_x_var2_write : + (*_p) = ((yamop *)(&((*_p)->u.oxx.next))); + break; + case _unify_y_var : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _unify_y_var_write : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _unify_l_y_var : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _unify_l_y_var_write : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _unify_x_val : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _unify_x_val_write : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _unify_l_x_val : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _unify_l_x_val_write : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _unify_y_val : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _unify_y_val_write : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _unify_l_y_val : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _unify_l_y_val_write : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _unify_x_loc : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _unify_x_loc_write : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _unify_l_x_loc : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _unify_l_x_loc_write : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _unify_y_loc : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _unify_y_loc_write : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _unify_l_y_loc : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _unify_l_y_loc_write : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _unify_void : + (*_p) = ((yamop *)(&((*_p)->u.o.next))); + break; + case _unify_void_write : + (*_p) = ((yamop *)(&((*_p)->u.o.next))); + break; + case _unify_l_void : + (*_p) = ((yamop *)(&((*_p)->u.o.next))); + break; + case _unify_l_void_write : + (*_p) = ((yamop *)(&((*_p)->u.o.next))); + break; + case _unify_n_voids : + (*_p) = ((yamop *)(&((*_p)->u.os.next))); + break; + case _unify_n_voids_write : + (*_p) = ((yamop *)(&((*_p)->u.os.next))); + break; + case _unify_l_n_voids : + (*_p) = ((yamop *)(&((*_p)->u.os.next))); + break; + case _unify_l_n_voids_write : + (*_p) = ((yamop *)(&((*_p)->u.os.next))); + break; + case _unify_atom : + (*_p) = ((yamop *)(&((*_p)->u.oc.next))); + break; + case _unify_atom_write : + (*_p) = ((yamop *)(&((*_p)->u.oc.next))); + break; + case _unify_l_atom : + (*_p) = ((yamop *)(&((*_p)->u.oc.next))); + break; + case _unify_l_atom_write : + (*_p) = ((yamop *)(&((*_p)->u.oc.next))); + break; + case _unify_n_atoms : + (*_p) = ((yamop *)(&((*_p)->u.osc.next))); + break; + case _unify_n_atoms_write : + (*_p) = ((yamop *)(&((*_p)->u.osc.next))); + break; + case _unify_float : + (*_p) = ((yamop *)(&((*_p)->u.od.next))); + break; + case _unify_float_write : + (*_p) = ((yamop *)(&((*_p)->u.od.next))); + break; + case _unify_l_float : + (*_p) = ((yamop *)(&((*_p)->u.od.next))); + break; + case _unify_l_float_write : + (*_p) = ((yamop *)(&((*_p)->u.od.next))); + break; + case _unify_longint : + (*_p) = ((yamop *)(&((*_p)->u.oi.next))); + break; + case _unify_longint_write : + (*_p) = ((yamop *)(&((*_p)->u.oi.next))); + break; + case _unify_l_longint : + (*_p) = ((yamop *)(&((*_p)->u.oi.next))); + break; + case _unify_l_longint_write : + (*_p) = ((yamop *)(&((*_p)->u.oi.next))); + break; + case _unify_bigint : + (*_p) = ((yamop *)(&((*_p)->u.oN.next))); + break; + case _unify_l_bigint : + (*_p) = ((yamop *)(&((*_p)->u.oN.next))); + break; + case _unify_dbterm : + (*_p) = ((yamop *)(&((*_p)->u.oD.next))); + break; + case _unify_l_dbterm : + (*_p) = ((yamop *)(&((*_p)->u.oD.next))); + break; + case _unify_list : + (*_p) = ((yamop *)(&((*_p)->u.o.next))); + break; + case _unify_list_write : + (*_p) = ((yamop *)(&((*_p)->u.o.next))); + break; + case _unify_l_list : + (*_p) = ((yamop *)(&((*_p)->u.o.next))); + break; + case _unify_l_list_write : + (*_p) = ((yamop *)(&((*_p)->u.o.next))); + break; + case _unify_struct : + (*_p) = ((yamop *)(&((*_p)->u.ofa.next))); + break; + case _unify_struct_write : + (*_p) = ((yamop *)(&((*_p)->u.ofa.next))); + break; + case _unify_l_struc : + (*_p) = ((yamop *)(&((*_p)->u.ofa.next))); + break; + case _unify_l_struc_write : + (*_p) = ((yamop *)(&((*_p)->u.ofa.next))); + break; + case _put_x_var : + (*_p) = ((yamop *)(&((*_p)->u.xx.next))); + break; + case _put_y_var : + (*_p) = ((yamop *)(&((*_p)->u.yx.next))); + break; + case _put_x_val : + (*_p) = ((yamop *)(&((*_p)->u.xx.next))); + break; + case _put_xx_val : + (*_p) = ((yamop *)(&((*_p)->u.xxxx.next))); + break; + case _put_y_val : + (*_p) = ((yamop *)(&((*_p)->u.yx.next))); + break; + case _put_y_vals : + (*_p) = ((yamop *)(&((*_p)->u.yyxx.next))); + break; + case _put_unsafe : + (*_p) = ((yamop *)(&((*_p)->u.yx.next))); + break; + case _put_atom : + (*_p) = ((yamop *)(&((*_p)->u.xc.next))); + break; + case _put_dbterm : + (*_p) = ((yamop *)(&((*_p)->u.xD.next))); + break; + case _put_bigint : + (*_p) = ((yamop *)(&((*_p)->u.xN.next))); + break; + case _put_float : + (*_p) = ((yamop *)(&((*_p)->u.xd.next))); + break; + case _put_longint : + (*_p) = ((yamop *)(&((*_p)->u.xi.next))); + break; + case _put_list : + (*_p) = ((yamop *)(&((*_p)->u.x.next))); + break; + case _put_struct : + (*_p) = ((yamop *)(&((*_p)->u.xfa.next))); + break; + case _write_x_var : + (*_p) = ((yamop *)(&((*_p)->u.x.next))); + break; + case _write_void : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _write_n_voids : + (*_p) = ((yamop *)(&((*_p)->u.s.next))); + break; + case _write_y_var : + (*_p) = ((yamop *)(&((*_p)->u.y.next))); + break; + case _write_x_val : + (*_p) = ((yamop *)(&((*_p)->u.x.next))); + break; + case _write_x_loc : + (*_p) = ((yamop *)(&((*_p)->u.x.next))); + break; + case _write_y_val : + (*_p) = ((yamop *)(&((*_p)->u.y.next))); + break; + case _write_y_loc : + (*_p) = ((yamop *)(&((*_p)->u.y.next))); + break; + case _write_atom : + (*_p) = ((yamop *)(&((*_p)->u.c.next))); + break; + case _write_bigint : + (*_p) = ((yamop *)(&((*_p)->u.N.next))); + break; + case _write_dbterm : + (*_p) = ((yamop *)(&((*_p)->u.D.next))); + break; + case _write_float : + (*_p) = ((yamop *)(&((*_p)->u.d.next))); + break; + case _write_longint : + (*_p) = ((yamop *)(&((*_p)->u.i.next))); + break; + case _write_n_atoms : + (*_p) = ((yamop *)(&((*_p)->u.sc.next))); + break; + case _write_list : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _write_l_list : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _write_struct : + (*_p) = ((yamop *)(&((*_p)->u.fa.next))); + break; + case _write_l_struc : + (*_p) = ((yamop *)(&((*_p)->u.fa.next))); + break; + case _save_pair_x : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _save_pair_x_write : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _save_pair_y : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _save_pair_y_write : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _save_appl_x : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _save_appl_x_write : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _save_appl_y : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _save_appl_y_write : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _jump : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _move_back : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _skip : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _either : + (*_p) = ((yamop *)(&((*_p)->u.Osblp.next))); + break; + case _or_else : + (*_p) = ((yamop *)(&((*_p)->u.Osblp.next))); + break; + case _pop_n : + (*_p) = ((yamop *)(&((*_p)->u.s.next))); + break; + case _pop : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _call_cpred : + (*_p) = ((yamop *)(&((*_p)->u.Osbpp.next))); + break; + case _execute_cpred : + (*_p) = ((yamop *)(&((*_p)->u.pp.next))); + break; + case _call_usercpred : + (*_p) = ((yamop *)(&((*_p)->u.Osbpp.next))); + break; + case _call_c_wfail : + (*_p) = ((yamop *)(&((*_p)->u.slp.next))); + break; + case _try_c : + (*_p) = ((yamop *)(&((*_p)->u.OtapFs.next))); + break; + case _retry_c : + (*_p) = ((yamop *)(&((*_p)->u.OtapFs.next))); + break; +#ifdef CUT_C + case _cut_c : + (*_p) = ((yamop *)(&((*_p)->u.OtapFs.next))); + break; +#endif + case _try_userc : + (*_p) = ((yamop *)(&((*_p)->u.OtapFs.next))); + break; + case _retry_userc : + (*_p) = ((yamop *)(&((*_p)->u.OtapFs.next))); + break; +#ifdef CUT_C + case _cut_userc : + (*_p) = ((yamop *)(&((*_p)->u.OtapFs.next))); + break; +#endif + case _lock_pred : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _index_pred : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; +#ifdef THREADS + case _thread_local : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; +#endif + case _expand_index : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _expand_clauses : + (*_p) = ((yamop *)(&((*_p)->u.sssllp.next))); + break; + case _undef_p : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _spy_pred : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _try_clause : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _try_clause2 : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _try_clause3 : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _try_clause4 : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _retry : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _retry2 : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _retry3 : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _retry4 : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _trust : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _try_in : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _enter_lu_pred : + (*_p) = ((yamop *)(&((*_p)->u.Illss.next))); + break; + case _try_logical : + (*_p) = ((yamop *)(&((*_p)->u.OtaLl.next))); + break; + case _retry_logical : + (*_p) = ((yamop *)(&((*_p)->u.OtaLl.next))); + break; + case _trust_logical : + (*_p) = ((yamop *)(&((*_p)->u.OtILl.next))); + break; + case _user_switch : + (*_p) = ((yamop *)(&((*_p)->u.lp.next))); + break; + case _switch_on_type : + (*_p) = ((yamop *)(&((*_p)->u.llll.next))); + break; + case _switch_list_nl : + (*_p) = ((yamop *)(&((*_p)->u.ollll.next))); + break; + case _switch_on_arg_type : + (*_p) = ((yamop *)(&((*_p)->u.xllll.next))); + break; + case _switch_on_sub_arg_type : + (*_p) = ((yamop *)(&((*_p)->u.sllll.next))); + break; + case _jump_if_var : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _jump_if_nonvar : + (*_p) = ((yamop *)(&((*_p)->u.xll.next))); + break; + case _if_not_then : + (*_p) = ((yamop *)(&((*_p)->u.clll.next))); + break; + case _switch_on_func : + (*_p) = ((yamop *)(&((*_p)->u.sssl.next))); + break; + case _switch_on_cons : + (*_p) = ((yamop *)(&((*_p)->u.sssl.next))); + break; + case _go_on_func : + (*_p) = ((yamop *)(&((*_p)->u.sssl.next))); + break; + case _go_on_cons : + (*_p) = ((yamop *)(&((*_p)->u.sssl.next))); + break; + case _if_func : + (*_p) = ((yamop *)(&((*_p)->u.sssl.next))); + break; + case _if_cons : + (*_p) = ((yamop *)(&((*_p)->u.sssl.next))); + break; + case _index_dbref : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _index_blob : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _index_long : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _jit_handler : + (*_p) = ((yamop *)(&((*_p)->u.jhc.next))); + break; + case _p_atom_x : + (*_p) = ((yamop *)(&((*_p)->u.xl.next))); + break; + case _p_atom_y : + (*_p) = ((yamop *)(&((*_p)->u.yl.next))); + break; + case _p_atomic_x : + (*_p) = ((yamop *)(&((*_p)->u.xl.next))); + break; + case _p_atomic_y : + (*_p) = ((yamop *)(&((*_p)->u.yl.next))); + break; + case _p_integer_x : + (*_p) = ((yamop *)(&((*_p)->u.xl.next))); + break; + case _p_integer_y : + (*_p) = ((yamop *)(&((*_p)->u.yl.next))); + break; + case _p_nonvar_x : + (*_p) = ((yamop *)(&((*_p)->u.xl.next))); + break; + case _p_nonvar_y : + (*_p) = ((yamop *)(&((*_p)->u.yl.next))); + break; + case _p_number_x : + (*_p) = ((yamop *)(&((*_p)->u.xl.next))); + break; + case _p_number_y : + (*_p) = ((yamop *)(&((*_p)->u.yl.next))); + break; + case _p_var_x : + (*_p) = ((yamop *)(&((*_p)->u.xl.next))); + break; + case _p_var_y : + (*_p) = ((yamop *)(&((*_p)->u.yl.next))); + break; + case _p_db_ref_x : + (*_p) = ((yamop *)(&((*_p)->u.xl.next))); + break; + case _p_db_ref_y : + (*_p) = ((yamop *)(&((*_p)->u.yl.next))); + break; + case _p_primitive_x : + (*_p) = ((yamop *)(&((*_p)->u.xl.next))); + break; + case _p_primitive_y : + (*_p) = ((yamop *)(&((*_p)->u.yl.next))); + break; + case _p_compound_x : + (*_p) = ((yamop *)(&((*_p)->u.xl.next))); + break; + case _p_compound_y : + (*_p) = ((yamop *)(&((*_p)->u.yl.next))); + break; + case _p_float_x : + (*_p) = ((yamop *)(&((*_p)->u.xl.next))); + break; + case _p_float_y : + (*_p) = ((yamop *)(&((*_p)->u.yl.next))); + break; + case _p_plus_vv : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _p_plus_vc : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _p_plus_y_vv : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _p_plus_y_vc : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _p_minus_vv : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _p_minus_cv : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _p_minus_y_vv : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _p_minus_y_cv : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _p_times_vv : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _p_times_vc : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _p_times_y_vv : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _p_times_y_vc : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _p_div_vv : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _p_div_vc : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _p_div_cv : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _p_div_y_vv : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _p_div_y_vc : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _p_div_y_cv : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _p_and_vv : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _p_and_vc : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _p_and_y_vv : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _p_and_y_vc : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _p_or_vv : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _p_or_vc : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _p_or_y_vv : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _p_or_y_vc : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _p_sll_vv : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _p_sll_vc : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _p_sll_cv : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _p_sll_y_vv : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _p_sll_y_vc : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _p_sll_y_cv : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _p_slr_vv : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _p_slr_vc : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _p_slr_cv : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _p_slr_y_vv : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _p_slr_y_vc : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _p_slr_y_cv : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _call_bfunc_xx : + (*_p) = ((yamop *)(&((*_p)->u.plxxs.next))); + break; + case _call_bfunc_yx : + (*_p) = ((yamop *)(&((*_p)->u.plxys.next))); + break; + case _call_bfunc_xy : + (*_p) = ((yamop *)(&((*_p)->u.plxys.next))); + break; + case _call_bfunc_yy : + (*_p) = ((yamop *)(&((*_p)->u.plyys.next))); + break; + case _p_equal : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _p_dif : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _p_eq : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _p_arg_vv : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _p_arg_cv : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _p_arg_y_vv : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _p_arg_y_cv : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _p_func2s_vv : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _p_func2s_cv : + (*_p) = ((yamop *)(&((*_p)->u.xxc.next))); + break; + case _p_func2s_vc : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _p_func2s_y_vv : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _p_func2s_y_cv : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _p_func2s_y_vc : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _p_func2f_xx : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _p_func2f_xy : + (*_p) = ((yamop *)(&((*_p)->u.xxy.next))); + break; + case _p_func2f_yx : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _p_func2f_yy : + (*_p) = ((yamop *)(&((*_p)->u.yyx.next))); + break; + case _p_functor : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _p_execute2 : + (*_p) = ((yamop *)(&((*_p)->u.Osbpp.next))); + break; + case _p_execute : + (*_p) = ((yamop *)(&((*_p)->u.Osbmp.next))); + break; + case _p_execute_tail : + (*_p) = ((yamop *)(&((*_p)->u.Osbpp.next))); + break; +#ifdef YAPOR + case _getwork_first_time : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _getwork : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _getwork_seq : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _sync : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; +#endif +#ifdef TABLING +#ifdef TABLING_INNER_CUTS + case _clause_with_cut : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; +#endif + case _table_load_answer : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _table_try_answer : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _table_try_single : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _table_try_me : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _table_try : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _table_retry_me : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _table_retry : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _table_trust_me : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _table_trust : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _table_new_answer : + (*_p) = ((yamop *)(&((*_p)->u.s.next))); + break; + case _table_answer_resolution : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _table_completion : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; +#ifdef THREADS_CONSUMER_SHARING + case _table_answer_resolution_completion: + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; +#endif + case _trie_do_var : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_trust_var : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_try_var : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_retry_var : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_do_var_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_trust_var_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_try_var_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_retry_var_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_do_val : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_trust_val : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_try_val : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_retry_val : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_do_val_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_trust_val_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_try_val_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_retry_val_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_do_atom : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_trust_atom : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_try_atom : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_retry_atom : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_do_atom_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_trust_atom_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_try_atom_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_retry_atom_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_do_null : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_trust_null : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_try_null : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_retry_null : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_do_null_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_trust_null_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_try_null_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_retry_null_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_do_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_trust_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_try_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_retry_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_do_appl : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_trust_appl : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_try_appl : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_retry_appl : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_do_appl_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_trust_appl_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_try_appl_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_retry_appl_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_do_extension : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_trust_extension : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_try_extension : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_retry_extension : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_do_double : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_trust_double : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_try_double : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_retry_double : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_do_longint : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_trust_longint : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_try_longint : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_retry_longint : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_do_gterm : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_trust_gterm : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_try_gterm : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _trie_retry_gterm : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; +#endif +#ifdef YAPOR + case _or_last : + (*_p) = ((yamop *)(&((*_p)->u.sblp.next))); + break; +#else + case _or_last : + (*_p) = ((yamop *)(&((*_p)->u.p.next))); + break; +#endif + case _traced_Ystop : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _traced_Nstop : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_try_me : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_retry_me : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_trust_me : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_enter_profiling : + (*_p) = ((yamop *)(&((*_p)->u.p.next))); + break; + case _traced_retry_profiled : + (*_p) = ((yamop *)(&((*_p)->u.p.next))); + break; + case _traced_profiled_retry_me : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_profiled_trust_me : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_profiled_retry_logical : + (*_p) = ((yamop *)(&((*_p)->u.OtaLl.next))); + break; + case _traced_profiled_trust_logical : + (*_p) = ((yamop *)(&((*_p)->u.OtILl.next))); + break; + case _traced_count_call : + (*_p) = ((yamop *)(&((*_p)->u.p.next))); + break; + case _traced_count_retry : + (*_p) = ((yamop *)(&((*_p)->u.p.next))); + break; + case _traced_count_retry_me : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_count_trust_me : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_count_retry_logical : + (*_p) = ((yamop *)(&((*_p)->u.OtaLl.next))); + break; + case _traced_count_trust_logical : + (*_p) = ((yamop *)(&((*_p)->u.OtILl.next))); + break; + case _traced_lock_lu : + (*_p) = ((yamop *)(&((*_p)->u.p.next))); + break; + case _traced_unlock_lu : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_alloc_for_logical_pred : + (*_p) = ((yamop *)(&((*_p)->u.L.next))); + break; + case _traced_copy_idb_term : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_unify_idb_term : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_ensure_space : + (*_p) = ((yamop *)(&((*_p)->u.Osbpa.next))); + break; + case _traced_spy_or_trymark : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_try_and_mark : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_count_retry_and_mark : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_profiled_retry_and_mark : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_retry_and_mark : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_trust_fail : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_op_fail : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_cut : + (*_p) = ((yamop *)(&((*_p)->u.s.next))); + break; + case _traced_cut_t : + (*_p) = ((yamop *)(&((*_p)->u.s.next))); + break; + case _traced_cut_e : + (*_p) = ((yamop *)(&((*_p)->u.s.next))); + break; + case _traced_save_b_x : + (*_p) = ((yamop *)(&((*_p)->u.x.next))); + break; + case _traced_save_b_y : + (*_p) = ((yamop *)(&((*_p)->u.y.next))); + break; + case _traced_commit_b_x : + (*_p) = ((yamop *)(&((*_p)->u.xps.next))); + break; + case _traced_commit_b_y : + (*_p) = ((yamop *)(&((*_p)->u.yps.next))); + break; + case _traced_execute : + (*_p) = ((yamop *)(&((*_p)->u.pp.next))); + break; + case _traced_dexecute : + (*_p) = ((yamop *)(&((*_p)->u.pp.next))); + break; + case _traced_fcall : + (*_p) = ((yamop *)(&((*_p)->u.Osbpp.next))); + break; + case _traced_call : + (*_p) = ((yamop *)(&((*_p)->u.Osbpp.next))); + break; + case _traced_procceed : + (*_p) = ((yamop *)(&((*_p)->u.p.next))); + break; + case _traced_allocate : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_deallocate : + (*_p) = ((yamop *)(&((*_p)->u.p.next))); + break; +#ifdef BEAM + case _traced_retry_eam : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; +#endif +#ifdef BEAM + case _traced_run_eam : + (*_p) = ((yamop *)(&((*_p)->u.os.next))); + break; +#endif + case _traced_get_x_var : + (*_p) = ((yamop *)(&((*_p)->u.xx.next))); + break; + case _traced_get_y_var : + (*_p) = ((yamop *)(&((*_p)->u.yx.next))); + break; + case _traced_get_yy_var : + (*_p) = ((yamop *)(&((*_p)->u.yyxx.next))); + break; + case _traced_get_x_val : + (*_p) = ((yamop *)(&((*_p)->u.xx.next))); + break; + case _traced_get_y_val : + (*_p) = ((yamop *)(&((*_p)->u.yx.next))); + break; + case _traced_get_atom : + (*_p) = ((yamop *)(&((*_p)->u.xc.next))); + break; + case _traced_get_2atoms : + (*_p) = ((yamop *)(&((*_p)->u.cc.next))); + break; + case _traced_get_3atoms : + (*_p) = ((yamop *)(&((*_p)->u.ccc.next))); + break; + case _traced_get_4atoms : + (*_p) = ((yamop *)(&((*_p)->u.cccc.next))); + break; + case _traced_get_5atoms : + (*_p) = ((yamop *)(&((*_p)->u.ccccc.next))); + break; + case _traced_get_6atoms : + (*_p) = ((yamop *)(&((*_p)->u.cccccc.next))); + break; + case _traced_get_list : + (*_p) = ((yamop *)(&((*_p)->u.x.next))); + break; + case _traced_get_struct : + (*_p) = ((yamop *)(&((*_p)->u.xfa.next))); + break; + case _traced_get_float : + (*_p) = ((yamop *)(&((*_p)->u.xd.next))); + break; + case _traced_get_longint : + (*_p) = ((yamop *)(&((*_p)->u.xi.next))); + break; + case _traced_get_bigint : + (*_p) = ((yamop *)(&((*_p)->u.xN.next))); + break; + case _traced_get_dbterm : + (*_p) = ((yamop *)(&((*_p)->u.xD.next))); + break; + case _traced_glist_valx : + (*_p) = ((yamop *)(&((*_p)->u.xx.next))); + break; + case _traced_glist_valy : + (*_p) = ((yamop *)(&((*_p)->u.yx.next))); + break; + case _traced_gl_void_varx : + (*_p) = ((yamop *)(&((*_p)->u.xx.next))); + break; + case _traced_gl_void_vary : + (*_p) = ((yamop *)(&((*_p)->u.yx.next))); + break; + case _traced_gl_void_valx : + (*_p) = ((yamop *)(&((*_p)->u.xx.next))); + break; + case _traced_gl_void_valy : + (*_p) = ((yamop *)(&((*_p)->u.yx.next))); + break; + case _traced_unify_x_var : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _traced_unify_x_var_write : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _traced_unify_l_x_var : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _traced_unify_l_x_var_write : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _traced_unify_x_var2 : + (*_p) = ((yamop *)(&((*_p)->u.oxx.next))); + break; + case _traced_unify_x_var2_write : + (*_p) = ((yamop *)(&((*_p)->u.oxx.next))); + break; + case _traced_unify_l_x_var2 : + (*_p) = ((yamop *)(&((*_p)->u.oxx.next))); + break; + case _traced_unify_l_x_var2_write : + (*_p) = ((yamop *)(&((*_p)->u.oxx.next))); + break; + case _traced_unify_y_var : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _traced_unify_y_var_write : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _traced_unify_l_y_var : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _traced_unify_l_y_var_write : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _traced_unify_x_val : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _traced_unify_x_val_write : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _traced_unify_l_x_val : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _traced_unify_l_x_val_write : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _traced_unify_y_val : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _traced_unify_y_val_write : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _traced_unify_l_y_val : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _traced_unify_l_y_val_write : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _traced_unify_x_loc : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _traced_unify_x_loc_write : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _traced_unify_l_x_loc : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _traced_unify_l_x_loc_write : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _traced_unify_y_loc : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _traced_unify_y_loc_write : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _traced_unify_l_y_loc : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _traced_unify_l_y_loc_write : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _traced_unify_void : + (*_p) = ((yamop *)(&((*_p)->u.o.next))); + break; + case _traced_unify_void_write : + (*_p) = ((yamop *)(&((*_p)->u.o.next))); + break; + case _traced_unify_l_void : + (*_p) = ((yamop *)(&((*_p)->u.o.next))); + break; + case _traced_unify_l_void_write : + (*_p) = ((yamop *)(&((*_p)->u.o.next))); + break; + case _traced_unify_n_voids : + (*_p) = ((yamop *)(&((*_p)->u.os.next))); + break; + case _traced_unify_n_voids_write : + (*_p) = ((yamop *)(&((*_p)->u.os.next))); + break; + case _traced_unify_l_n_voids : + (*_p) = ((yamop *)(&((*_p)->u.os.next))); + break; + case _traced_unify_l_n_voids_write : + (*_p) = ((yamop *)(&((*_p)->u.os.next))); + break; + case _traced_unify_atom : + (*_p) = ((yamop *)(&((*_p)->u.oc.next))); + break; + case _traced_unify_atom_write : + (*_p) = ((yamop *)(&((*_p)->u.oc.next))); + break; + case _traced_unify_l_atom : + (*_p) = ((yamop *)(&((*_p)->u.oc.next))); + break; + case _traced_unify_l_atom_write : + (*_p) = ((yamop *)(&((*_p)->u.oc.next))); + break; + case _traced_unify_n_atoms : + (*_p) = ((yamop *)(&((*_p)->u.osc.next))); + break; + case _traced_unify_n_atoms_write : + (*_p) = ((yamop *)(&((*_p)->u.osc.next))); + break; + case _traced_unify_float : + (*_p) = ((yamop *)(&((*_p)->u.od.next))); + break; + case _traced_unify_float_write : + (*_p) = ((yamop *)(&((*_p)->u.od.next))); + break; + case _traced_unify_l_float : + (*_p) = ((yamop *)(&((*_p)->u.od.next))); + break; + case _traced_unify_l_float_write : + (*_p) = ((yamop *)(&((*_p)->u.od.next))); + break; + case _traced_unify_longint : + (*_p) = ((yamop *)(&((*_p)->u.oi.next))); + break; + case _traced_unify_longint_write : + (*_p) = ((yamop *)(&((*_p)->u.oi.next))); + break; + case _traced_unify_l_longint : + (*_p) = ((yamop *)(&((*_p)->u.oi.next))); + break; + case _traced_unify_l_longint_write : + (*_p) = ((yamop *)(&((*_p)->u.oi.next))); + break; + case _traced_unify_bigint : + (*_p) = ((yamop *)(&((*_p)->u.oN.next))); + break; + case _traced_unify_l_bigint : + (*_p) = ((yamop *)(&((*_p)->u.oN.next))); + break; + case _traced_unify_dbterm : + (*_p) = ((yamop *)(&((*_p)->u.oD.next))); + break; + case _traced_unify_l_dbterm : + (*_p) = ((yamop *)(&((*_p)->u.oD.next))); + break; + case _traced_unify_list : + (*_p) = ((yamop *)(&((*_p)->u.o.next))); + break; + case _traced_unify_list_write : + (*_p) = ((yamop *)(&((*_p)->u.o.next))); + break; + case _traced_unify_l_list : + (*_p) = ((yamop *)(&((*_p)->u.o.next))); + break; + case _traced_unify_l_list_write : + (*_p) = ((yamop *)(&((*_p)->u.o.next))); + break; + case _traced_unify_struct : + (*_p) = ((yamop *)(&((*_p)->u.ofa.next))); + break; + case _traced_unify_struct_write : + (*_p) = ((yamop *)(&((*_p)->u.ofa.next))); + break; + case _traced_unify_l_struc : + (*_p) = ((yamop *)(&((*_p)->u.ofa.next))); + break; + case _traced_unify_l_struc_write : + (*_p) = ((yamop *)(&((*_p)->u.ofa.next))); + break; + case _traced_put_x_var : + (*_p) = ((yamop *)(&((*_p)->u.xx.next))); + break; + case _traced_put_y_var : + (*_p) = ((yamop *)(&((*_p)->u.yx.next))); + break; + case _traced_put_x_val : + (*_p) = ((yamop *)(&((*_p)->u.xx.next))); + break; + case _traced_put_xx_val : + (*_p) = ((yamop *)(&((*_p)->u.xxxx.next))); + break; + case _traced_put_y_val : + (*_p) = ((yamop *)(&((*_p)->u.yx.next))); + break; + case _traced_put_y_vals : + (*_p) = ((yamop *)(&((*_p)->u.yyxx.next))); + break; + case _traced_put_unsafe : + (*_p) = ((yamop *)(&((*_p)->u.yx.next))); + break; + case _traced_put_atom : + (*_p) = ((yamop *)(&((*_p)->u.xc.next))); + break; + case _traced_put_dbterm : + (*_p) = ((yamop *)(&((*_p)->u.xD.next))); + break; + case _traced_put_bigint : + (*_p) = ((yamop *)(&((*_p)->u.xN.next))); + break; + case _traced_put_float : + (*_p) = ((yamop *)(&((*_p)->u.xd.next))); + break; + case _traced_put_longint : + (*_p) = ((yamop *)(&((*_p)->u.xi.next))); + break; + case _traced_put_list : + (*_p) = ((yamop *)(&((*_p)->u.x.next))); + break; + case _traced_put_struct : + (*_p) = ((yamop *)(&((*_p)->u.xfa.next))); + break; + case _traced_write_x_var : + (*_p) = ((yamop *)(&((*_p)->u.x.next))); + break; + case _traced_write_void : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_write_n_voids : + (*_p) = ((yamop *)(&((*_p)->u.s.next))); + break; + case _traced_write_y_var : + (*_p) = ((yamop *)(&((*_p)->u.y.next))); + break; + case _traced_write_x_val : + (*_p) = ((yamop *)(&((*_p)->u.x.next))); + break; + case _traced_write_x_loc : + (*_p) = ((yamop *)(&((*_p)->u.x.next))); + break; + case _traced_write_y_val : + (*_p) = ((yamop *)(&((*_p)->u.y.next))); + break; + case _traced_write_y_loc : + (*_p) = ((yamop *)(&((*_p)->u.y.next))); + break; + case _traced_write_atom : + (*_p) = ((yamop *)(&((*_p)->u.c.next))); + break; + case _traced_write_bigint : + (*_p) = ((yamop *)(&((*_p)->u.N.next))); + break; + case _traced_write_dbterm : + (*_p) = ((yamop *)(&((*_p)->u.D.next))); + break; + case _traced_write_float : + (*_p) = ((yamop *)(&((*_p)->u.d.next))); + break; + case _traced_write_longint : + (*_p) = ((yamop *)(&((*_p)->u.i.next))); + break; + case _traced_write_n_atoms : + (*_p) = ((yamop *)(&((*_p)->u.sc.next))); + break; + case _traced_write_list : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_write_l_list : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_write_struct : + (*_p) = ((yamop *)(&((*_p)->u.fa.next))); + break; + case _traced_write_l_struc : + (*_p) = ((yamop *)(&((*_p)->u.fa.next))); + break; + case _traced_save_pair_x : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _traced_save_pair_x_write : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _traced_save_pair_y : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _traced_save_pair_y_write : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _traced_save_appl_x : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _traced_save_appl_x_write : + (*_p) = ((yamop *)(&((*_p)->u.ox.next))); + break; + case _traced_save_appl_y : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _traced_save_appl_y_write : + (*_p) = ((yamop *)(&((*_p)->u.oy.next))); + break; + case _traced_jump : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _traced_move_back : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _traced_skip : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _traced_either : + (*_p) = ((yamop *)(&((*_p)->u.Osblp.next))); + break; + case _traced_or_else : + (*_p) = ((yamop *)(&((*_p)->u.Osblp.next))); + break; + case _traced_pop_n : + (*_p) = ((yamop *)(&((*_p)->u.s.next))); + break; + case _traced_pop : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_call_cpred : + (*_p) = ((yamop *)(&((*_p)->u.Osbpp.next))); + break; + case _traced_execute_cpred : + (*_p) = ((yamop *)(&((*_p)->u.pp.next))); + break; + case _traced_call_usercpred : + (*_p) = ((yamop *)(&((*_p)->u.Osbpp.next))); + break; + case _traced_call_c_wfail : + (*_p) = ((yamop *)(&((*_p)->u.slp.next))); + break; + case _traced_try_c : + (*_p) = ((yamop *)(&((*_p)->u.OtapFs.next))); + break; + case _traced_retry_c : + (*_p) = ((yamop *)(&((*_p)->u.OtapFs.next))); + break; +#ifdef CUT_C + case _traced_cut_c : + (*_p) = ((yamop *)(&((*_p)->u.OtapFs.next))); + break; +#endif + case _traced_try_userc : + (*_p) = ((yamop *)(&((*_p)->u.OtapFs.next))); + break; + case _traced_retry_userc : + (*_p) = ((yamop *)(&((*_p)->u.OtapFs.next))); + break; +#ifdef CUT_C + case _traced_cut_userc : + (*_p) = ((yamop *)(&((*_p)->u.OtapFs.next))); + break; +#endif + case _traced_lock_pred : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_index_pred : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; +#ifdef THREADS + case _traced_thread_local : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; +#endif + case _traced_expand_index : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_expand_clauses : + (*_p) = ((yamop *)(&((*_p)->u.sssllp.next))); + break; + case _traced_undef_p : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_spy_pred : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_try_clause : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_try_clause2 : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _traced_try_clause3 : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _traced_try_clause4 : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _traced_retry : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_retry2 : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _traced_retry3 : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _traced_retry4 : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _traced_trust : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_try_in : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _traced_enter_lu_pred : + (*_p) = ((yamop *)(&((*_p)->u.Illss.next))); + break; + case _traced_try_logical : + (*_p) = ((yamop *)(&((*_p)->u.OtaLl.next))); + break; + case _traced_retry_logical : + (*_p) = ((yamop *)(&((*_p)->u.OtaLl.next))); + break; + case _traced_trust_logical : + (*_p) = ((yamop *)(&((*_p)->u.OtILl.next))); + break; + case _traced_user_switch : + (*_p) = ((yamop *)(&((*_p)->u.lp.next))); + break; + case _traced_switch_on_type : + (*_p) = ((yamop *)(&((*_p)->u.llll.next))); + break; + case _traced_switch_list_nl : + (*_p) = ((yamop *)(&((*_p)->u.ollll.next))); + break; + case _traced_switch_on_arg_type : + (*_p) = ((yamop *)(&((*_p)->u.xllll.next))); + break; + case _traced_switch_on_sub_arg_type : + (*_p) = ((yamop *)(&((*_p)->u.sllll.next))); + break; + case _traced_jump_if_var : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _traced_jump_if_nonvar : + (*_p) = ((yamop *)(&((*_p)->u.xll.next))); + break; + case _traced_if_not_then : + (*_p) = ((yamop *)(&((*_p)->u.clll.next))); + break; + case _traced_switch_on_func : + (*_p) = ((yamop *)(&((*_p)->u.sssl.next))); + break; + case _traced_switch_on_cons : + (*_p) = ((yamop *)(&((*_p)->u.sssl.next))); + break; + case _traced_go_on_func : + (*_p) = ((yamop *)(&((*_p)->u.sssl.next))); + break; + case _traced_go_on_cons : + (*_p) = ((yamop *)(&((*_p)->u.sssl.next))); + break; + case _traced_if_func : + (*_p) = ((yamop *)(&((*_p)->u.sssl.next))); + break; + case _traced_if_cons : + (*_p) = ((yamop *)(&((*_p)->u.sssl.next))); + break; + case _traced_index_dbref : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_index_blob : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_index_long : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_jit_handler : + (*_p) = ((yamop *)(&((*_p)->u.jhc.next))); + break; + case _traced_p_atom_x : + (*_p) = ((yamop *)(&((*_p)->u.xl.next))); + break; + case _traced_p_atom_y : + (*_p) = ((yamop *)(&((*_p)->u.yl.next))); + break; + case _traced_p_atomic_x : + (*_p) = ((yamop *)(&((*_p)->u.xl.next))); + break; + case _traced_p_atomic_y : + (*_p) = ((yamop *)(&((*_p)->u.yl.next))); + break; + case _traced_p_integer_x : + (*_p) = ((yamop *)(&((*_p)->u.xl.next))); + break; + case _traced_p_integer_y : + (*_p) = ((yamop *)(&((*_p)->u.yl.next))); + break; + case _traced_p_nonvar_x : + (*_p) = ((yamop *)(&((*_p)->u.xl.next))); + break; + case _traced_p_nonvar_y : + (*_p) = ((yamop *)(&((*_p)->u.yl.next))); + break; + case _traced_p_number_x : + (*_p) = ((yamop *)(&((*_p)->u.xl.next))); + break; + case _traced_p_number_y : + (*_p) = ((yamop *)(&((*_p)->u.yl.next))); + break; + case _traced_p_var_x : + (*_p) = ((yamop *)(&((*_p)->u.xl.next))); + break; + case _traced_p_var_y : + (*_p) = ((yamop *)(&((*_p)->u.yl.next))); + break; + case _traced_p_db_ref_x : + (*_p) = ((yamop *)(&((*_p)->u.xl.next))); + break; + case _traced_p_db_ref_y : + (*_p) = ((yamop *)(&((*_p)->u.yl.next))); + break; + case _traced_p_primitive_x : + (*_p) = ((yamop *)(&((*_p)->u.xl.next))); + break; + case _traced_p_primitive_y : + (*_p) = ((yamop *)(&((*_p)->u.yl.next))); + break; + case _traced_p_compound_x : + (*_p) = ((yamop *)(&((*_p)->u.xl.next))); + break; + case _traced_p_compound_y : + (*_p) = ((yamop *)(&((*_p)->u.yl.next))); + break; + case _traced_p_float_x : + (*_p) = ((yamop *)(&((*_p)->u.xl.next))); + break; + case _traced_p_float_y : + (*_p) = ((yamop *)(&((*_p)->u.yl.next))); + break; + case _traced_p_plus_vv : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _traced_p_plus_vc : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _traced_p_plus_y_vv : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _traced_p_plus_y_vc : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _traced_p_minus_vv : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _traced_p_minus_cv : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _traced_p_minus_y_vv : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _traced_p_minus_y_cv : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _traced_p_times_vv : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _traced_p_times_vc : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _traced_p_times_y_vv : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _traced_p_times_y_vc : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _traced_p_div_vv : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _traced_p_div_vc : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _traced_p_div_cv : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _traced_p_div_y_vv : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _traced_p_div_y_vc : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _traced_p_div_y_cv : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _traced_p_and_vv : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _traced_p_and_vc : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _traced_p_and_y_vv : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _traced_p_and_y_vc : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _traced_p_or_vv : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _traced_p_or_vc : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _traced_p_or_y_vv : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _traced_p_or_y_vc : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _traced_p_sll_vv : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _traced_p_sll_vc : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _traced_p_sll_cv : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _traced_p_sll_y_vv : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _traced_p_sll_y_vc : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _traced_p_sll_y_cv : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _traced_p_slr_vv : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _traced_p_slr_vc : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _traced_p_slr_cv : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _traced_p_slr_y_vv : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _traced_p_slr_y_vc : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _traced_p_slr_y_cv : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _traced_call_bfunc_xx : + (*_p) = ((yamop *)(&((*_p)->u.plxxs.next))); + break; + case _traced_call_bfunc_yx : + (*_p) = ((yamop *)(&((*_p)->u.plxys.next))); + break; + case _traced_call_bfunc_xy : + (*_p) = ((yamop *)(&((*_p)->u.plxys.next))); + break; + case _traced_call_bfunc_yy : + (*_p) = ((yamop *)(&((*_p)->u.plyys.next))); + break; + case _traced_p_equal : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_p_dif : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _traced_p_eq : + (*_p) = ((yamop *)(&((*_p)->u.l.next))); + break; + case _traced_p_arg_vv : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _traced_p_arg_cv : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _traced_p_arg_y_vv : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _traced_p_arg_y_cv : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _traced_p_func2s_vv : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _traced_p_func2s_cv : + (*_p) = ((yamop *)(&((*_p)->u.xxc.next))); + break; + case _traced_p_func2s_vc : + (*_p) = ((yamop *)(&((*_p)->u.xxn.next))); + break; + case _traced_p_func2s_y_vv : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _traced_p_func2s_y_cv : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _traced_p_func2s_y_vc : + (*_p) = ((yamop *)(&((*_p)->u.yxn.next))); + break; + case _traced_p_func2f_xx : + (*_p) = ((yamop *)(&((*_p)->u.xxx.next))); + break; + case _traced_p_func2f_xy : + (*_p) = ((yamop *)(&((*_p)->u.xxy.next))); + break; + case _traced_p_func2f_yx : + (*_p) = ((yamop *)(&((*_p)->u.yxx.next))); + break; + case _traced_p_func2f_yy : + (*_p) = ((yamop *)(&((*_p)->u.yyx.next))); + break; + case _traced_p_functor : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_p_execute2 : + (*_p) = ((yamop *)(&((*_p)->u.Osbpp.next))); + break; + case _traced_p_execute : + (*_p) = ((yamop *)(&((*_p)->u.Osbmp.next))); + break; + case _traced_p_execute_tail : + (*_p) = ((yamop *)(&((*_p)->u.Osbpp.next))); + break; +#ifdef YAPOR + case _traced_getwork_first_time : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_getwork : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_getwork_seq : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_sync : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; +#endif +#ifdef TABLING +#ifdef TABLING_INNER_CUTS + case _traced_clause_with_cut : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; +#endif + case _traced_table_load_answer : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_table_try_answer : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_table_try_single : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_table_try_me : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_table_try : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_table_retry_me : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_table_retry : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_table_trust_me : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_table_trust : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_table_new_answer : + (*_p) = ((yamop *)(&((*_p)->u.s.next))); + break; + case _traced_table_answer_resolution : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; + case _traced_table_completion : + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; +#ifdef THREADS_CONSUMER_SHARING + case _traced_table_answer_resolution_completion: + (*_p) = ((yamop *)(&((*_p)->u.Otapl.next))); + break; +#endif + case _traced_trie_do_var : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_trust_var : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_try_var : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_retry_var : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_do_var_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_trust_var_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_try_var_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_retry_var_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_do_val : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_trust_val : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_try_val : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_retry_val : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_do_val_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_trust_val_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_try_val_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_retry_val_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_do_atom : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_trust_atom : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_try_atom : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_retry_atom : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_do_atom_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_trust_atom_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_try_atom_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_retry_atom_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_do_null : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_trust_null : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_try_null : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_retry_null : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_do_null_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_trust_null_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_try_null_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_retry_null_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_do_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_trust_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_try_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_retry_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_do_appl : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_trust_appl : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_try_appl : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_retry_appl : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_do_appl_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_trust_appl_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_try_appl_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_retry_appl_in_pair : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_do_extension : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_trust_extension : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_try_extension : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_retry_extension : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_do_double : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_trust_double : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_try_double : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_retry_double : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_do_longint : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_trust_longint : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_try_longint : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_retry_longint : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_do_gterm : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_trust_gterm : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_try_gterm : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; + case _traced_trie_retry_gterm : + (*_p) = ((yamop *)(&((*_p)->u.e.next))); + break; +#endif +#ifdef YAPOR + case _traced_or_last : + (*_p) = ((yamop *)(&((*_p)->u.sblp.next))); + break; +#else + case _traced_or_last : + (*_p) = ((yamop *)(&((*_p)->u.p.next))); + break; +#endif + } +} diff --git a/JIT/HPP/p_dif.i b/JIT/HPP/p_dif.i index a89f94838..0e871a0e5 100644 --- a/JIT/HPP/p_dif.i +++ b/JIT/HPP/p_dif.i @@ -21,7 +21,7 @@ #define P_DIF_DIF_NVAR1_NVAR2 \ BLOCK = (CELL)P_DIF_DIF_NVAR1_NVAR2; \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -36,7 +36,7 @@ pt0 = TR; \ BEGCHO(pt1); \ pt1 = B; \ - HBREG = HR; \ + HRBREG = HR; \ B = (choiceptr) HR; \ B->cp_h = HR; \ SET_BB(B); \ @@ -48,8 +48,8 @@ }\ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HR = HBREG; \ - HBREG = B->cp_h; \ + HR = HRBREG; \ + HRBREG = B->cp_h; \ while (TR != pt0) { \ d1 = TrailTerm(--TR); \ if (IsVarTerm(d1)) { \ @@ -64,7 +64,7 @@ } \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -78,7 +78,7 @@ #define P_DIF_DIF_NVAR1_NVAR2 \ BLOCK = (CELL)P_DIF_DIF_NVAR1_NVAR2; \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -93,7 +93,7 @@ pt0 = TR; \ BEGCHO(pt1); \ pt1 = B; \ - HBREG = HR; \ + HRBREG = HR; \ B = (choiceptr) HR; \ B->cp_h = HR; \ SET_BB(B); \ @@ -105,8 +105,8 @@ }\ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HR = HBREG; \ - HBREG = B->cp_h; \ + HR = HRBREG; \ + HRBREG = B->cp_h; \ while (TR != pt0) { \ d1 = TrailTerm(--TR); \ if (IsVarTerm(d1)) { \ @@ -122,7 +122,7 @@ } \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -137,7 +137,7 @@ #define P_DIF_DIF_NVAR1_NVAR2 \ BLOCK = (CELL)P_DIF_DIF_NVAR1_NVAR2; \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -152,7 +152,7 @@ pt0 = TR; \ BEGCHO(pt1); \ pt1 = B; \ - HBREG = HR; \ + HRBREG = HR; \ B = (choiceptr) HR; \ B->cp_h = HR; \ SET_BB(B); \ @@ -164,8 +164,8 @@ }\ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HR = HBREG; \ - HBREG = B->cp_h; \ + HR = HRBREG; \ + HRBREG = B->cp_h; \ while (TR != pt0) { \ d1 = TrailTerm(--TR); \ if (IsVarTerm(d1)) { \ @@ -177,7 +177,7 @@ } \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -194,7 +194,7 @@ #define P_DIF_DIF_NVAR1_NVAR2 \ BLOCK = (CELL)P_DIF_DIF_NVAR1_NVAR2; \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -209,7 +209,7 @@ pt0 = TR; \ BEGCHO(pt1); \ pt1 = B; \ - HBREG = HR; \ + HRBREG = HR; \ B = (choiceptr) HR; \ B->cp_h = HR; \ SET_BB(B); \ @@ -221,8 +221,8 @@ } \ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HR = HBREG; \ - HBREG = B->cp_h; \ + HR = HRBREG; \ + HRBREG = B->cp_h; \ while (TR != pt0) { \ d1 = TrailTerm(--TR); \ if (IsVarTerm(d1)) { \ @@ -233,7 +233,7 @@ } \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -247,7 +247,7 @@ #define P_DIF_DIF_NVAR1_NVAR2 \ BLOCK = (CELL)P_DIF_DIF_NVAR1_NVAR2; \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -262,7 +262,7 @@ pt0 = TR; \ BEGCHO(pt1); \ pt1 = B; \ - HBREG = HR; \ + HRBREG = HR; \ B = (choiceptr) HR; \ B->cp_h = HR; \ SET_BB(B); \ @@ -274,8 +274,8 @@ }\ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HR = HBREG; \ - HBREG = B->cp_h; \ + HR = HRBREG; \ + HRBREG = B->cp_h; \ while (TR != pt0) { \ d1 = TrailTerm(--TR); \ if (IsVarTerm(d1)) { \ @@ -287,7 +287,7 @@ } \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -302,7 +302,7 @@ #define P_DIF_DIF_NVAR1_NVAR2 \ BLOCK = (CELL)P_DIF_DIF_NVAR1_NVAR2; \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -317,7 +317,7 @@ pt0 = TR; \ BEGCHO(pt1); \ pt1 = B; \ - HBREG = HR; \ + HRBREG = HR; \ B = (choiceptr) HR; \ B->cp_h = HR; \ SET_BB(B); \ @@ -329,8 +329,8 @@ }\ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HR = HBREG; \ - HBREG = B->cp_h; \ + HR = HRBREG; \ + HRBREG = B->cp_h; \ while (TR != pt0) { \ d1 = TrailTerm(--TR); \ if (IsVarTerm(d1)) { \ @@ -338,7 +338,7 @@ } \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -357,7 +357,7 @@ #define P_DIF_DIF_NVAR1_NVAR2 \ BLOCK = (CELL)P_DIF_DIF_NVAR1_NVAR2; \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -371,7 +371,7 @@ pt0 = TR; \ BEGCHO(pt1); \ pt1 = B; \ - HBREG = HR; \ + HRBREG = HR; \ B = (choiceptr) HR; \ B->cp_h = HR; \ SET_BB(B); \ @@ -379,7 +379,7 @@ opresult = Yap_IUnify(d0, d1); \ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HBREG = B->cp_h; \ + HRBREG = B->cp_h; \ while (TR != pt0) { \ d1 = TrailTerm(--TR); \ if (IsVarTerm(d1)) { \ @@ -394,7 +394,7 @@ } \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -408,7 +408,7 @@ #define P_DIF_DIF_NVAR1_NVAR2 \ BLOCK = (CELL)P_DIF_DIF_NVAR1_NVAR2; \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -422,7 +422,7 @@ pt0 = TR; \ BEGCHO(pt1); \ pt1 = B; \ - HBREG = HR; \ + HRBREG = HR; \ B = (choiceptr) HR; \ B->cp_h = HR; \ SET_BB(B); \ @@ -430,7 +430,7 @@ opresult = Yap_IUnify(d0, d1); \ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HBREG = B->cp_h; \ + HRBREG = B->cp_h; \ while (TR != pt0) { \ d1 = TrailTerm(--TR); \ if (IsVarTerm(d1)) { \ @@ -446,7 +446,7 @@ } \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -461,7 +461,7 @@ #define P_DIF_DIF_NVAR1_NVAR2 \ BLOCK = (CELL)P_DIF_DIF_NVAR1_NVAR2; \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -475,7 +475,7 @@ pt0 = TR; \ BEGCHO(pt1); \ pt1 = B; \ - HBREG = HR; \ + HRBREG = HR; \ B = (choiceptr) HR; \ B->cp_h = HR; \ SET_BB(B); \ @@ -483,7 +483,7 @@ opresult = Yap_IUnify(d0, d1); \ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HBREG = B->cp_h; \ + HRBREG = B->cp_h; \ while (TR != pt0) { \ d1 = TrailTerm(--TR); \ if (IsVarTerm(d1)) { \ @@ -495,7 +495,7 @@ } \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -512,7 +512,7 @@ #define P_DIF_DIF_NVAR1_NVAR2 \ BLOCK = (CELL)P_DIF_DIF_NVAR1_NVAR2; \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -526,7 +526,7 @@ pt0 = TR; \ BEGCHO(pt1); \ pt1 = B; \ - HBREG = HR; \ + HRBREG = HR; \ B = (choiceptr) HR; \ B->cp_h = HR; \ SET_BB(B); \ @@ -534,7 +534,7 @@ opresult = Yap_IUnify(d0, d1); \ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HBREG = B->cp_h; \ + HRBREG = B->cp_h; \ while (TR != pt0) { \ d1 = TrailTerm(--TR); \ if (IsVarTerm(d1)) { \ @@ -545,7 +545,7 @@ } \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -559,7 +559,7 @@ #define P_DIF_DIF_NVAR1_NVAR2 \ BLOCK = (CELL)P_DIF_DIF_NVAR1_NVAR2; \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -573,7 +573,7 @@ pt0 = TR; \ BEGCHO(pt1); \ pt1 = B; \ - HBREG = HR; \ + HRBREG = HR; \ B = (choiceptr) HR; \ B->cp_h = HR; \ SET_BB(B); \ @@ -581,7 +581,7 @@ opresult = Yap_IUnify(d0, d1); \ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HBREG = B->cp_h; \ + HRBREG = B->cp_h; \ while (TR != pt0) { \ d1 = TrailTerm(--TR); \ if (IsVarTerm(d1)) { \ @@ -593,7 +593,7 @@ } \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -608,7 +608,7 @@ #define P_DIF_DIF_NVAR1_NVAR2 \ BLOCK = (CELL)P_DIF_DIF_NVAR1_NVAR2; \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -622,7 +622,7 @@ pt0 = TR; \ BEGCHO(pt1); \ pt1 = B; \ - HBREG = HR; \ + HRBREG = HR; \ B = (choiceptr) HR; \ B->cp_h = HR; \ SET_BB(B); \ @@ -630,7 +630,7 @@ opresult = Yap_IUnify(d0, d1); \ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HBREG = B->cp_h; \ + HRBREG = B->cp_h; \ while (TR != pt0) { \ d1 = TrailTerm(--TR); \ if (IsVarTerm(d1)) { \ @@ -638,7 +638,7 @@ } \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -653,9 +653,9 @@ #endif /* COROUTINING */ #define P_DIF_DIF_UNK1 \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); #define P_DIF_DIF_NVAR1_UNK2 \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); diff --git a/JIT/HPP/p_eq.i b/JIT/HPP/p_eq.i index 26b625564..e43b33852 100644 --- a/JIT/HPP/p_eq.i +++ b/JIT/HPP/p_eq.i @@ -25,14 +25,14 @@ else { \ if (IsPairTerm(d0)) { \ if (!IsPairTerm(d1)) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ always_save_pc(); \ d2 = iequ_complex(RepPair(d0)-1, RepPair(d0)+1,RepPair(d1)-1); \ if (d2 == FALSE) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -46,7 +46,7 @@ Functor f0 = FunctorOfTerm(d0); \ Functor f1; \ if (!IsApplTerm(d1)) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -59,13 +59,13 @@ GONext(); \ } \ else { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ break; \ case (CELL)FunctorLongInt: \ if (f1 != FunctorLongInt) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else if (LongIntOfTerm(d0) == LongIntOfTerm(d1)) { \ @@ -73,13 +73,13 @@ GONext(); \ } \ else { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ break; \ case (CELL)FunctorBigInt: \ if (f1 != FunctorBigInt) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else if (Yap_gmp_tcmp_big_big(d0,d1) == 0) { \ @@ -87,13 +87,13 @@ GONext(); \ } \ else { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ break; \ case (CELL)FunctorDouble: \ if (f1 != FunctorDouble) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else if (FloatOfTerm(d0) == FloatOfTerm(d1)) { \ @@ -102,20 +102,20 @@ } \ break; \ default: \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ } \ else { \ if (f0 != f1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ always_save_pc(); \ d2 = iequ_complex(RepAppl(d0), RepAppl(d0)+ArityOfFunctor(f0), RepAppl(d1)); \ if (d2 == FALSE) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -128,7 +128,7 @@ } \ } \ else { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ } @@ -143,14 +143,14 @@ else { \ if (IsPairTerm(d0)) { \ if (!IsPairTerm(d1)) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ always_save_pc(); \ d2 = iequ_complex(RepPair(d0)-1, RepPair(d0)+1,RepPair(d1)-1); \ if (d2 == FALSE) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -164,7 +164,7 @@ Functor f0 = FunctorOfTerm(d0); \ Functor f1; \ if (!IsApplTerm(d1)) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -177,13 +177,13 @@ GONext(); \ } \ else { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ break; \ case (CELL)FunctorLongInt: \ if (f1 != FunctorLongInt) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else if (LongIntOfTerm(d0) == LongIntOfTerm(d1)) { \ @@ -191,13 +191,13 @@ GONext(); \ } \ else { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ break; \ case (CELL)FunctorDouble: \ if (f1 != FunctorDouble) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else if (FloatOfTerm(d0) == FloatOfTerm(d1)) { \ @@ -206,20 +206,20 @@ } \ break; \ default: \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ } \ else { \ if (f0 != f1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ always_save_pc(); \ d2 = iequ_complex(RepAppl(d0), RepAppl(d0)+ArityOfFunctor(f0), RepAppl(d1)); \ if (d2 == FALSE) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ @@ -232,27 +232,27 @@ } \ } \ else { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ } #endif /* USE_GMP */ #define P_EQ_P_EQ_NVAR1_UNK2 \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); #define P_EQ_P_EQ_UNK1 \ d1 = ARG2; #define P_EQ_P_EQ_VAR1_NVAR2 \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); #define P_EQ_P_EQ_VAR1_UNK2_END \ BLOCK = (CELL)P_EQ_P_EQ_VAR1_UNK2_END; \ if (pt1 != pt0) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ GONext(); \ } \ else { \ diff --git a/JIT/HPP/print_op.hh b/JIT/HPP/print_op.hh new file mode 100644 index 000000000..edffdd55e --- /dev/null +++ b/JIT/HPP/print_op.hh @@ -0,0 +1,3181 @@ +void print_op(char*, op_numbers, char*); + +void +print_op(char* prepend_term, op_numbers op, char* append_term) { + switch(op){ + case _Ystop : + fprintf(stderr, "%s_Ystop%s", prepend_term, append_term); + break; + + case _Nstop : + fprintf(stderr, "%s_Nstop%s", prepend_term, append_term); + break; + + case _try_me : + fprintf(stderr, "%s_try_me%s", prepend_term, append_term); + break; + + case _retry_me : + fprintf(stderr, "%s_retry_me%s", prepend_term, append_term); + break; + + case _trust_me : + fprintf(stderr, "%s_trust_me%s", prepend_term, append_term); + break; + + case _enter_profiling : + fprintf(stderr, "%s_enter_profiling%s", prepend_term, append_term); + break; + + case _retry_profiled : + fprintf(stderr, "%s_retry_profiled%s", prepend_term, append_term); + break; + + case _profiled_retry_me : + fprintf(stderr, "%s_profiled_retry_me%s", prepend_term, append_term); + break; + + case _profiled_trust_me : + fprintf(stderr, "%s_profiled_trust_me%s", prepend_term, append_term); + break; + + case _profiled_retry_logical : + fprintf(stderr, "%s_profiled_retry_logical%s", prepend_term, append_term); + break; + + case _profiled_trust_logical : + fprintf(stderr, "%s_profiled_trust_logical%s", prepend_term, append_term); + break; + + case _count_call : + fprintf(stderr, "%s_count_call%s", prepend_term, append_term); + break; + + case _count_retry : + fprintf(stderr, "%s_count_retry%s", prepend_term, append_term); + break; + + case _count_retry_me : + fprintf(stderr, "%s_count_retry_me%s", prepend_term, append_term); + break; + + case _count_trust_me : + fprintf(stderr, "%s_count_trust_me%s", prepend_term, append_term); + break; + + case _count_retry_logical : + fprintf(stderr, "%s_count_retry_logical%s", prepend_term, append_term); + break; + + case _count_trust_logical : + fprintf(stderr, "%s_count_trust_logical%s", prepend_term, append_term); + break; + + case _lock_lu : + fprintf(stderr, "%s_lock_lu%s", prepend_term, append_term); + break; + + case _unlock_lu : + fprintf(stderr, "%s_unlock_lu%s", prepend_term, append_term); + break; + + case _alloc_for_logical_pred : + fprintf(stderr, "%s_alloc_for_logical_pred%s", prepend_term, append_term); + break; + + case _copy_idb_term : + fprintf(stderr, "%s_copy_idb_term%s", prepend_term, append_term); + break; + + case _unify_idb_term : + fprintf(stderr, "%s_unify_idb_term%s", prepend_term, append_term); + break; + + case _ensure_space : + fprintf(stderr, "%s_ensure_space%s", prepend_term, append_term); + break; + + case _spy_or_trymark : + fprintf(stderr, "%s_spy_or_trymark%s", prepend_term, append_term); + break; + + case _try_and_mark : + fprintf(stderr, "%s_try_and_mark%s", prepend_term, append_term); + break; + + case _count_retry_and_mark : + fprintf(stderr, "%s_count_retry_and_mark%s", prepend_term, append_term); + break; + + case _profiled_retry_and_mark : + fprintf(stderr, "%s_profiled_retry_and_mark%s", prepend_term, append_term); + break; + + case _retry_and_mark : + fprintf(stderr, "%s_retry_and_mark%s", prepend_term, append_term); + break; + + case _trust_fail : + fprintf(stderr, "%s_trust_fail%s", prepend_term, append_term); + break; + + case _op_fail : + fprintf(stderr, "%s_op_fail%s", prepend_term, append_term); + break; + + case _cut : + fprintf(stderr, "%s_cut%s", prepend_term, append_term); + break; + + case _cut_t : + fprintf(stderr, "%s_cut_t%s", prepend_term, append_term); + break; + + case _cut_e : + fprintf(stderr, "%s_cut_e%s", prepend_term, append_term); + break; + + case _save_b_x : + fprintf(stderr, "%s_save_b_x%s", prepend_term, append_term); + break; + + case _save_b_y : + fprintf(stderr, "%s_save_b_y%s", prepend_term, append_term); + break; + + case _commit_b_x : + fprintf(stderr, "%s_commit_b_x%s", prepend_term, append_term); + break; + + case _commit_b_y : + fprintf(stderr, "%s_commit_b_y%s", prepend_term, append_term); + break; + + case _execute : + fprintf(stderr, "%s_execute%s", prepend_term, append_term); + break; + + case _dexecute : + fprintf(stderr, "%s_dexecute%s", prepend_term, append_term); + break; + + case _fcall : + fprintf(stderr, "%s_fcall%s", prepend_term, append_term); + break; + + case _call : + fprintf(stderr, "%s_call%s", prepend_term, append_term); + break; + + case _procceed : + fprintf(stderr, "%s_procceed%s", prepend_term, append_term); + break; + + case _allocate : + fprintf(stderr, "%s_allocate%s", prepend_term, append_term); + break; + + case _deallocate : + fprintf(stderr, "%s_deallocate%s", prepend_term, append_term); + break; + +#ifdef BEAM + case _retry_eam : + fprintf(stderr, "%s_retry_eam%s", prepend_term, append_term); + break; + +#endif +#ifdef BEAM + case _run_eam : + fprintf(stderr, "%s_run_eam%s", prepend_term, append_term); + break; + +#endif + case _get_x_var : + fprintf(stderr, "%s_get_x_var%s", prepend_term, append_term); + break; + + case _get_y_var : + fprintf(stderr, "%s_get_y_var%s", prepend_term, append_term); + break; + + case _get_yy_var : + fprintf(stderr, "%s_get_yy_var%s", prepend_term, append_term); + break; + + case _get_x_val : + fprintf(stderr, "%s_get_x_val%s", prepend_term, append_term); + break; + + case _get_y_val : + fprintf(stderr, "%s_get_y_val%s", prepend_term, append_term); + break; + + case _get_atom : + fprintf(stderr, "%s_get_atom%s", prepend_term, append_term); + break; + + case _get_2atoms : + fprintf(stderr, "%s_get_2atoms%s", prepend_term, append_term); + break; + + case _get_3atoms : + fprintf(stderr, "%s_get_3atoms%s", prepend_term, append_term); + break; + + case _get_4atoms : + fprintf(stderr, "%s_get_4atoms%s", prepend_term, append_term); + break; + + case _get_5atoms : + fprintf(stderr, "%s_get_5atoms%s", prepend_term, append_term); + break; + + case _get_6atoms : + fprintf(stderr, "%s_get_6atoms%s", prepend_term, append_term); + break; + + case _get_list : + fprintf(stderr, "%s_get_list%s", prepend_term, append_term); + break; + + case _get_struct : + fprintf(stderr, "%s_get_struct%s", prepend_term, append_term); + break; + + case _get_float : + fprintf(stderr, "%s_get_float%s", prepend_term, append_term); + break; + + case _get_longint : + fprintf(stderr, "%s_get_longint%s", prepend_term, append_term); + break; + + case _get_bigint : + fprintf(stderr, "%s_get_bigint%s", prepend_term, append_term); + break; + + case _get_dbterm : + fprintf(stderr, "%s_get_dbterm%s", prepend_term, append_term); + break; + + case _glist_valx : + fprintf(stderr, "%s_glist_valx%s", prepend_term, append_term); + break; + + case _glist_valy : + fprintf(stderr, "%s_glist_valy%s", prepend_term, append_term); + break; + + case _gl_void_varx : + fprintf(stderr, "%s_gl_void_varx%s", prepend_term, append_term); + break; + + case _gl_void_vary : + fprintf(stderr, "%s_gl_void_vary%s", prepend_term, append_term); + break; + + case _gl_void_valx : + fprintf(stderr, "%s_gl_void_valx%s", prepend_term, append_term); + break; + + case _gl_void_valy : + fprintf(stderr, "%s_gl_void_valy%s", prepend_term, append_term); + break; + + case _unify_x_var : + fprintf(stderr, "%s_unify_x_var%s", prepend_term, append_term); + break; + + case _unify_x_var_write : + fprintf(stderr, "%s_unify_x_var_write%s", prepend_term, append_term); + break; + + case _unify_l_x_var : + fprintf(stderr, "%s_unify_l_x_var%s", prepend_term, append_term); + break; + + case _unify_l_x_var_write : + fprintf(stderr, "%s_unify_l_x_var_write%s", prepend_term, append_term); + break; + + case _unify_x_var2 : + fprintf(stderr, "%s_unify_x_var2%s", prepend_term, append_term); + break; + + case _unify_x_var2_write : + fprintf(stderr, "%s_unify_x_var2_write%s", prepend_term, append_term); + break; + + case _unify_l_x_var2 : + fprintf(stderr, "%s_unify_l_x_var2%s", prepend_term, append_term); + break; + + case _unify_l_x_var2_write : + fprintf(stderr, "%s_unify_l_x_var2_write%s", prepend_term, append_term); + break; + + case _unify_y_var : + fprintf(stderr, "%s_unify_y_var%s", prepend_term, append_term); + break; + + case _unify_y_var_write : + fprintf(stderr, "%s_unify_y_var_write%s", prepend_term, append_term); + break; + + case _unify_l_y_var : + fprintf(stderr, "%s_unify_l_y_var%s", prepend_term, append_term); + break; + + case _unify_l_y_var_write : + fprintf(stderr, "%s_unify_l_y_var_write%s", prepend_term, append_term); + break; + + case _unify_x_val : + fprintf(stderr, "%s_unify_x_val%s", prepend_term, append_term); + break; + + case _unify_x_val_write : + fprintf(stderr, "%s_unify_x_val_write%s", prepend_term, append_term); + break; + + case _unify_l_x_val : + fprintf(stderr, "%s_unify_l_x_val%s", prepend_term, append_term); + break; + + case _unify_l_x_val_write : + fprintf(stderr, "%s_uify_l_x_val_write%s", prepend_term, append_term); + break; + + case _unify_y_val : + fprintf(stderr, "%s_unify_y_val%s", prepend_term, append_term); + break; + + case _unify_y_val_write : + fprintf(stderr, "%s_unify_y_val_write%s", prepend_term, append_term); + break; + + case _unify_l_y_val : + fprintf(stderr, "%s_unify_l_y_val%s", prepend_term, append_term); + break; + + case _unify_l_y_val_write : + fprintf(stderr, "%s_unify_l_y_val_write%s", prepend_term, append_term); + break; + + case _unify_x_loc : + fprintf(stderr, "%s_unify_x_loc%s", prepend_term, append_term); + break; + + case _unify_x_loc_write : + fprintf(stderr, "%s_unify_x_loc_write%s", prepend_term, append_term); + break; + + case _unify_l_x_loc : + fprintf(stderr, "%s_unify_l_x_loc%s", prepend_term, append_term); + break; + + case _unify_l_x_loc_write : + fprintf(stderr, "%s_unify_l_x_loc_write%s", prepend_term, append_term); + break; + + case _unify_y_loc : + fprintf(stderr, "%s_unify_y_loc%s", prepend_term, append_term); + break; + + case _unify_y_loc_write : + fprintf(stderr, "%s_unify_y_loc_write%s", prepend_term, append_term); + break; + + case _unify_l_y_loc : + fprintf(stderr, "%s_unify_l_y_loc%s", prepend_term, append_term); + break; + + case _unify_l_y_loc_write : + fprintf(stderr, "%s_unify_l_y_loc_write%s", prepend_term, append_term); + break; + + case _unify_void : + fprintf(stderr, "%s_unify_void%s", prepend_term, append_term); + break; + + case _unify_void_write : + fprintf(stderr, "%s_unify_void_write%s", prepend_term, append_term); + break; + + case _unify_l_void : + fprintf(stderr, "%s_unify_l_void%s", prepend_term, append_term); + break; + + case _unify_l_void_write : + fprintf(stderr, "%s_unify_l_void_write%s", prepend_term, append_term); + break; + + case _unify_n_voids : + fprintf(stderr, "%s_unify_n_voids%s", prepend_term, append_term); + break; + + case _unify_n_voids_write : + fprintf(stderr, "%s_unify_n_voids_write%s", prepend_term, append_term); + break; + + case _unify_l_n_voids : + fprintf(stderr, "%s_unify_l_n_voids%s", prepend_term, append_term); + break; + + case _unify_l_n_voids_write : + fprintf(stderr, "%s_unify_l_n_voids_write%s", prepend_term, append_term); + break; + + case _unify_atom : + fprintf(stderr, "%s_unify_atom%s", prepend_term, append_term); + break; + + case _unify_atom_write : + fprintf(stderr, "%s_unify_atom_write%s", prepend_term, append_term); + break; + + case _unify_l_atom : + fprintf(stderr, "%s_unify_l_atom%s", prepend_term, append_term); + break; + + case _unify_l_atom_write : + fprintf(stderr, "%s_unify_l_atom_write%s", prepend_term, append_term); + break; + + case _unify_n_atoms : + fprintf(stderr, "%s_unify_n_atoms%s", prepend_term, append_term); + break; + + case _unify_n_atoms_write : + fprintf(stderr, "%s_unify_n_atoms_write%s", prepend_term, append_term); + break; + + case _unify_float : + fprintf(stderr, "%s_unify_float%s", prepend_term, append_term); + break; + + case _unify_float_write : + fprintf(stderr, "%s_unify_float_write%s", prepend_term, append_term); + break; + + case _unify_l_float : + fprintf(stderr, "%s_unify_l_float%s", prepend_term, append_term); + break; + + case _unify_l_float_write : + fprintf(stderr, "%s_unify_l_float_write%s", prepend_term, append_term); + break; + + case _unify_longint : + fprintf(stderr, "%s_unify_longint%s", prepend_term, append_term); + break; + + case _unify_longint_write : + fprintf(stderr, "%s_unify_longint_write%s", prepend_term, append_term); + break; + + case _unify_l_longint : + fprintf(stderr, "%s_unify_l_longint%s", prepend_term, append_term); + break; + + case _unify_l_longint_write : + fprintf(stderr, "%s_unify_l_longint_write%s", prepend_term, append_term); + break; + + case _unify_bigint : + fprintf(stderr, "%s_unify_bigint%s", prepend_term, append_term); + break; + + case _unify_l_bigint : + fprintf(stderr, "%s_unify_l_bigint%s", prepend_term, append_term); + break; + + case _unify_dbterm : + fprintf(stderr, "%s_unify_dbterm%s", prepend_term, append_term); + break; + + case _unify_l_dbterm : + fprintf(stderr, "%s_unify_l_dbterm%s", prepend_term, append_term); + break; + + case _unify_list : + fprintf(stderr, "%s_unify_list%s", prepend_term, append_term); + break; + + case _unify_list_write : + fprintf(stderr, "%s_unify_list_write%s", prepend_term, append_term); + break; + + case _unify_l_list : + fprintf(stderr, "%s_unify_l_list%s", prepend_term, append_term); + break; + + case _unify_l_list_write : + fprintf(stderr, "%s_unify_l_list_write%s", prepend_term, append_term); + break; + + case _unify_struct : + fprintf(stderr, "%s_unify_struct%s", prepend_term, append_term); + break; + + case _unify_struct_write : + fprintf(stderr, "%s_unify_struct_write%s", prepend_term, append_term); + break; + + case _unify_l_struc : + fprintf(stderr, "%s_unify_l_struc%s", prepend_term, append_term); + break; + + case _unify_l_struc_write : + fprintf(stderr, "%s_unify_l_struc_write%s", prepend_term, append_term); + break; + + case _put_x_var : + fprintf(stderr, "%s_put_x_var%s", prepend_term, append_term); + break; + + case _put_y_var : + fprintf(stderr, "%s_put_y_var%s", prepend_term, append_term); + break; + + case _put_x_val : + fprintf(stderr, "%s_put_x_val%s", prepend_term, append_term); + break; + + case _put_xx_val : + fprintf(stderr, "%s_put_xx_val%s", prepend_term, append_term); + break; + + case _put_y_val : + fprintf(stderr, "%s_put_y_val%s", prepend_term, append_term); + break; + + case _put_y_vals : + fprintf(stderr, "%s_put_y_vals%s", prepend_term, append_term); + break; + + case _put_unsafe : + fprintf(stderr, "%s_put_unsafe%s", prepend_term, append_term); + break; + + case _put_atom : + fprintf(stderr, "%s_put_atom%s", prepend_term, append_term); + break; + + case _put_dbterm : + fprintf(stderr, "%s_put_dbterm%s", prepend_term, append_term); + break; + + case _put_bigint : + fprintf(stderr, "%s_put_bigint%s", prepend_term, append_term); + break; + + case _put_float : + fprintf(stderr, "%s_put_float%s", prepend_term, append_term); + break; + + case _put_longint : + fprintf(stderr, "%s_put_longint%s", prepend_term, append_term); + break; + + case _put_list : + fprintf(stderr, "%s_put_list%s", prepend_term, append_term); + break; + + case _put_struct : + fprintf(stderr, "%s_put_struct%s", prepend_term, append_term); + break; + + case _write_x_var : + fprintf(stderr, "%s_write_x_var%s", prepend_term, append_term); + break; + + case _write_void : + fprintf(stderr, "%s_write_void%s", prepend_term, append_term); + break; + + case _write_n_voids : + fprintf(stderr, "%s_write_n_voids%s", prepend_term, append_term); + break; + + case _write_y_var : + fprintf(stderr, "%s_write_y_var%s", prepend_term, append_term); + break; + + case _write_x_val : + fprintf(stderr, "%s_write_x_val%s", prepend_term, append_term); + break; + + case _write_x_loc : + fprintf(stderr, "%s_write_x_loc%s", prepend_term, append_term); + break; + + case _write_y_val : + fprintf(stderr, "%s_write_y_val%s", prepend_term, append_term); + break; + + case _write_y_loc : + fprintf(stderr, "%s_write_y_loc%s", prepend_term, append_term); + break; + + case _write_atom : + fprintf(stderr, "%s_write_atom%s", prepend_term, append_term); + break; + + case _write_bigint : + fprintf(stderr, "%s_write_bigint%s", prepend_term, append_term); + break; + + case _write_dbterm : + fprintf(stderr, "%s_write_dbterm%s", prepend_term, append_term); + break; + + case _write_float : + fprintf(stderr, "%s_write_float%s", prepend_term, append_term); + break; + + case _write_longint : + fprintf(stderr, "%s_write_longint%s", prepend_term, append_term); + break; + + case _write_n_atoms : + fprintf(stderr, "%s_write_n_atoms%s", prepend_term, append_term); + break; + + case _write_list : + fprintf(stderr, "%s_write_list%s", prepend_term, append_term); + break; + + case _write_l_list : + fprintf(stderr, "%s_write_l_list%s", prepend_term, append_term); + break; + + case _write_struct : + fprintf(stderr, "%s_write_struct%s", prepend_term, append_term); + break; + + case _write_l_struc : + fprintf(stderr, "%s_write_l_struc%s", prepend_term, append_term); + break; + + case _save_pair_x : + fprintf(stderr, "%s_save_pair_x%s", prepend_term, append_term); + break; + + case _save_pair_x_write : + fprintf(stderr, "%s_save_pair_x_write%s", prepend_term, append_term); + break; + + case _save_pair_y : + fprintf(stderr, "%s_save_pair_y%s", prepend_term, append_term); + break; + + case _save_pair_y_write : + fprintf(stderr, "%s_save_pair_y_write%s", prepend_term, append_term); + break; + + case _save_appl_x : + fprintf(stderr, "%s_save_appl_x%s", prepend_term, append_term); + break; + + case _save_appl_x_write : + fprintf(stderr, "%s_save_appl_x_write%s", prepend_term, append_term); + break; + + case _save_appl_y : + fprintf(stderr, "%s_save_appl_y%s", prepend_term, append_term); + break; + + case _save_appl_y_write : + fprintf(stderr, "%s_save_appl_y_write%s", prepend_term, append_term); + break; + + case _jump : + fprintf(stderr, "%s_jump%s", prepend_term, append_term); + break; + + case _move_back : + fprintf(stderr, "%s_move_back%s", prepend_term, append_term); + break; + + case _skip : + fprintf(stderr, "%s_skip%s", prepend_term, append_term); + break; + + case _either : + fprintf(stderr, "%s_either%s", prepend_term, append_term); + break; + + case _or_else : + fprintf(stderr, "%s_or_else%s", prepend_term, append_term); + break; + + case _pop_n : + fprintf(stderr, "%s_pop_n%s", prepend_term, append_term); + break; + + case _pop : + fprintf(stderr, "%s_pop%s", prepend_term, append_term); + break; + + case _call_cpred : + fprintf(stderr, "%s_call_cpred%s", prepend_term, append_term); + break; + + case _execute_cpred : + fprintf(stderr, "%s_execute_cpred%s", prepend_term, append_term); + break; + + case _call_usercpred : + fprintf(stderr, "%s_call_usercpred%s", prepend_term, append_term); + break; + + case _call_c_wfail : + fprintf(stderr, "%s_call_x_wfail%s", prepend_term, append_term); + break; + + case _try_c : + fprintf(stderr, "%s_try_c%s", prepend_term, append_term); + break; + + case _retry_c : + fprintf(stderr, "%s_retry_c%s", prepend_term, append_term); + break; + +#ifdef CUT_C + case _cut_c : + fprintf(stderr, "%s_cut_c%s", prepend_term, append_term); + break; + +#endif + case _try_userc : + fprintf(stderr, "%s_try_userc%s", prepend_term, append_term); + break; + + case _retry_userc : + fprintf(stderr, "%s_retry_userc%s", prepend_term, append_term); + break; + +#ifdef CUT_C + case _cut_userc : + fprintf(stderr, "%s_cut_userc%s", prepend_term, append_term); + break; + +#endif + case _lock_pred : + fprintf(stderr, "%s_lock_pred%s", prepend_term, append_term); + break; + + case _index_pred : + fprintf(stderr, "%s_index_pred%s", prepend_term, append_term); + break; + +#ifdef THREADS + case _thread_local : + fprintf(stderr, "%s_thread_local%s", prepend_term, append_term); + break; + +#endif + case _expand_index : + fprintf(stderr, "%s_expand_index%s", prepend_term, append_term); + break; + + case _expand_clauses : + fprintf(stderr, "%s_expand_clauses%s", prepend_term, append_term); + break; + + case _undef_p : + fprintf(stderr, "%s_undef_p%s", prepend_term, append_term); + break; + + case _spy_pred : + fprintf(stderr, "%s_spy_pred%s", prepend_term, append_term); + break; + + case _try_clause : + fprintf(stderr, "%s_try_clause%s", prepend_term, append_term); + break; + + case _try_clause2 : + fprintf(stderr, "%s_try_clause2%s", prepend_term, append_term); + break; + + case _try_clause3 : + fprintf(stderr, "%s_try_clause3%s", prepend_term, append_term); + break; + + case _try_clause4 : + fprintf(stderr, "%s_try_clause4%s", prepend_term, append_term); + break; + + case _retry : + fprintf(stderr, "%s_retry%s", prepend_term, append_term); + break; + + case _retry2 : + fprintf(stderr, "%s_retry2%s", prepend_term, append_term); + break; + + case _retry3 : + fprintf(stderr, "%s_retry3%s", prepend_term, append_term); + break; + + case _retry4 : + fprintf(stderr, "%s_retry4%s", prepend_term, append_term); + break; + + case _trust : + fprintf(stderr, "%s_trust%s", prepend_term, append_term); + break; + + case _try_in : + fprintf(stderr, "%s_try_in%s", prepend_term, append_term); + break; + + case _enter_lu_pred : + fprintf(stderr, "%s_enter_lu_pred%s", prepend_term, append_term); + break; + + case _try_logical : + fprintf(stderr, "%s_try_logical%s", prepend_term, append_term); + break; + + case _retry_logical : + fprintf(stderr, "%s_retry_logical%s", prepend_term, append_term); + break; + + case _trust_logical : + fprintf(stderr, "%s_trust_logical%s", prepend_term, append_term); + break; + + case _user_switch : + fprintf(stderr, "%s_user_switch%s", prepend_term, append_term); + break; + + case _switch_on_type : + fprintf(stderr, "%s_switch_on_type%s", prepend_term, append_term); + break; + + case _switch_list_nl : + fprintf(stderr, "%s_switch_list_nl%s", prepend_term, append_term); + break; + + case _switch_on_arg_type : + fprintf(stderr, "%s_switch_on_arg_type%s", prepend_term, append_term); + break; + + case _switch_on_sub_arg_type : + fprintf(stderr, "%s_switch_on_sub_arg_type%s", prepend_term, append_term); + break; + + case _jump_if_var : + fprintf(stderr, "%s_jump_if_var%s", prepend_term, append_term); + break; + + case _jump_if_nonvar : + fprintf(stderr, "%s_jump_if_nonvar%s", prepend_term, append_term); + break; + + case _if_not_then : + fprintf(stderr, "%s_if_not_then%s", prepend_term, append_term); + break; + + case _switch_on_func : + fprintf(stderr, "%s_switch_on_func%s", prepend_term, append_term); + break; + + case _switch_on_cons : + fprintf(stderr, "%s_switch_on_cons%s", prepend_term, append_term); + break; + + case _go_on_func : + fprintf(stderr, "%s_go_on_func%s", prepend_term, append_term); + break; + + case _go_on_cons : + fprintf(stderr, "%s_go_on_cons%s", prepend_term, append_term); + break; + + case _if_func : + fprintf(stderr, "%s_if_func%s", prepend_term, append_term); + break; + + case _if_cons : + fprintf(stderr, "%s_if_cons%s", prepend_term, append_term); + break; + + case _index_dbref : + fprintf(stderr, "%s_index_dbref%s", prepend_term, append_term); + break; + + case _index_blob : + fprintf(stderr, "%s_index_blob%s", prepend_term, append_term); + break; + + case _index_long : + fprintf(stderr, "%s_index_long%s", prepend_term, append_term); + break; + +#if YAP_JIT + case _jit_handler : + fprintf(stderr, "%s_jit_handler%s", prepend_term, append_term); + break; +#endif + + case _p_atom_x : + fprintf(stderr, "%s_p_atom_x%s", prepend_term, append_term); + break; + + case _p_atom_y : + fprintf(stderr, "%s_p_atom_y%s", prepend_term, append_term); + break; + + case _p_atomic_x : + fprintf(stderr, "%s_p_atomic_x%s", prepend_term, append_term); + break; + + case _p_atomic_y : + fprintf(stderr, "%s_p_atomic_y%s", prepend_term, append_term); + break; + + case _p_integer_x : + fprintf(stderr, "%s_p_integer_x%s", prepend_term, append_term); + break; + + case _p_integer_y : + fprintf(stderr, "%s_p_integer_y%s", prepend_term, append_term); + break; + + case _p_nonvar_x : + fprintf(stderr, "%s_p_nonvar_x%s", prepend_term, append_term); + break; + + case _p_nonvar_y : + fprintf(stderr, "%s_p_nonvar_y%s", prepend_term, append_term); + break; + + case _p_number_x : + fprintf(stderr, "%s_p_number_x%s", prepend_term, append_term); + break; + + case _p_number_y : + fprintf(stderr, "%s_p_number_y%s", prepend_term, append_term); + break; + + case _p_var_x : + fprintf(stderr, "%s_p_var_x%s", prepend_term, append_term); + break; + + case _p_var_y : + fprintf(stderr, "%s_p_var_y%s", prepend_term, append_term); + break; + + case _p_db_ref_x : + fprintf(stderr, "%s_p_db_ref_x%s", prepend_term, append_term); + break; + + case _p_db_ref_y : + fprintf(stderr, "%s_p_db_ref_y%s", prepend_term, append_term); + break; + + case _p_primitive_x : + fprintf(stderr, "%s_p_primitive_x%s", prepend_term, append_term); + break; + + case _p_primitive_y : + fprintf(stderr, "%s_p_primitive_y%s", prepend_term, append_term); + break; + + case _p_compound_x : + fprintf(stderr, "%s_p_compound_x%s", prepend_term, append_term); + break; + + case _p_compound_y : + fprintf(stderr, "%s_p_compound_y%s", prepend_term, append_term); + break; + + case _p_float_x : + fprintf(stderr, "%s_p_float_x%s", prepend_term, append_term); + break; + + case _p_float_y : + fprintf(stderr, "%s_p_float_y%s", prepend_term, append_term); + break; + + case _p_plus_vv : + fprintf(stderr, "%s_p_plus_vv%s", prepend_term, append_term); + break; + + case _p_plus_vc : + fprintf(stderr, "%s_p_plus_vc%s", prepend_term, append_term); + break; + + case _p_plus_y_vv : + fprintf(stderr, "%s_p_plus_y_vv%s", prepend_term, append_term); + break; + + case _p_plus_y_vc : + fprintf(stderr, "%s_p_plus_y_vc%s", prepend_term, append_term); + break; + + case _p_minus_vv : + fprintf(stderr, "%s_p_minus_vv%s", prepend_term, append_term); + break; + + case _p_minus_cv : + fprintf(stderr, "%s_p_minus_cv%s", prepend_term, append_term); + break; + + case _p_minus_y_vv : + fprintf(stderr, "%s_p_minus_y_vv%s", prepend_term, append_term); + break; + + case _p_minus_y_cv : + fprintf(stderr, "%s_p_minus_y_cv%s", prepend_term, append_term); + break; + + case _p_times_vv : + fprintf(stderr, "%s_p_times_vv%s", prepend_term, append_term); + break; + + case _p_times_vc : + fprintf(stderr, "%s_p_times_vc%s", prepend_term, append_term); + break; + + case _p_times_y_vv : + fprintf(stderr, "%s_p_times_y_vv%s", prepend_term, append_term); + break; + + case _p_times_y_vc : + fprintf(stderr, "%s_p_times_y_vc%s", prepend_term, append_term); + break; + + case _p_div_vv : + fprintf(stderr, "%s_p_div_vv%s", prepend_term, append_term); + break; + + case _p_div_vc : + fprintf(stderr, "%s_p_div_vc%s", prepend_term, append_term); + break; + + case _p_div_cv : + fprintf(stderr, "%s_p_div_cv%s", prepend_term, append_term); + break; + + case _p_div_y_vv : + fprintf(stderr, "%s_p_div_y_vv%s", prepend_term, append_term); + break; + + case _p_div_y_vc : + fprintf(stderr, "%s_p_div_y_vc%s", prepend_term, append_term); + break; + + case _p_div_y_cv : + fprintf(stderr, "%s_p_div_y_cv%s", prepend_term, append_term); + break; + + case _p_and_vv : + fprintf(stderr, "%s_p_and_vv%s", prepend_term, append_term); + break; + + case _p_and_vc : + fprintf(stderr, "%s_p_and_vc%s", prepend_term, append_term); + break; + + case _p_and_y_vv : + fprintf(stderr, "%s_p_and_y_vv%s", prepend_term, append_term); + break; + + case _p_and_y_vc : + fprintf(stderr, "%s_p_and_y_vc%s", prepend_term, append_term); + break; + + case _p_or_vv : + fprintf(stderr, "%s_p_or_vv%s", prepend_term, append_term); + break; + + case _p_or_vc : + fprintf(stderr, "%s_p_or_vc%s", prepend_term, append_term); + break; + + case _p_or_y_vv : + fprintf(stderr, "%s_p_or_y_vv%s", prepend_term, append_term); + break; + + case _p_or_y_vc : + fprintf(stderr, "%s_p_or_y_vc%s", prepend_term, append_term); + break; + + case _p_sll_vv : + fprintf(stderr, "%s_p_sll_vv%s", prepend_term, append_term); + break; + + case _p_sll_vc : + fprintf(stderr, "%s_p_sll_vc%s", prepend_term, append_term); + break; + + case _p_sll_cv : + fprintf(stderr, "%s_p_sll_cv%s", prepend_term, append_term); + break; + + case _p_sll_y_vv : + fprintf(stderr, "%s_p_sll_y_vv%s", prepend_term, append_term); + break; + + case _p_sll_y_vc : + fprintf(stderr, "%s_p_sll_y_vc%s", prepend_term, append_term); + break; + + case _p_sll_y_cv : + fprintf(stderr, "%s_p_sll_y_cv%s", prepend_term, append_term); + break; + + case _p_slr_vv : + fprintf(stderr, "%s_p_slr_vv%s", prepend_term, append_term); + break; + + case _p_slr_vc : + fprintf(stderr, "%s_p_slr_vc%s", prepend_term, append_term); + break; + + case _p_slr_cv : + fprintf(stderr, "%s_p_slr_cv%s", prepend_term, append_term); + break; + + case _p_slr_y_vv : + fprintf(stderr, "%s_p_slr_y_vv%s", prepend_term, append_term); + break; + + case _p_slr_y_vc : + fprintf(stderr, "%s_p_slr_y_vc%s", prepend_term, append_term); + break; + + case _p_slr_y_cv : + fprintf(stderr, "%s_p_slr_y_cv%s", prepend_term, append_term); + break; + + case _call_bfunc_xx : + fprintf(stderr, "%s_call_bfunc_xx%s", prepend_term, append_term); + break; + + case _call_bfunc_yx : + fprintf(stderr, "%s_call_bfunc_yx%s", prepend_term, append_term); + break; + + case _call_bfunc_xy : + fprintf(stderr, "%s_call_bfunc_xy%s", prepend_term, append_term); + break; + + case _call_bfunc_yy : + fprintf(stderr, "%s_call_bfunc_yy%s", prepend_term, append_term); + break; + + case _p_equal : + fprintf(stderr, "%s_p_equal%s", prepend_term, append_term); + break; + + case _p_dif : + fprintf(stderr, "%s_p_dif%s", prepend_term, append_term); + break; + + case _p_eq : + fprintf(stderr, "%s_p_eq%s", prepend_term, append_term); + break; + + case _p_arg_vv : + fprintf(stderr, "%s_p_arg_vv%s", prepend_term, append_term); + break; + + case _p_arg_cv : + fprintf(stderr, "%s_p_arg_cv%s", prepend_term, append_term); + break; + + case _p_arg_y_vv : + fprintf(stderr, "%s_p_arg_y_vv%s", prepend_term, append_term); + break; + + case _p_arg_y_cv : + fprintf(stderr, "%s_p_arg_y_cv%s", prepend_term, append_term); + break; + + case _p_func2s_vv : + fprintf(stderr, "%s_p_func2s_vv%s", prepend_term, append_term); + break; + + case _p_func2s_cv : + fprintf(stderr, "%s_p_func2s_cv%s", prepend_term, append_term); + break; + + case _p_func2s_vc : + fprintf(stderr, "%s_p_func2s_vc%s", prepend_term, append_term); + break; + + case _p_func2s_y_vv : + fprintf(stderr, "%s_p_func2s_y_vv%s", prepend_term, append_term); + break; + + case _p_func2s_y_cv : + fprintf(stderr, "%s_p_func2s_y_cv%s", prepend_term, append_term); + break; + + case _p_func2s_y_vc : + fprintf(stderr, "%s_p_func2s_y_vc%s", prepend_term, append_term); + break; + + case _p_func2f_xx : + fprintf(stderr, "%s_p_func2f_xx%s", prepend_term, append_term); + break; + + case _p_func2f_xy : + fprintf(stderr, "%s_p_func2f_xy%s", prepend_term, append_term); + break; + + case _p_func2f_yx : + fprintf(stderr, "%s_p_func2f_yx%s", prepend_term, append_term); + break; + + case _p_func2f_yy : + fprintf(stderr, "%s_p_func2f_yy%s", prepend_term, append_term); + break; + + case _p_functor : + fprintf(stderr, "%s_p_functor%s", prepend_term, append_term); + break; + + case _p_execute2 : + fprintf(stderr, "%s_p_execute2%s", prepend_term, append_term); + break; + + case _p_execute : + fprintf(stderr, "%s_p_execute%s", prepend_term, append_term); + break; + + case _p_execute_tail : + fprintf(stderr, "%s_p_execute_tail%s", prepend_term, append_term); + break; + +#ifdef YAPOR + case _getwork_first_time : + fprintf(stderr, "%s_getwork_first_time%s", prepend_term, append_term); + break; + + case _getwork : + fprintf(stderr, "%s_getwork%s", prepend_term, append_term); + break; + + case _getwork_seq : + fprintf(stderr, "%s_getwork_seq%s", prepend_term, append_term); + break; + + case _sync : + fprintf(stderr, "%s_sync%s", prepend_term, append_term); + break; + +#endif +#ifdef TABLING +#ifdef TABLING_INNER_CUTS + case _clause_with_cut : + fprintf(stderr, "%s_clause_with_cut%s", prepend_term, append_term); + break; + +#endif + case _table_load_answer : + fprintf(stderr, "%s_table_load_answer%s", prepend_term, append_term); + break; + + case _table_try_answer : + fprintf(stderr, "%s_table_try_answer%s", prepend_term, append_term); + break; + + case _table_try_single : + fprintf(stderr, "%s_table_try_single%s", prepend_term, append_term); + break; + + case _table_try_me : + fprintf(stderr, "%s_table_try_me%s", prepend_term, append_term); + break; + + case _table_try : + fprintf(stderr, "%s_table_try%s", prepend_term, append_term); + break; + + case _table_retry_me : + fprintf(stderr, "%s_table_retry_me%s", prepend_term, append_term); + break; + + case _table_retry : + fprintf(stderr, "%s_table_retry%s", prepend_term, append_term); + break; + + case _table_trust_me : + fprintf(stderr, "%s_table_trust_me%s", prepend_term, append_term); + break; + + case _table_trust : + fprintf(stderr, "%s_table_trust%s", prepend_term, append_term); + break; + + case _table_new_answer : + fprintf(stderr, "%s_table_new_answer%s", prepend_term, append_term); + break; + + case _table_answer_resolution : + fprintf(stderr, "%s_table_answer_resolution%s", prepend_term, append_term); + break; + + case _table_completion : + fprintf(stderr, "%s_table_completion%s", prepend_term, append_term); + break; + +#ifdef THREADS_CONSUMER_SHARING + case _table_answer_resolution_completion: + fprintf(stderr, "%s_table_answer_resolution_completion%s", prepend_term, append_term); + break; + +#endif + case _trie_do_var : + fprintf(stderr, "%s_trie_do_var%s", prepend_term, append_term); + break; + + case _trie_trust_var : + fprintf(stderr, "%s_trie_trust_var%s", prepend_term, append_term); + break; + + case _trie_try_var : + fprintf(stderr, "%s_trie_try_var%s", prepend_term, append_term); + break; + + case _trie_retry_var : + fprintf(stderr, "%s_trie_retry_var%s", prepend_term, append_term); + break; + + case _trie_do_var_in_pair : + fprintf(stderr, "%s_trie_do_var_in_pair%s", prepend_term, append_term); + break; + + case _trie_trust_var_in_pair : + fprintf(stderr, "%s_trie_trust_var_in_pair%s", prepend_term, append_term); + break; + + case _trie_try_var_in_pair : + fprintf(stderr, "%s_trie_try_var_in_pair%s", prepend_term, append_term); + break; + + case _trie_retry_var_in_pair : + fprintf(stderr, "%s_trie_retry_var_in_pair%s", prepend_term, append_term); + break; + + case _trie_do_val : + fprintf(stderr, "%s_trie_do_val%s", prepend_term, append_term); + break; + + case _trie_trust_val : + fprintf(stderr, "%s_trie_trust_val%s", prepend_term, append_term); + break; + + case _trie_try_val : + fprintf(stderr, "%s_trie_try_val%s", prepend_term, append_term); + break; + + case _trie_retry_val : + fprintf(stderr, "%s_trie_retry_val%s", prepend_term, append_term); + break; + + case _trie_do_val_in_pair : + fprintf(stderr, "%s_trie_do_val_in_pair%s", prepend_term, append_term); + break; + + case _trie_trust_val_in_pair : + fprintf(stderr, "%s_trie_trust_val_in_pair%s", prepend_term, append_term); + break; + + case _trie_try_val_in_pair : + fprintf(stderr, "%s_trie_try_val_in_pair%s", prepend_term, append_term); + break; + + case _trie_retry_val_in_pair : + fprintf(stderr, "%s_trie_retry_val_in_pair%s", prepend_term, append_term); + break; + + case _trie_do_atom : + fprintf(stderr, "%s_trie_do_atom%s", prepend_term, append_term); + break; + + case _trie_trust_atom : + fprintf(stderr, "%s_trie_trust_atom%s", prepend_term, append_term); + break; + + case _trie_try_atom : + fprintf(stderr, "%s_trie_try_atom%s", prepend_term, append_term); + break; + + case _trie_retry_atom : + fprintf(stderr, "%s_trie_retry_atom%s", prepend_term, append_term); + break; + + case _trie_do_atom_in_pair : + fprintf(stderr, "%s_trie_do_atom_in_pair%s", prepend_term, append_term); + break; + + case _trie_trust_atom_in_pair : + fprintf(stderr, "%s_trie_trust_atom_in_pair%s", prepend_term, append_term); + break; + + case _trie_try_atom_in_pair : + fprintf(stderr, "%s_trie_try_atom_in_pair%s", prepend_term, append_term); + break; + + case _trie_retry_atom_in_pair : + fprintf(stderr, "%s_trie_retry_atom_in_pair%s", prepend_term, append_term); + break; + + case _trie_do_null : + fprintf(stderr, "%s_trie_do_null%s", prepend_term, append_term); + break; + + case _trie_trust_null : + fprintf(stderr, "%s_trie_trust_null%s", prepend_term, append_term); + break; + + case _trie_try_null : + fprintf(stderr, "%s_trie_try_null%s", prepend_term, append_term); + break; + + case _trie_retry_null : + fprintf(stderr, "%s_trie_retry_null%s", prepend_term, append_term); + break; + + case _trie_do_null_in_pair : + fprintf(stderr, "%s_trie_do_null_in_pair%s", prepend_term, append_term); + break; + + case _trie_trust_null_in_pair : + fprintf(stderr, "%s_trie_trust_null_in_pair%s", prepend_term, append_term); + break; + + case _trie_try_null_in_pair : + fprintf(stderr, "%s_tri_try_null_in_paire%s", prepend_term, append_term); + break; + + case _trie_retry_null_in_pair : + fprintf(stderr, "%s_trie_retry_null_in_pair%s", prepend_term, append_term); + break; + + case _trie_do_pair : + fprintf(stderr, "%s_trie_do_pair%s", prepend_term, append_term); + break; + + case _trie_trust_pair : + fprintf(stderr, "%s_trie_trust_pair%s", prepend_term, append_term); + break; + + case _trie_try_pair : + fprintf(stderr, "%s_trie_try_pair%s", prepend_term, append_term); + break; + + case _trie_retry_pair : + fprintf(stderr, "%s_trie_retry_pair%s", prepend_term, append_term); + break; + + case _trie_do_appl : + fprintf(stderr, "%s_trie_do_appl%s", prepend_term, append_term); + break; + + case _trie_trust_appl : + fprintf(stderr, "%s_trie_trust_appl%s", prepend_term, append_term); + break; + + case _trie_try_appl : + fprintf(stderr, "%s_trie_try_appl%s", prepend_term, append_term); + break; + + case _trie_retry_appl : + fprintf(stderr, "%s_trie_retry_appl%s", prepend_term, append_term); + break; + + case _trie_do_appl_in_pair : + fprintf(stderr, "%s_trie_do_appl_in_pair%s", prepend_term, append_term); + break; + + case _trie_trust_appl_in_pair : + fprintf(stderr, "%s_trie_trust_appl_in_pair%s", prepend_term, append_term); + break; + + case _trie_try_appl_in_pair : + fprintf(stderr, "%s_trie_trty_appkl_in_pair%s", prepend_term, append_term); + break; + + case _trie_retry_appl_in_pair : + fprintf(stderr, "%s_trie_retry_appl_in_pair%s", prepend_term, append_term); + break; + + case _trie_do_extension : + fprintf(stderr, "%s_trie_do_extension%s", prepend_term, append_term); + break; + + case _trie_trust_extension : + fprintf(stderr, "%s_trie_trust_extension%s", prepend_term, append_term); + break; + + case _trie_try_extension : + fprintf(stderr, "%s_trie_try_extension%s", prepend_term, append_term); + break; + + case _trie_retry_extension : + fprintf(stderr, "%s_trie_retry_extension%s", prepend_term, append_term); + break; + + case _trie_do_double : + fprintf(stderr, "%s_trie_do_double%s", prepend_term, append_term); + break; + + case _trie_trust_double : + fprintf(stderr, "%s_trie_trust_double%s", prepend_term, append_term); + break; + + case _trie_try_double : + fprintf(stderr, "%s_trie_try_double%s", prepend_term, append_term); + break; + + case _trie_retry_double : + fprintf(stderr, "%s_trie_retry_double%s", prepend_term, append_term); + break; + + case _trie_do_longint : + fprintf(stderr, "%s_trie_do_longint%s", prepend_term, append_term); + break; + + case _trie_trust_longint : + fprintf(stderr, "%s_trie_trust_longint%s", prepend_term, append_term); + break; + + case _trie_try_longint : + fprintf(stderr, "%s_trie_try_longint%s", prepend_term, append_term); + break; + + case _trie_retry_longint : + fprintf(stderr, "%s_trie_retry_longint%s", prepend_term, append_term); + break; + + case _trie_do_gterm : + fprintf(stderr, "%s_trie_do_gterm%s", prepend_term, append_term); + break; + + case _trie_trust_gterm : + fprintf(stderr, "%s_trie_trust_gterm%s", prepend_term, append_term); + break; + + case _trie_try_gterm : + fprintf(stderr, "%s_trie_try_gterm%s", prepend_term, append_term); + break; + + case _trie_retry_gterm : + fprintf(stderr, "%s_trie_retry_gterm%s", prepend_term, append_term); + break; + +#endif + /* this instruction is hardwired */ +#ifdef YAPOR + case _or_last : + fprintf(stderr, "%s_or_last%s", prepend_term, append_term); + break; + +#else + case _or_last : + fprintf(stderr, "%s_or_last%s", prepend_term, append_term); + break; + +#endif +#if YAP_JIT + case _traced_Ystop : + fprintf(stderr, "%s_traced_Ystop%s", prepend_term, append_term); + break; + + case _traced_Nstop : + fprintf(stderr, "%s_traced_Nstop%s", prepend_term, append_term); + break; + + case _traced_try_me : + fprintf(stderr, "%s_traced_try_me%s", prepend_term, append_term); + break; + + case _traced_retry_me : + fprintf(stderr, "%s_traced_retry_me%s", prepend_term, append_term); + break; + + case _traced_trust_me : + fprintf(stderr, "%s_traced_trust_me%s", prepend_term, append_term); + break; + + case _traced_enter_profiling : + fprintf(stderr, "%s_traced_enter_profiling%s", prepend_term, append_term); + break; + + case _traced_retry_profiled : + fprintf(stderr, "%s_traced_retry_profiled%s", prepend_term, append_term); + break; + + case _traced_profiled_retry_me : + fprintf(stderr, "%s_traced_profiled_retry_me%s", prepend_term, append_term); + break; + + case _traced_profiled_trust_me : + fprintf(stderr, "%s_traced_profiled_trust_me%s", prepend_term, append_term); + break; + + case _traced_profiled_retry_logical : + fprintf(stderr, "%s_traced_profiled_retry_logical%s", prepend_term, append_term); + break; + + case _traced_profiled_trust_logical : + fprintf(stderr, "%s_traced_profiled_trust_logical%s", prepend_term, append_term); + break; + + case _traced_count_call : + fprintf(stderr, "%s_traced_count_call%s", prepend_term, append_term); + break; + + case _traced_count_retry : + fprintf(stderr, "%s_traced_count_retry%s", prepend_term, append_term); + break; + + case _traced_count_retry_me : + fprintf(stderr, "%s_traced_count_retry_me%s", prepend_term, append_term); + break; + + case _traced_count_trust_me : + fprintf(stderr, "%s_traced_count_trust_me%s", prepend_term, append_term); + break; + + case _traced_count_retry_logical : + fprintf(stderr, "%s_traced_count_retry_logical%s", prepend_term, append_term); + break; + + case _traced_count_trust_logical : + fprintf(stderr, "%s_traced_count_trust_logical%s", prepend_term, append_term); + break; + + case _traced_lock_lu : + fprintf(stderr, "%s_traced_lock_lu%s", prepend_term, append_term); + break; + + case _traced_unlock_lu : + fprintf(stderr, "%s_traced_unlock_lu%s", prepend_term, append_term); + break; + + case _traced_alloc_for_logical_pred : + fprintf(stderr, "%s_traced_alloc_for_logical_pred%s", prepend_term, append_term); + break; + + case _traced_copy_idb_term : + fprintf(stderr, "%s_traced_copy_idb_term%s", prepend_term, append_term); + break; + + case _traced_unify_idb_term : + fprintf(stderr, "%s_traced_unify_idb_term%s", prepend_term, append_term); + break; + + case _traced_ensure_space : + fprintf(stderr, "%s_traced_ensure_space%s", prepend_term, append_term); + break; + + case _traced_spy_or_trymark : + fprintf(stderr, "%s_traced_spy_or_trymark%s", prepend_term, append_term); + break; + + case _traced_try_and_mark : + fprintf(stderr, "%s_traced_try_and_mark%s", prepend_term, append_term); + break; + + case _traced_count_retry_and_mark : + fprintf(stderr, "%s_traced_count_retry_and_mark%s", prepend_term, append_term); + break; + + case _traced_profiled_retry_and_mark : + fprintf(stderr, "%s_traced_profiled_retry_and_mark%s", prepend_term, append_term); + break; + + case _traced_retry_and_mark : + fprintf(stderr, "%s_traced_retry_and_mark%s", prepend_term, append_term); + break; + + case _traced_trust_fail : + fprintf(stderr, "%s_traced_trust_fail%s", prepend_term, append_term); + break; + + case _traced_op_fail : + fprintf(stderr, "%s_traced_op_fail%s", prepend_term, append_term); + break; + + case _traced_cut : + fprintf(stderr, "%s_traced_cut%s", prepend_term, append_term); + break; + + case _traced_cut_t : + fprintf(stderr, "%s_traced_cut_t%s", prepend_term, append_term); + break; + + case _traced_cut_e : + fprintf(stderr, "%s_traced_cut_e%s", prepend_term, append_term); + break; + + case _traced_save_b_x : + fprintf(stderr, "%s_traced_save_b_x%s", prepend_term, append_term); + break; + + case _traced_save_b_y : + fprintf(stderr, "%s_traced_save_b_y%s", prepend_term, append_term); + break; + + case _traced_commit_b_x : + fprintf(stderr, "%s_traced_commit_b_x%s", prepend_term, append_term); + break; + + case _traced_commit_b_y : + fprintf(stderr, "%s_traced_commit_b_y%s", prepend_term, append_term); + break; + + case _traced_execute : + fprintf(stderr, "%s_traced_execute%s", prepend_term, append_term); + break; + + case _traced_dexecute : + fprintf(stderr, "%s_traced_dexecute%s", prepend_term, append_term); + break; + + case _traced_fcall : + fprintf(stderr, "%s_traced_fcall%s", prepend_term, append_term); + break; + + case _traced_call : + fprintf(stderr, "%s_traced_call%s", prepend_term, append_term); + break; + + case _traced_procceed : + fprintf(stderr, "%s_traced_procceed%s", prepend_term, append_term); + break; + + case _traced_allocate : + fprintf(stderr, "%s_traced_allocate%s", prepend_term, append_term); + break; + + case _traced_deallocate : + fprintf(stderr, "%s_traced_deallocate%s", prepend_term, append_term); + break; + +#ifdef BEAM + case _traced_retry_eam : + fprintf(stderr, "%s_traced_retry_eam%s", prepend_term, append_term); + break; + +#endif +#ifdef BEAM + case _traced_run_eam : + fprintf(stderr, "%s_traced_run_eam%s", prepend_term, append_term); + break; + +#endif + case _traced_get_x_var : + fprintf(stderr, "%s_traced_get_x_var%s", prepend_term, append_term); + break; + + case _traced_get_y_var : + fprintf(stderr, "%s_traced_get_y_var%s", prepend_term, append_term); + break; + + case _traced_get_yy_var : + fprintf(stderr, "%s_traced_get_yy_var%s", prepend_term, append_term); + break; + + case _traced_get_x_val : + fprintf(stderr, "%s_traced_get_x_val%s", prepend_term, append_term); + break; + + case _traced_get_y_val : + fprintf(stderr, "%s_traced_get_y_val%s", prepend_term, append_term); + break; + + case _traced_get_atom : + fprintf(stderr, "%s_traced_get_atom%s", prepend_term, append_term); + break; + + case _traced_get_2atoms : + fprintf(stderr, "%s_traced_get_2atoms%s", prepend_term, append_term); + break; + + case _traced_get_3atoms : + fprintf(stderr, "%s_traced_get_3atoms%s", prepend_term, append_term); + break; + + case _traced_get_4atoms : + fprintf(stderr, "%s_traced_get_4atoms%s", prepend_term, append_term); + break; + + case _traced_get_5atoms : + fprintf(stderr, "%s_traced_get_5atoms%s", prepend_term, append_term); + break; + + case _traced_get_6atoms : + fprintf(stderr, "%s_traced_get_6atoms%s", prepend_term, append_term); + break; + + case _traced_get_list : + fprintf(stderr, "%s_traced_get_list%s", prepend_term, append_term); + break; + + case _traced_get_struct : + fprintf(stderr, "%s_traced_get_struct%s", prepend_term, append_term); + break; + + case _traced_get_float : + fprintf(stderr, "%s_traced_get_float%s", prepend_term, append_term); + break; + + case _traced_get_longint : + fprintf(stderr, "%s_traced_get_longint%s", prepend_term, append_term); + break; + + case _traced_get_bigint : + fprintf(stderr, "%s_traced_get_bigint%s", prepend_term, append_term); + break; + + case _traced_get_dbterm : + fprintf(stderr, "%s_traced_get_dbterm%s", prepend_term, append_term); + break; + + case _traced_glist_valx : + fprintf(stderr, "%s_traced_glist_valx%s", prepend_term, append_term); + break; + + case _traced_glist_valy : + fprintf(stderr, "%s_traced_glist_valy%s", prepend_term, append_term); + break; + + case _traced_gl_void_varx : + fprintf(stderr, "%s_traced_gl_void_varx%s", prepend_term, append_term); + break; + + case _traced_gl_void_vary : + fprintf(stderr, "%s_traced_gl_void_vary%s", prepend_term, append_term); + break; + + case _traced_gl_void_valx : + fprintf(stderr, "%s_traced_gl_void_valx%s", prepend_term, append_term); + break; + + case _traced_gl_void_valy : + fprintf(stderr, "%s_traced_gl_void_valy%s", prepend_term, append_term); + break; + + case _traced_unify_x_var : + fprintf(stderr, "%s_traced_unify_x_var%s", prepend_term, append_term); + break; + + case _traced_unify_x_var_write : + fprintf(stderr, "%s_traced_unify_x_var_write%s", prepend_term, append_term); + break; + + case _traced_unify_l_x_var : + fprintf(stderr, "%s_traced_unify_l_x_var%s", prepend_term, append_term); + break; + + case _traced_unify_l_x_var_write : + fprintf(stderr, "%s_traced_unify_l_x_var_write%s", prepend_term, append_term); + break; + + case _traced_unify_x_var2 : + fprintf(stderr, "%s_traced_unify_x_var2%s", prepend_term, append_term); + break; + + case _traced_unify_x_var2_write : + fprintf(stderr, "%s_traced_unify_x_var2_write%s", prepend_term, append_term); + break; + + case _traced_unify_l_x_var2 : + fprintf(stderr, "%s_traced_unify_l_x_var2%s", prepend_term, append_term); + break; + + case _traced_unify_l_x_var2_write : + fprintf(stderr, "%s_traced_unify_l_x_var2_write%s", prepend_term, append_term); + break; + + case _traced_unify_y_var : + fprintf(stderr, "%s_traced_unify_y_var%s", prepend_term, append_term); + break; + + case _traced_unify_y_var_write : + fprintf(stderr, "%s_traced_unify_y_var_write%s", prepend_term, append_term); + break; + + case _traced_unify_l_y_var : + fprintf(stderr, "%s_traced_unify_l_y_var%s", prepend_term, append_term); + break; + + case _traced_unify_l_y_var_write : + fprintf(stderr, "%s_traced_unify_l_y_var_write%s", prepend_term, append_term); + break; + + case _traced_unify_x_val : + fprintf(stderr, "%s_traced_unify_x_val%s", prepend_term, append_term); + break; + + case _traced_unify_x_val_write : + fprintf(stderr, "%s_traced_unify_x_val_write%s", prepend_term, append_term); + break; + + case _traced_unify_l_x_val : + fprintf(stderr, "%s_traced_unify_l_x_val%s", prepend_term, append_term); + break; + + case _traced_unify_l_x_val_write : + fprintf(stderr, "%s_traced_uify_l_x_val_write%s", prepend_term, append_term); + break; + + case _traced_unify_y_val : + fprintf(stderr, "%s_traced_unify_y_val%s", prepend_term, append_term); + break; + + case _traced_unify_y_val_write : + fprintf(stderr, "%s_traced_unify_y_val_write%s", prepend_term, append_term); + break; + + case _traced_unify_l_y_val : + fprintf(stderr, "%s_traced_unify_l_y_val%s", prepend_term, append_term); + break; + + case _traced_unify_l_y_val_write : + fprintf(stderr, "%s_traced_unify_l_y_val_write%s", prepend_term, append_term); + break; + + case _traced_unify_x_loc : + fprintf(stderr, "%s_traced_unify_x_loc%s", prepend_term, append_term); + break; + + case _traced_unify_x_loc_write : + fprintf(stderr, "%s_traced_unify_x_loc_write%s", prepend_term, append_term); + break; + + case _traced_unify_l_x_loc : + fprintf(stderr, "%s_traced_unify_l_x_loc%s", prepend_term, append_term); + break; + + case _traced_unify_l_x_loc_write : + fprintf(stderr, "%s_traced_unify_l_x_loc_write%s", prepend_term, append_term); + break; + + case _traced_unify_y_loc : + fprintf(stderr, "%s_traced_unify_y_loc%s", prepend_term, append_term); + break; + + case _traced_unify_y_loc_write : + fprintf(stderr, "%s_traced_unify_y_loc_write%s", prepend_term, append_term); + break; + + case _traced_unify_l_y_loc : + fprintf(stderr, "%s_traced_unify_l_y_loc%s", prepend_term, append_term); + break; + + case _traced_unify_l_y_loc_write : + fprintf(stderr, "%s_traced_unify_l_y_loc_write%s", prepend_term, append_term); + break; + + case _traced_unify_void : + fprintf(stderr, "%s_traced_unify_void%s", prepend_term, append_term); + break; + + case _traced_unify_void_write : + fprintf(stderr, "%s_traced_unify_void_write%s", prepend_term, append_term); + break; + + case _traced_unify_l_void : + fprintf(stderr, "%s_traced_unify_l_void%s", prepend_term, append_term); + break; + + case _traced_unify_l_void_write : + fprintf(stderr, "%s_traced_unify_l_void_write%s", prepend_term, append_term); + break; + + case _traced_unify_n_voids : + fprintf(stderr, "%s_traced_unify_n_voids%s", prepend_term, append_term); + break; + + case _traced_unify_n_voids_write : + fprintf(stderr, "%s_traced_unify_n_voids_write%s", prepend_term, append_term); + break; + + case _traced_unify_l_n_voids : + fprintf(stderr, "%s_traced_unify_l_n_voids%s", prepend_term, append_term); + break; + + case _traced_unify_l_n_voids_write : + fprintf(stderr, "%s_traced_unify_l_n_voids_write%s", prepend_term, append_term); + break; + + case _traced_unify_atom : + fprintf(stderr, "%s_traced_unify_atom%s", prepend_term, append_term); + break; + + case _traced_unify_atom_write : + fprintf(stderr, "%s_traced_unify_atom_write%s", prepend_term, append_term); + break; + + case _traced_unify_l_atom : + fprintf(stderr, "%s_traced_unify_l_atom%s", prepend_term, append_term); + break; + + case _traced_unify_l_atom_write : + fprintf(stderr, "%s_traced_unify_l_atom_write%s", prepend_term, append_term); + break; + + case _traced_unify_n_atoms : + fprintf(stderr, "%s_traced_unify_n_atoms%s", prepend_term, append_term); + break; + + case _traced_unify_n_atoms_write : + fprintf(stderr, "%s_traced_unify_n_atoms_write%s", prepend_term, append_term); + break; + + case _traced_unify_float : + fprintf(stderr, "%s_traced_unify_float%s", prepend_term, append_term); + break; + + case _traced_unify_float_write : + fprintf(stderr, "%s_traced_unify_float_write%s", prepend_term, append_term); + break; + + case _traced_unify_l_float : + fprintf(stderr, "%s_traced_unify_l_float%s", prepend_term, append_term); + break; + + case _traced_unify_l_float_write : + fprintf(stderr, "%s_traced_unify_l_float_write%s", prepend_term, append_term); + break; + + case _traced_unify_longint : + fprintf(stderr, "%s_traced_unify_longint%s", prepend_term, append_term); + break; + + case _traced_unify_longint_write : + fprintf(stderr, "%s_traced_unify_longint_write%s", prepend_term, append_term); + break; + + case _traced_unify_l_longint : + fprintf(stderr, "%s_traced_unify_l_longint%s", prepend_term, append_term); + break; + + case _traced_unify_l_longint_write : + fprintf(stderr, "%s_traced_unify_l_longint_write%s", prepend_term, append_term); + break; + + case _traced_unify_bigint : + fprintf(stderr, "%s_traced_unify_bigint%s", prepend_term, append_term); + break; + + case _traced_unify_l_bigint : + fprintf(stderr, "%s_traced_unify_l_bigint%s", prepend_term, append_term); + break; + + case _traced_unify_dbterm : + fprintf(stderr, "%s_traced_unify_dbterm%s", prepend_term, append_term); + break; + + case _traced_unify_l_dbterm : + fprintf(stderr, "%s_traced_unify_l_dbterm%s", prepend_term, append_term); + break; + + case _traced_unify_list : + fprintf(stderr, "%s_traced_unify_list%s", prepend_term, append_term); + break; + + case _traced_unify_list_write : + fprintf(stderr, "%s_traced_unify_list_write%s", prepend_term, append_term); + break; + + case _traced_unify_l_list : + fprintf(stderr, "%s_traced_unify_l_list%s", prepend_term, append_term); + break; + + case _traced_unify_l_list_write : + fprintf(stderr, "%s_traced_unify_l_list_write%s", prepend_term, append_term); + break; + + case _traced_unify_struct : + fprintf(stderr, "%s_traced_unify_struct%s", prepend_term, append_term); + break; + + case _traced_unify_struct_write : + fprintf(stderr, "%s_traced_unify_struct_write%s", prepend_term, append_term); + break; + + case _traced_unify_l_struc : + fprintf(stderr, "%s_traced_unify_l_struc%s", prepend_term, append_term); + break; + + case _traced_unify_l_struc_write : + fprintf(stderr, "%s_traced_unify_l_struc_write%s", prepend_term, append_term); + break; + + case _traced_put_x_var : + fprintf(stderr, "%s_traced_put_x_var%s", prepend_term, append_term); + break; + + case _traced_put_y_var : + fprintf(stderr, "%s_traced_put_y_var%s", prepend_term, append_term); + break; + + case _traced_put_x_val : + fprintf(stderr, "%s_traced_put_x_val%s", prepend_term, append_term); + break; + + case _traced_put_xx_val : + fprintf(stderr, "%s_traced_put_xx_val%s", prepend_term, append_term); + break; + + case _traced_put_y_val : + fprintf(stderr, "%s_traced_put_y_val%s", prepend_term, append_term); + break; + + case _traced_put_y_vals : + fprintf(stderr, "%s_traced_put_y_vals%s", prepend_term, append_term); + break; + + case _traced_put_unsafe : + fprintf(stderr, "%s_traced_put_unsafe%s", prepend_term, append_term); + break; + + case _traced_put_atom : + fprintf(stderr, "%s_traced_put_atom%s", prepend_term, append_term); + break; + + case _traced_put_dbterm : + fprintf(stderr, "%s_traced_put_dbterm%s", prepend_term, append_term); + break; + + case _traced_put_bigint : + fprintf(stderr, "%s_traced_put_bigint%s", prepend_term, append_term); + break; + + case _traced_put_float : + fprintf(stderr, "%s_traced_put_float%s", prepend_term, append_term); + break; + + case _traced_put_longint : + fprintf(stderr, "%s_traced_put_longint%s", prepend_term, append_term); + break; + + case _traced_put_list : + fprintf(stderr, "%s_traced_put_list%s", prepend_term, append_term); + break; + + case _traced_put_struct : + fprintf(stderr, "%s_traced_put_struct%s", prepend_term, append_term); + break; + + case _traced_write_x_var : + fprintf(stderr, "%s_traced_write_x_var%s", prepend_term, append_term); + break; + + case _traced_write_void : + fprintf(stderr, "%s_traced_write_void%s", prepend_term, append_term); + break; + + case _traced_write_n_voids : + fprintf(stderr, "%s_traced_write_n_voids%s", prepend_term, append_term); + break; + + case _traced_write_y_var : + fprintf(stderr, "%s_traced_write_y_var%s", prepend_term, append_term); + break; + + case _traced_write_x_val : + fprintf(stderr, "%s_traced_write_x_val%s", prepend_term, append_term); + break; + + case _traced_write_x_loc : + fprintf(stderr, "%s_traced_write_x_loc%s", prepend_term, append_term); + break; + + case _traced_write_y_val : + fprintf(stderr, "%s_traced_write_y_val%s", prepend_term, append_term); + break; + + case _traced_write_y_loc : + fprintf(stderr, "%s_traced_write_y_loc%s", prepend_term, append_term); + break; + + case _traced_write_atom : + fprintf(stderr, "%s_traced_write_atom%s", prepend_term, append_term); + break; + + case _traced_write_bigint : + fprintf(stderr, "%s_traced_write_bigint%s", prepend_term, append_term); + break; + + case _traced_write_dbterm : + fprintf(stderr, "%s_traced_write_dbterm%s", prepend_term, append_term); + break; + + case _traced_write_float : + fprintf(stderr, "%s_traced_write_float%s", prepend_term, append_term); + break; + + case _traced_write_longint : + fprintf(stderr, "%s_traced_write_longint%s", prepend_term, append_term); + break; + + case _traced_write_n_atoms : + fprintf(stderr, "%s_traced_write_n_atoms%s", prepend_term, append_term); + break; + + case _traced_write_list : + fprintf(stderr, "%s_traced_write_list%s", prepend_term, append_term); + break; + + case _traced_write_l_list : + fprintf(stderr, "%s_traced_write_l_list%s", prepend_term, append_term); + break; + + case _traced_write_struct : + fprintf(stderr, "%s_traced_write_struct%s", prepend_term, append_term); + break; + + case _traced_write_l_struc : + fprintf(stderr, "%s_traced_write_l_struc%s", prepend_term, append_term); + break; + + case _traced_save_pair_x : + fprintf(stderr, "%s_traced_save_pair_x%s", prepend_term, append_term); + break; + + case _traced_save_pair_x_write : + fprintf(stderr, "%s_traced_save_pair_x_write%s", prepend_term, append_term); + break; + + case _traced_save_pair_y : + fprintf(stderr, "%s_traced_save_pair_y%s", prepend_term, append_term); + break; + + case _traced_save_pair_y_write : + fprintf(stderr, "%s_traced_save_pair_y_write%s", prepend_term, append_term); + break; + + case _traced_save_appl_x : + fprintf(stderr, "%s_traced_save_appl_x%s", prepend_term, append_term); + break; + + case _traced_save_appl_x_write : + fprintf(stderr, "%s_traced_save_appl_x_write%s", prepend_term, append_term); + break; + + case _traced_save_appl_y : + fprintf(stderr, "%s_traced_save_appl_y%s", prepend_term, append_term); + break; + + case _traced_save_appl_y_write : + fprintf(stderr, "%s_traced_save_appl_y_write%s", prepend_term, append_term); + break; + + case _traced_jump : + fprintf(stderr, "%s_traced_jump%s", prepend_term, append_term); + break; + + case _traced_move_back : + fprintf(stderr, "%s_traced_move_back%s", prepend_term, append_term); + break; + + case _traced_skip : + fprintf(stderr, "%s_traced_skip%s", prepend_term, append_term); + break; + + case _traced_either : + fprintf(stderr, "%s_traced_either%s", prepend_term, append_term); + break; + + case _traced_or_else : + fprintf(stderr, "%s_traced_or_else%s", prepend_term, append_term); + break; + + case _traced_pop_n : + fprintf(stderr, "%s_traced_pop_n%s", prepend_term, append_term); + break; + + case _traced_pop : + fprintf(stderr, "%s_traced_pop%s", prepend_term, append_term); + break; + + case _traced_call_cpred : + fprintf(stderr, "%s_traced_call_cpred%s", prepend_term, append_term); + break; + + case _traced_execute_cpred : + fprintf(stderr, "%s_traced_execute_cpred%s", prepend_term, append_term); + break; + + case _traced_call_usercpred : + fprintf(stderr, "%s_traced_call_usercpred%s", prepend_term, append_term); + break; + + case _traced_call_c_wfail : + fprintf(stderr, "%s_traced_call_x_wfail%s", prepend_term, append_term); + break; + + case _traced_try_c : + fprintf(stderr, "%s_traced_try_c%s", prepend_term, append_term); + break; + + case _traced_retry_c : + fprintf(stderr, "%s_traced_retry_c%s", prepend_term, append_term); + break; + +#ifdef CUT_C + case _traced_cut_c : + fprintf(stderr, "%s_traced_cut_c%s", prepend_term, append_term); + break; + +#endif + case _traced_try_userc : + fprintf(stderr, "%s_traced_try_userc%s", prepend_term, append_term); + break; + + case _traced_retry_userc : + fprintf(stderr, "%s_traced_retry_userc%s", prepend_term, append_term); + break; + +#ifdef CUT_C + case _traced_cut_userc : + fprintf(stderr, "%s_traced_cut_userc%s", prepend_term, append_term); + break; + +#endif + case _traced_lock_pred : + fprintf(stderr, "%s_traced_lock_pred%s", prepend_term, append_term); + break; + + case _traced_index_pred : + fprintf(stderr, "%s_traced_index_pred%s", prepend_term, append_term); + break; + +#ifdef THREADS + case _traced_thread_local : + fprintf(stderr, "%s_traced_thread_local%s", prepend_term, append_term); + break; + +#endif + case _traced_expand_index : + fprintf(stderr, "%s_traced_expand_index%s", prepend_term, append_term); + break; + + case _traced_expand_clauses : + fprintf(stderr, "%s_traced_expand_clauses%s", prepend_term, append_term); + break; + + case _traced_undef_p : + fprintf(stderr, "%s_traced_undef_p%s", prepend_term, append_term); + break; + + case _traced_spy_pred : + fprintf(stderr, "%s_traced_spy_pred%s", prepend_term, append_term); + break; + + case _traced_try_clause : + fprintf(stderr, "%s_traced_try_clause%s", prepend_term, append_term); + break; + + case _traced_try_clause2 : + fprintf(stderr, "%s_traced_try_clause2%s", prepend_term, append_term); + break; + + case _traced_try_clause3 : + fprintf(stderr, "%s_traced_try_clause3%s", prepend_term, append_term); + break; + + case _traced_try_clause4 : + fprintf(stderr, "%s_traced_try_clause4%s", prepend_term, append_term); + break; + + case _traced_retry : + fprintf(stderr, "%s_traced_retry%s", prepend_term, append_term); + break; + + case _traced_retry2 : + fprintf(stderr, "%s_traced_retry2%s", prepend_term, append_term); + break; + + case _traced_retry3 : + fprintf(stderr, "%s_traced_retry3%s", prepend_term, append_term); + break; + + case _traced_retry4 : + fprintf(stderr, "%s_traced_retry4%s", prepend_term, append_term); + break; + + case _traced_trust : + fprintf(stderr, "%s_traced_trust%s", prepend_term, append_term); + break; + + case _traced_try_in : + fprintf(stderr, "%s_traced_try_in%s", prepend_term, append_term); + break; + + case _traced_enter_lu_pred : + fprintf(stderr, "%s_traced_enter_lu_pred%s", prepend_term, append_term); + break; + + case _traced_try_logical : + fprintf(stderr, "%s_traced_try_logical%s", prepend_term, append_term); + break; + + case _traced_retry_logical : + fprintf(stderr, "%s_traced_retry_logical%s", prepend_term, append_term); + break; + + case _traced_trust_logical : + fprintf(stderr, "%s_traced_trust_logical%s", prepend_term, append_term); + break; + + case _traced_user_switch : + fprintf(stderr, "%s_traced_user_switch%s", prepend_term, append_term); + break; + + case _traced_switch_on_type : + fprintf(stderr, "%s_traced_switch_on_type%s", prepend_term, append_term); + break; + + case _traced_switch_list_nl : + fprintf(stderr, "%s_traced_switch_list_nl%s", prepend_term, append_term); + break; + + case _traced_switch_on_arg_type : + fprintf(stderr, "%s_traced_switch_on_arg_type%s", prepend_term, append_term); + break; + + case _traced_switch_on_sub_arg_type : + fprintf(stderr, "%s_traced_switch_on_sub_arg_type%s", prepend_term, append_term); + break; + + case _traced_jump_if_var : + fprintf(stderr, "%s_traced_jump_if_var%s", prepend_term, append_term); + break; + + case _traced_jump_if_nonvar : + fprintf(stderr, "%s_traced_jump_if_nonvar%s", prepend_term, append_term); + break; + + case _traced_if_not_then : + fprintf(stderr, "%s_traced_if_not_then%s", prepend_term, append_term); + break; + + case _traced_switch_on_func : + fprintf(stderr, "%s_traced_switch_on_func%s", prepend_term, append_term); + break; + + case _traced_switch_on_cons : + fprintf(stderr, "%s_traced_switch_on_cons%s", prepend_term, append_term); + break; + + case _traced_go_on_func : + fprintf(stderr, "%s_traced_go_on_func%s", prepend_term, append_term); + break; + + case _traced_go_on_cons : + fprintf(stderr, "%s_traced_go_on_cons%s", prepend_term, append_term); + break; + + case _traced_if_func : + fprintf(stderr, "%s_traced_if_func%s", prepend_term, append_term); + break; + + case _traced_if_cons : + fprintf(stderr, "%s_traced_if_cons%s", prepend_term, append_term); + break; + + case _traced_index_dbref : + fprintf(stderr, "%s_traced_index_dbref%s", prepend_term, append_term); + break; + + case _traced_index_blob : + fprintf(stderr, "%s_traced_index_blob%s", prepend_term, append_term); + break; + + case _traced_index_long : + fprintf(stderr, "%s_traced_index_long%s", prepend_term, append_term); + break; + + case _traced_jit_handler : + fprintf(stderr, "%s_traced_jit_handler%s", prepend_term, append_term); + break; + + case _traced_p_atom_x : + fprintf(stderr, "%s_traced_p_atom_x%s", prepend_term, append_term); + break; + + case _traced_p_atom_y : + fprintf(stderr, "%s_traced_p_atom_y%s", prepend_term, append_term); + break; + + case _traced_p_atomic_x : + fprintf(stderr, "%s_traced_p_atomic_x%s", prepend_term, append_term); + break; + + case _traced_p_atomic_y : + fprintf(stderr, "%s_traced_p_atomic_y%s", prepend_term, append_term); + break; + + case _traced_p_integer_x : + fprintf(stderr, "%s_traced_p_integer_x%s", prepend_term, append_term); + break; + + case _traced_p_integer_y : + fprintf(stderr, "%s_traced_p_integer_y%s", prepend_term, append_term); + break; + + case _traced_p_nonvar_x : + fprintf(stderr, "%s_traced_p_nonvar_x%s", prepend_term, append_term); + break; + + case _traced_p_nonvar_y : + fprintf(stderr, "%s_traced_p_nonvar_y%s", prepend_term, append_term); + break; + + case _traced_p_number_x : + fprintf(stderr, "%s_traced_p_number_x%s", prepend_term, append_term); + break; + + case _traced_p_number_y : + fprintf(stderr, "%s_traced_p_number_y%s", prepend_term, append_term); + break; + + case _traced_p_var_x : + fprintf(stderr, "%s_traced_p_var_x%s", prepend_term, append_term); + break; + + case _traced_p_var_y : + fprintf(stderr, "%s_traced_p_var_y%s", prepend_term, append_term); + break; + + case _traced_p_db_ref_x : + fprintf(stderr, "%s_traced_p_db_ref_x%s", prepend_term, append_term); + break; + + case _traced_p_db_ref_y : + fprintf(stderr, "%s_traced_p_db_ref_y%s", prepend_term, append_term); + break; + + case _traced_p_primitive_x : + fprintf(stderr, "%s_traced_p_primitive_x%s", prepend_term, append_term); + break; + + case _traced_p_primitive_y : + fprintf(stderr, "%s_traced_p_primitive_y%s", prepend_term, append_term); + break; + + case _traced_p_compound_x : + fprintf(stderr, "%s_traced_p_compound_x%s", prepend_term, append_term); + break; + + case _traced_p_compound_y : + fprintf(stderr, "%s_traced_p_compound_y%s", prepend_term, append_term); + break; + + case _traced_p_float_x : + fprintf(stderr, "%s_traced_p_float_x%s", prepend_term, append_term); + break; + + case _traced_p_float_y : + fprintf(stderr, "%s_traced_p_float_y%s", prepend_term, append_term); + break; + + case _traced_p_plus_vv : + fprintf(stderr, "%s_traced_p_plus_vv%s", prepend_term, append_term); + break; + + case _traced_p_plus_vc : + fprintf(stderr, "%s_traced_p_plus_vc%s", prepend_term, append_term); + break; + + case _traced_p_plus_y_vv : + fprintf(stderr, "%s_traced_p_plus_y_vv%s", prepend_term, append_term); + break; + + case _traced_p_plus_y_vc : + fprintf(stderr, "%s_traced_p_plus_y_vc%s", prepend_term, append_term); + break; + + case _traced_p_minus_vv : + fprintf(stderr, "%s_traced_p_minus_vv%s", prepend_term, append_term); + break; + + case _traced_p_minus_cv : + fprintf(stderr, "%s_traced_p_minus_cv%s", prepend_term, append_term); + break; + + case _traced_p_minus_y_vv : + fprintf(stderr, "%s_traced_p_minus_y_vv%s", prepend_term, append_term); + break; + + case _traced_p_minus_y_cv : + fprintf(stderr, "%s_traced_p_minus_y_cv%s", prepend_term, append_term); + break; + + case _traced_p_times_vv : + fprintf(stderr, "%s_traced_p_times_vv%s", prepend_term, append_term); + break; + + case _traced_p_times_vc : + fprintf(stderr, "%s_traced_p_times_vc%s", prepend_term, append_term); + break; + + case _traced_p_times_y_vv : + fprintf(stderr, "%s_traced_p_times_y_vv%s", prepend_term, append_term); + break; + + case _traced_p_times_y_vc : + fprintf(stderr, "%s_traced_p_times_y_vc%s", prepend_term, append_term); + break; + + case _traced_p_div_vv : + fprintf(stderr, "%s_traced_p_div_vv%s", prepend_term, append_term); + break; + + case _traced_p_div_vc : + fprintf(stderr, "%s_traced_p_div_vc%s", prepend_term, append_term); + break; + + case _traced_p_div_cv : + fprintf(stderr, "%s_traced_p_div_cv%s", prepend_term, append_term); + break; + + case _traced_p_div_y_vv : + fprintf(stderr, "%s_traced_p_div_y_vv%s", prepend_term, append_term); + break; + + case _traced_p_div_y_vc : + fprintf(stderr, "%s_traced_p_div_y_vc%s", prepend_term, append_term); + break; + + case _traced_p_div_y_cv : + fprintf(stderr, "%s_traced_p_div_y_cv%s", prepend_term, append_term); + break; + + case _traced_p_and_vv : + fprintf(stderr, "%s_traced_p_and_vv%s", prepend_term, append_term); + break; + + case _traced_p_and_vc : + fprintf(stderr, "%s_traced_p_and_vc%s", prepend_term, append_term); + break; + + case _traced_p_and_y_vv : + fprintf(stderr, "%s_traced_p_and_y_vv%s", prepend_term, append_term); + break; + + case _traced_p_and_y_vc : + fprintf(stderr, "%s_traced_p_and_y_vc%s", prepend_term, append_term); + break; + + case _traced_p_or_vv : + fprintf(stderr, "%s_traced_p_or_vv%s", prepend_term, append_term); + break; + + case _traced_p_or_vc : + fprintf(stderr, "%s_traced_p_or_vc%s", prepend_term, append_term); + break; + + case _traced_p_or_y_vv : + fprintf(stderr, "%s_traced_p_or_y_vv%s", prepend_term, append_term); + break; + + case _traced_p_or_y_vc : + fprintf(stderr, "%s_traced_p_or_y_vc%s", prepend_term, append_term); + break; + + case _traced_p_sll_vv : + fprintf(stderr, "%s_traced_p_sll_vv%s", prepend_term, append_term); + break; + + case _traced_p_sll_vc : + fprintf(stderr, "%s_traced_p_sll_vc%s", prepend_term, append_term); + break; + + case _traced_p_sll_cv : + fprintf(stderr, "%s_traced_p_sll_cv%s", prepend_term, append_term); + break; + + case _traced_p_sll_y_vv : + fprintf(stderr, "%s_traced_p_sll_y_vv%s", prepend_term, append_term); + break; + + case _traced_p_sll_y_vc : + fprintf(stderr, "%s_traced_p_sll_y_vc%s", prepend_term, append_term); + break; + + case _traced_p_sll_y_cv : + fprintf(stderr, "%s_traced_p_sll_y_cv%s", prepend_term, append_term); + break; + + case _traced_p_slr_vv : + fprintf(stderr, "%s_traced_p_slr_vv%s", prepend_term, append_term); + break; + + case _traced_p_slr_vc : + fprintf(stderr, "%s_traced_p_slr_vc%s", prepend_term, append_term); + break; + + case _traced_p_slr_cv : + fprintf(stderr, "%s_traced_p_slr_cv%s", prepend_term, append_term); + break; + + case _traced_p_slr_y_vv : + fprintf(stderr, "%s_traced_p_slr_y_vv%s", prepend_term, append_term); + break; + + case _traced_p_slr_y_vc : + fprintf(stderr, "%s_traced_p_slr_y_vc%s", prepend_term, append_term); + break; + + case _traced_p_slr_y_cv : + fprintf(stderr, "%s_traced_p_slr_y_cv%s", prepend_term, append_term); + break; + + case _traced_call_bfunc_xx : + fprintf(stderr, "%s_traced_call_bfunc_xx%s", prepend_term, append_term); + break; + + case _traced_call_bfunc_yx : + fprintf(stderr, "%s_traced_call_bfunc_yx%s", prepend_term, append_term); + break; + + case _traced_call_bfunc_xy : + fprintf(stderr, "%s_traced_call_bfunc_xy%s", prepend_term, append_term); + break; + + case _traced_call_bfunc_yy : + fprintf(stderr, "%s_traced_call_bfunc_yy%s", prepend_term, append_term); + break; + + case _traced_p_equal : + fprintf(stderr, "%s_traced_p_equal%s", prepend_term, append_term); + break; + + case _traced_p_dif : + fprintf(stderr, "%s_traced_p_dif%s", prepend_term, append_term); + break; + + case _traced_p_eq : + fprintf(stderr, "%s_traced_p_eq%s", prepend_term, append_term); + break; + + case _traced_p_arg_vv : + fprintf(stderr, "%s_traced_p_arg_vv%s", prepend_term, append_term); + break; + + case _traced_p_arg_cv : + fprintf(stderr, "%s_traced_p_arg_cv%s", prepend_term, append_term); + break; + + case _traced_p_arg_y_vv : + fprintf(stderr, "%s_traced_p_arg_y_vv%s", prepend_term, append_term); + break; + + case _traced_p_arg_y_cv : + fprintf(stderr, "%s_traced_p_arg_y_cv%s", prepend_term, append_term); + break; + + case _traced_p_func2s_vv : + fprintf(stderr, "%s_traced_p_func2s_vv%s", prepend_term, append_term); + break; + + case _traced_p_func2s_cv : + fprintf(stderr, "%s_traced_p_func2s_cv%s", prepend_term, append_term); + break; + + case _traced_p_func2s_vc : + fprintf(stderr, "%s_traced_p_func2s_vc%s", prepend_term, append_term); + break; + + case _traced_p_func2s_y_vv : + fprintf(stderr, "%s_traced_p_func2s_y_vv%s", prepend_term, append_term); + break; + + case _traced_p_func2s_y_cv : + fprintf(stderr, "%s_traced_p_func2s_y_cv%s", prepend_term, append_term); + break; + + case _traced_p_func2s_y_vc : + fprintf(stderr, "%s_traced_p_func2s_y_vc%s", prepend_term, append_term); + break; + + case _traced_p_func2f_xx : + fprintf(stderr, "%s_traced_p_func2f_xx%s", prepend_term, append_term); + break; + + case _traced_p_func2f_xy : + fprintf(stderr, "%s_traced_p_func2f_xy%s", prepend_term, append_term); + break; + + case _traced_p_func2f_yx : + fprintf(stderr, "%s_traced_p_func2f_yx%s", prepend_term, append_term); + break; + + case _traced_p_func2f_yy : + fprintf(stderr, "%s_traced_p_func2f_yy%s", prepend_term, append_term); + break; + + case _traced_p_functor : + fprintf(stderr, "%s_traced_p_functor%s", prepend_term, append_term); + break; + + case _traced_p_execute2 : + fprintf(stderr, "%s_traced_p_execute2%s", prepend_term, append_term); + break; + + case _traced_p_execute : + fprintf(stderr, "%s_traced_p_execute%s", prepend_term, append_term); + break; + + case _traced_p_execute_tail : + fprintf(stderr, "%s_traced_p_execute_tail%s", prepend_term, append_term); + break; + +#ifdef YAPOR + case _traced_getwork_first_time : + fprintf(stderr, "%s_traced_getwork_first_time%s", prepend_term, append_term); + break; + + case _traced_getwork : + fprintf(stderr, "%s_traced_getwork%s", prepend_term, append_term); + break; + + case _traced_getwork_seq : + fprintf(stderr, "%s_traced_getwork_seq%s", prepend_term, append_term); + break; + + case _traced_sync : + fprintf(stderr, "%s_traced_sync%s", prepend_term, append_term); + break; + +#endif +#ifdef TABLING +#ifdef TABLING_INNER_CUTS + case _traced_clause_with_cut : + fprintf(stderr, "%s_traced_clause_with_cut%s", prepend_term, append_term); + break; + +#endif + case _traced_table_load_answer : + fprintf(stderr, "%s_traced_table_load_answer%s", prepend_term, append_term); + break; + + case _traced_table_try_answer : + fprintf(stderr, "%s_traced_table_try_answer%s", prepend_term, append_term); + break; + + case _traced_table_try_single : + fprintf(stderr, "%s_traced_table_try_single%s", prepend_term, append_term); + break; + + case _traced_table_try_me : + fprintf(stderr, "%s_traced_table_try_me%s", prepend_term, append_term); + break; + + case _traced_table_try : + fprintf(stderr, "%s_traced_table_try%s", prepend_term, append_term); + break; + + case _traced_table_retry_me : + fprintf(stderr, "%s_traced_table_retry_me%s", prepend_term, append_term); + break; + + case _traced_table_retry : + fprintf(stderr, "%s_traced_table_retry%s", prepend_term, append_term); + break; + + case _traced_table_trust_me : + fprintf(stderr, "%s_traced_table_trust_me%s", prepend_term, append_term); + break; + + case _traced_table_trust : + fprintf(stderr, "%s_traced_table_trust%s", prepend_term, append_term); + break; + + case _traced_table_new_answer : + fprintf(stderr, "%s_traced_table_new_answer%s", prepend_term, append_term); + break; + + case _traced_table_answer_resolution : + fprintf(stderr, "%s_traced_table_answer_resolution%s", prepend_term, append_term); + break; + + case _traced_table_completion : + fprintf(stderr, "%s_traced_table_completion%s", prepend_term, append_term); + break; + +#ifdef THREADS_CONSUMER_SHARING + case _traced_table_answer_resolution_completion: + fprintf(stderr, "%s_traced_table_answer_resolution_completion%s", prepend_term, append_term); + break; + +#endif + case _traced_trie_do_var : + fprintf(stderr, "%s_traced_trie_do_var%s", prepend_term, append_term); + break; + + case _traced_trie_trust_var : + fprintf(stderr, "%s_traced_trie_trust_var%s", prepend_term, append_term); + break; + + case _traced_trie_try_var : + fprintf(stderr, "%s_traced_trie_try_var%s", prepend_term, append_term); + break; + + case _traced_trie_retry_var : + fprintf(stderr, "%s_traced_trie_retry_var%s", prepend_term, append_term); + break; + + case _traced_trie_do_var_in_pair : + fprintf(stderr, "%s_traced_trie_do_var_in_pair%s", prepend_term, append_term); + break; + + case _traced_trie_trust_var_in_pair : + fprintf(stderr, "%s_traced_trie_trust_var_in_pair%s", prepend_term, append_term); + break; + + case _traced_trie_try_var_in_pair : + fprintf(stderr, "%s_traced_trie_try_var_in_pair%s", prepend_term, append_term); + break; + + case _traced_trie_retry_var_in_pair : + fprintf(stderr, "%s_traced_trie_retry_var_in_pair%s", prepend_term, append_term); + break; + + case _traced_trie_do_val : + fprintf(stderr, "%s_traced_trie_do_val%s", prepend_term, append_term); + break; + + case _traced_trie_trust_val : + fprintf(stderr, "%s_traced_trie_trust_val%s", prepend_term, append_term); + break; + + case _traced_trie_try_val : + fprintf(stderr, "%s_traced_trie_try_val%s", prepend_term, append_term); + break; + + case _traced_trie_retry_val : + fprintf(stderr, "%s_traced_trie_retry_val%s", prepend_term, append_term); + break; + + case _traced_trie_do_val_in_pair : + fprintf(stderr, "%s_traced_trie_do_val_in_pair%s", prepend_term, append_term); + break; + + case _traced_trie_trust_val_in_pair : + fprintf(stderr, "%s_traced_trie_trust_val_in_pair%s", prepend_term, append_term); + break; + + case _traced_trie_try_val_in_pair : + fprintf(stderr, "%s_traced_trie_try_val_in_pair%s", prepend_term, append_term); + break; + + case _traced_trie_retry_val_in_pair : + fprintf(stderr, "%s_traced_trie_retry_val_in_pair%s", prepend_term, append_term); + break; + + case _traced_trie_do_atom : + fprintf(stderr, "%s_traced_trie_do_atom%s", prepend_term, append_term); + break; + + case _traced_trie_trust_atom : + fprintf(stderr, "%s_traced_trie_trust_atom%s", prepend_term, append_term); + break; + + case _traced_trie_try_atom : + fprintf(stderr, "%s_traced_trie_try_atom%s", prepend_term, append_term); + break; + + case _traced_trie_retry_atom : + fprintf(stderr, "%s_traced_trie_retry_atom%s", prepend_term, append_term); + break; + + case _traced_trie_do_atom_in_pair : + fprintf(stderr, "%s_traced_trie_do_atom_in_pair%s", prepend_term, append_term); + break; + + case _traced_trie_trust_atom_in_pair : + fprintf(stderr, "%s_traced_trie_trust_atom_in_pair%s", prepend_term, append_term); + break; + + case _traced_trie_try_atom_in_pair : + fprintf(stderr, "%s_traced_trie_try_atom_in_pair%s", prepend_term, append_term); + break; + + case _traced_trie_retry_atom_in_pair : + fprintf(stderr, "%s_traced_trie_retry_atom_in_pair%s", prepend_term, append_term); + break; + + case _traced_trie_do_null : + fprintf(stderr, "%s_traced_trie_do_null%s", prepend_term, append_term); + break; + + case _traced_trie_trust_null : + fprintf(stderr, "%s_traced_trie_trust_null%s", prepend_term, append_term); + break; + + case _traced_trie_try_null : + fprintf(stderr, "%s_traced_trie_try_null%s", prepend_term, append_term); + break; + + case _traced_trie_retry_null : + fprintf(stderr, "%s_traced_trie_retry_null%s", prepend_term, append_term); + break; + + case _traced_trie_do_null_in_pair : + fprintf(stderr, "%s_traced_trie_do_null_in_pair%s", prepend_term, append_term); + break; + + case _traced_trie_trust_null_in_pair : + fprintf(stderr, "%s_traced_trie_trust_null_in_pair%s", prepend_term, append_term); + break; + + case _traced_trie_try_null_in_pair : + fprintf(stderr, "%s_traced_tri_try_null_in_paire%s", prepend_term, append_term); + break; + + case _traced_trie_retry_null_in_pair : + fprintf(stderr, "%s_traced_trie_retry_null_in_pair%s", prepend_term, append_term); + break; + + case _traced_trie_do_pair : + fprintf(stderr, "%s_traced_trie_do_pair%s", prepend_term, append_term); + break; + + case _traced_trie_trust_pair : + fprintf(stderr, "%s_traced_trie_trust_pair%s", prepend_term, append_term); + break; + + case _traced_trie_try_pair : + fprintf(stderr, "%s_traced_trie_try_pair%s", prepend_term, append_term); + break; + + case _traced_trie_retry_pair : + fprintf(stderr, "%s_traced_trie_retry_pair%s", prepend_term, append_term); + break; + + case _traced_trie_do_appl : + fprintf(stderr, "%s_traced_trie_do_appl%s", prepend_term, append_term); + break; + + case _traced_trie_trust_appl : + fprintf(stderr, "%s_traced_trie_trust_appl%s", prepend_term, append_term); + break; + + case _traced_trie_try_appl : + fprintf(stderr, "%s_traced_trie_try_appl%s", prepend_term, append_term); + break; + + case _traced_trie_retry_appl : + fprintf(stderr, "%s_traced_trie_retry_appl%s", prepend_term, append_term); + break; + + case _traced_trie_do_appl_in_pair : + fprintf(stderr, "%s_traced_trie_do_appl_in_pair%s", prepend_term, append_term); + break; + + case _traced_trie_trust_appl_in_pair : + fprintf(stderr, "%s_traced_trie_trust_appl_in_pair%s", prepend_term, append_term); + break; + + case _traced_trie_try_appl_in_pair : + fprintf(stderr, "%s_traced_trie_trty_appkl_in_pair%s", prepend_term, append_term); + break; + + case _traced_trie_retry_appl_in_pair : + fprintf(stderr, "%s_traced_trie_retry_appl_in_pair%s", prepend_term, append_term); + break; + + case _traced_trie_do_extension : + fprintf(stderr, "%s_traced_trie_do_extension%s", prepend_term, append_term); + break; + + case _traced_trie_trust_extension : + fprintf(stderr, "%s_traced_trie_trust_extension%s", prepend_term, append_term); + break; + + case _traced_trie_try_extension : + fprintf(stderr, "%s_traced_trie_try_extension%s", prepend_term, append_term); + break; + + case _traced_trie_retry_extension : + fprintf(stderr, "%s_traced_trie_retry_extension%s", prepend_term, append_term); + break; + + case _traced_trie_do_double : + fprintf(stderr, "%s_traced_trie_do_double%s", prepend_term, append_term); + break; + + case _traced_trie_trust_double : + fprintf(stderr, "%s_traced_trie_trust_double%s", prepend_term, append_term); + break; + + case _traced_trie_try_double : + fprintf(stderr, "%s_traced_trie_try_double%s", prepend_term, append_term); + break; + + case _traced_trie_retry_double : + fprintf(stderr, "%s_traced_trie_retry_double%s", prepend_term, append_term); + break; + + case _traced_trie_do_longint : + fprintf(stderr, "%s_traced_trie_do_longint%s", prepend_term, append_term); + break; + + case _traced_trie_trust_longint : + fprintf(stderr, "%s_traced_trie_trust_longint%s", prepend_term, append_term); + break; + + case _traced_trie_try_longint : + fprintf(stderr, "%s_traced_trie_try_longint%s", prepend_term, append_term); + break; + + case _traced_trie_retry_longint : + fprintf(stderr, "%s_traced_trie_retry_longint%s", prepend_term, append_term); + break; + + case _traced_trie_do_gterm : + fprintf(stderr, "%s_traced_trie_do_gterm%s", prepend_term, append_term); + break; + + case _traced_trie_trust_gterm : + fprintf(stderr, "%s_traced_trie_trust_gterm%s", prepend_term, append_term); + break; + + case _traced_trie_try_gterm : + fprintf(stderr, "%s_traced_trie_try_gterm%s", prepend_term, append_term); + break; + + case _traced_trie_retry_gterm : + fprintf(stderr, "%s_traced_trie_retry_gterm%s", prepend_term, append_term); + break; + +#endif + /* this instruction is hardwired */ +#ifdef YAPOR + case _traced_or_last : + fprintf(stderr, "%s_traced_or_last%s", prepend_term, append_term); + break; +#else + case _traced_or_last : + fprintf(stderr, "%s_traced_or_last%s", prepend_term, append_term); + break; +#endif + +#endif /* YAP_JIT */ + } + } + +void print_nop(op_numbers); + +void +print_nop(op_numbers op) { + print_op("", op, "\n"); +} diff --git a/JIT/HPP/print_preg.h b/JIT/HPP/print_preg.h index 7f2635958..ec191ea15 100644 --- a/JIT/HPP/print_preg.h +++ b/JIT/HPP/print_preg.h @@ -8,1585 +8,1585 @@ print_preg(yamop* _p) { switch(op){ case _Ystop : printf("_Ystop!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _Nstop : printf("_Nstop!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _try_me : printf("_try_me!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _retry_me : printf("_retry_me!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _trust_me : printf("_trust_me!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _enter_profiling : printf("_enter_profiling!!\n"); - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _retry_profiled : printf("_retry_profiled!!\n"); - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _profiled_retry_me : printf("_profiled_retry_me!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _profiled_trust_me : printf("_profiled_trust_me!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _profiled_retry_logical : printf("_profiled_retry_logical!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _profiled_trust_logical : printf("_profiled_trust_logical!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtILl.next))); + _p = ((yamop *)(&((_p)->u.OtILl.next))); break; case _count_call : printf("_count_call!!\n"); - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _count_retry : printf("_count_retry!!\n"); - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _count_retry_me : printf("_count_retry_me!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _count_trust_me : printf("_count_trust_me!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _count_retry_logical : printf("_count_retry_logical!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _count_trust_logical : printf("_count_trust_logical!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtILl.next))); + _p = ((yamop *)(&((_p)->u.OtILl.next))); break; case _lock_lu : printf("_lock_lu!!\n"); - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _unlock_lu : printf("_unlock_lu!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _alloc_for_logical_pred : printf("_alloc_for_logical_pred!!\n"); - _p = ((yamop *)(&((_p)->y_u.L.next))); + _p = ((yamop *)(&((_p)->u.L.next))); break; case _copy_idb_term : printf("_copy_idb_term!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _unify_idb_term : printf("_unify_idb_term!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _ensure_space : printf("_ensure_space!!\n"); - _p = ((yamop *)(&((_p)->y_u.Osbpa.next))); + _p = ((yamop *)(&((_p)->u.Osbpa.next))); break; case _spy_or_trymark : printf("_spy_or_trymark!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _try_and_mark : printf("_try_and_mark!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _count_retry_and_mark : printf("_count_retry_and_mark!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _profiled_retry_and_mark : printf("_profiled_retry_and_mark!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _retry_and_mark : printf("_retry_and_mark!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _trust_fail : printf("_trust_fail!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _op_fail : printf("_op_fail!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _cut : printf("_cut!!\n"); - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _cut_t : printf("_cut_t!!\n"); - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _cut_e : printf("_cut_e!!\n"); - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _save_b_x : printf("_save_b_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _save_b_y : printf("_save_b_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _commit_b_x : printf("_commit_b_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xps.next))); + _p = ((yamop *)(&((_p)->u.xps.next))); break; case _commit_b_y : printf("_commit_b_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yps.next))); + _p = ((yamop *)(&((_p)->u.yps.next))); break; case _execute : printf("_execute!!\n"); - _p = ((yamop *)(&((_p)->y_u.pp.next))); + _p = ((yamop *)(&((_p)->u.pp.next))); break; case _dexecute : printf("_dexecute!!\n"); - _p = ((yamop *)(&((_p)->y_u.pp.next))); + _p = ((yamop *)(&((_p)->u.pp.next))); break; case _fcall : printf("_fcall!!\n"); - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _call : printf("_call!!\n"); - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _procceed : printf("_procceed!!\n"); - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _allocate : printf("_allocate!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _deallocate : printf("_deallocate!!\n"); - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; #ifdef BEAM case _retry_eam : printf("_retry_eam!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif #ifdef BEAM case _run_eam : printf("_run_eam!!\n"); - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; #endif case _get_x_var : printf("_get_x_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _get_y_var : printf("_get_y_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _get_yy_var : printf("_get_yy_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.yyxx.next))); + _p = ((yamop *)(&((_p)->u.yyxx.next))); break; case _get_x_val : printf("_get_x_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _get_y_val : printf("_get_y_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _get_atom : printf("_get_atom!!\n"); - _p = ((yamop *)(&((_p)->y_u.xc.next))); + _p = ((yamop *)(&((_p)->u.xc.next))); break; case _get_2atoms : printf("_get_2atoms!!\n"); - _p = ((yamop *)(&((_p)->y_u.cc.next))); + _p = ((yamop *)(&((_p)->u.cc.next))); break; case _get_3atoms : printf("_get_3atoms!!\n"); - _p = ((yamop *)(&((_p)->y_u.ccc.next))); + _p = ((yamop *)(&((_p)->u.ccc.next))); break; case _get_4atoms : printf("_get_4atoms!!\n"); - _p = ((yamop *)(&((_p)->y_u.cccc.next))); + _p = ((yamop *)(&((_p)->u.cccc.next))); break; case _get_5atoms : printf("_get_5atoms!!\n"); - _p = ((yamop *)(&((_p)->y_u.ccccc.next))); + _p = ((yamop *)(&((_p)->u.ccccc.next))); break; case _get_6atoms : printf("_get_6atoms!!\n"); - _p = ((yamop *)(&((_p)->y_u.cccccc.next))); + _p = ((yamop *)(&((_p)->u.cccccc.next))); break; case _get_list : printf("_get_list!!\n"); - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _get_struct : printf("_get_struct!!\n"); - _p = ((yamop *)(&((_p)->y_u.xfa.next))); + _p = ((yamop *)(&((_p)->u.xfa.next))); break; case _get_float : printf("_get_float!!\n"); - _p = ((yamop *)(&((_p)->y_u.xd.next))); + _p = ((yamop *)(&((_p)->u.xd.next))); break; case _get_longint : printf("_get_longint!!\n"); - _p = ((yamop *)(&((_p)->y_u.xi.next))); + _p = ((yamop *)(&((_p)->u.xi.next))); break; case _get_bigint : printf("_get_bigint!!\n"); - _p = ((yamop *)(&((_p)->y_u.xN.next))); + _p = ((yamop *)(&((_p)->u.xN.next))); break; case _get_dbterm : printf("_get_dbterm!!\n"); - _p = ((yamop *)(&((_p)->y_u.xD.next))); + _p = ((yamop *)(&((_p)->u.xD.next))); break; case _glist_valx : printf("_glist_valx!!\n"); - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _glist_valy : printf("_glist_valy!!\n"); - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _gl_void_varx : printf("_gl_void_varx!!\n"); - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _gl_void_vary : printf("_gl_void_vary!!\n"); - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _gl_void_valx : printf("_gl_void_valx!!\n"); - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _gl_void_valy : printf("_gl_void_valy!!\n"); - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _unify_x_var : printf("_unify_x_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_x_var_write : printf("_unify_x_var_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_l_x_var : printf("_unify_l_x_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_l_x_var_write : printf("_unify_l_x_var_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_x_var2 : printf("_unify_x_var2!!\n"); - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _unify_x_var2_write : printf("_unify_x_var2_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _unify_l_x_var2 : printf("_unify_l_x_var2!!\n"); - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _unify_l_x_var2_write : printf("_unify_l_x_var2_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _unify_y_var : printf("_unify_y_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_y_var_write : printf("_unify_y_var_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_l_y_var : printf("_unify_l_y_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_l_y_var_write : printf("_unify_l_y_var_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_x_val : printf("_unify_x_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_x_val_write : printf("_unify_x_val_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_l_x_val : printf("_unify_l_x_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_l_x_val_write : printf("_uify_l_x_val_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_y_val : printf("_unify_y_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_y_val_write : printf("_unify_y_val_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_l_y_val : printf("_unify_l_y_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_l_y_val_write : printf("_unify_l_y_val_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_x_loc : printf("_unify_x_loc!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_x_loc_write : printf("_unify_x_loc_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_l_x_loc : printf("_unify_l_x_loc!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_l_x_loc_write : printf("_unify_l_x_loc_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _unify_y_loc : printf("_unify_y_loc!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_y_loc_write : printf("_unify_y_loc_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_l_y_loc : printf("_unify_l_y_loc!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_l_y_loc_write : printf("_unify_l_y_loc_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _unify_void : printf("_unify_void!!\n"); - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_void_write : printf("_unify_void_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_l_void : printf("_unify_l_void!!\n"); - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_l_void_write : printf("_unify_l_void_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_n_voids : printf("_unify_n_voids!!\n"); - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _unify_n_voids_write : printf("_unify_n_voids_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _unify_l_n_voids : printf("_unify_l_n_voids!!\n"); - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _unify_l_n_voids_write : printf("_unify_l_n_voids_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _unify_atom : printf("_unify_atom!!\n"); - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _unify_atom_write : printf("_unify_atom_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _unify_l_atom : printf("_unify_l_atom!!\n"); - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _unify_l_atom_write : printf("_unify_l_atom_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _unify_n_atoms : printf("_unify_n_atoms!!\n"); - _p = ((yamop *)(&((_p)->y_u.osc.next))); + _p = ((yamop *)(&((_p)->u.osc.next))); break; case _unify_n_atoms_write : printf("_unify_n_atoms_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.osc.next))); + _p = ((yamop *)(&((_p)->u.osc.next))); break; case _unify_float : printf("_unify_float!!\n"); - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _unify_float_write : printf("_unify_float_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _unify_l_float : printf("_unify_l_float!!\n"); - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _unify_l_float_write : printf("_unify_l_float_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _unify_longint : printf("_unify_longint!!\n"); - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _unify_longint_write : printf("_unify_longint_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _unify_l_longint : printf("_unify_l_longint!!\n"); - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _unify_l_longint_write : printf("_unify_l_longint_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _unify_bigint : printf("_unify_bigint!!\n"); - _p = ((yamop *)(&((_p)->y_u.oN.next))); + _p = ((yamop *)(&((_p)->u.oN.next))); break; case _unify_l_bigint : printf("_unify_l_bigint!!\n"); - _p = ((yamop *)(&((_p)->y_u.oN.next))); + _p = ((yamop *)(&((_p)->u.oN.next))); break; case _unify_dbterm : printf("_unify_dbterm!!\n"); - _p = ((yamop *)(&((_p)->y_u.oD.next))); + _p = ((yamop *)(&((_p)->u.oD.next))); break; case _unify_l_dbterm : printf("_unify_l_dbterm!!\n"); - _p = ((yamop *)(&((_p)->y_u.oD.next))); + _p = ((yamop *)(&((_p)->u.oD.next))); break; case _unify_list : printf("_unify_list!!\n"); - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_list_write : printf("_unify_list_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_l_list : printf("_unify_l_list!!\n"); - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_l_list_write : printf("_unify_l_list_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _unify_struct : printf("_unify_struct!!\n"); - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _unify_struct_write : printf("_unify_struct_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _unify_l_struc : printf("_unify_l_struc!!\n"); - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _unify_l_struc_write : printf("_unify_l_struc_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _put_x_var : printf("_put_x_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _put_y_var : printf("_put_y_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _put_x_val : printf("_put_x_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _put_xx_val : printf("_put_xx_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxxx.next))); + _p = ((yamop *)(&((_p)->u.xxxx.next))); break; case _put_y_val : printf("_put_y_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _put_y_vals : printf("_put_y_vals!!\n"); - _p = ((yamop *)(&((_p)->y_u.yyxx.next))); + _p = ((yamop *)(&((_p)->u.yyxx.next))); break; case _put_unsafe : printf("_put_unsafe!!\n"); - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _put_atom : printf("_put_atom!!\n"); - _p = ((yamop *)(&((_p)->y_u.xc.next))); + _p = ((yamop *)(&((_p)->u.xc.next))); break; case _put_dbterm : printf("_put_dbterm!!\n"); - _p = ((yamop *)(&((_p)->y_u.xD.next))); + _p = ((yamop *)(&((_p)->u.xD.next))); break; case _put_bigint : printf("_put_bigint!!\n"); - _p = ((yamop *)(&((_p)->y_u.xN.next))); + _p = ((yamop *)(&((_p)->u.xN.next))); break; case _put_float : printf("_put_float!!\n"); - _p = ((yamop *)(&((_p)->y_u.xd.next))); + _p = ((yamop *)(&((_p)->u.xd.next))); break; case _put_longint : printf("_put_longint!!\n"); - _p = ((yamop *)(&((_p)->y_u.xi.next))); + _p = ((yamop *)(&((_p)->u.xi.next))); break; case _put_list : printf("_put_list!!\n"); - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _put_struct : printf("_put_struct!!\n"); - _p = ((yamop *)(&((_p)->y_u.xfa.next))); + _p = ((yamop *)(&((_p)->u.xfa.next))); break; case _write_x_var : printf("_write_x_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _write_void : printf("_write_void!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _write_n_voids : printf("_write_n_voids!!\n"); - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _write_y_var : printf("_write_y_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _write_x_val : printf("_write_x_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _write_x_loc : printf("_write_x_loc!!\n"); - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _write_y_val : printf("_write_y_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _write_y_loc : printf("_write_y_loc!!\n"); - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _write_atom : printf("_write_atom!!\n"); - _p = ((yamop *)(&((_p)->y_u.c.next))); + _p = ((yamop *)(&((_p)->u.c.next))); break; case _write_bigint : printf("_write_bigint!!\n"); - _p = ((yamop *)(&((_p)->y_u.N.next))); + _p = ((yamop *)(&((_p)->u.N.next))); break; case _write_dbterm : printf("_write_dbterm!!\n"); - _p = ((yamop *)(&((_p)->y_u.D.next))); + _p = ((yamop *)(&((_p)->u.D.next))); break; case _write_float : printf("_write_float!!\n"); - _p = ((yamop *)(&((_p)->y_u.d.next))); + _p = ((yamop *)(&((_p)->u.d.next))); break; case _write_longint : printf("_write_longint!!\n"); - _p = ((yamop *)(&((_p)->y_u.i.next))); + _p = ((yamop *)(&((_p)->u.i.next))); break; case _write_n_atoms : printf("_write_n_atoms!!\n"); - _p = ((yamop *)(&((_p)->y_u.sc.next))); + _p = ((yamop *)(&((_p)->u.sc.next))); break; case _write_list : printf("_write_list!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _write_l_list : printf("_write_l_list!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _write_struct : printf("_write_struct!!\n"); - _p = ((yamop *)(&((_p)->y_u.fa.next))); + _p = ((yamop *)(&((_p)->u.fa.next))); break; case _write_l_struc : printf("_write_l_struc!!\n"); - _p = ((yamop *)(&((_p)->y_u.fa.next))); + _p = ((yamop *)(&((_p)->u.fa.next))); break; case _save_pair_x : printf("_save_pair_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _save_pair_x_write : printf("_save_pair_x_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _save_pair_y : printf("_save_pair_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _save_pair_y_write : printf("_save_pair_y_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _save_appl_x : printf("_save_appl_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _save_appl_x_write : printf("_save_appl_x_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _save_appl_y : printf("_save_appl_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _save_appl_y_write : printf("_save_appl_y_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _jump : printf("_jump!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _move_back : printf("_move_back!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _skip : printf("_skip!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _either : printf("_either!!\n"); - _p = ((yamop *)(&((_p)->y_u.Osblp.next))); + _p = ((yamop *)(&((_p)->u.Osblp.next))); break; case _or_else : printf("_or_else!!\n"); - _p = ((yamop *)(&((_p)->y_u.Osblp.next))); + _p = ((yamop *)(&((_p)->u.Osblp.next))); break; case _pop_n : printf("_pop_n!!\n"); - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _pop : printf("_pop!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _call_cpred : printf("_call_cpred!!\n"); - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _execute_cpred : printf("_execute_cpred!!\n"); - _p = ((yamop *)(&((_p)->y_u.pp.next))); + _p = ((yamop *)(&((_p)->u.pp.next))); break; case _call_usercpred : printf("_call_usercpred!!\n"); - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _call_c_wfail : printf("_call_x_wfail!!\n"); - _p = ((yamop *)(&((_p)->y_u.slp.next))); + _p = ((yamop *)(&((_p)->u.slp.next))); break; case _try_c : printf("_try_c!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; case _retry_c : printf("_retry_c!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; #ifdef CUT_C case _cut_c : printf("_cut_c!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; #endif case _try_userc : printf("_try_userc!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; case _retry_userc : printf("_retry_userc!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; #ifdef CUT_C case _cut_userc : printf("_cut_userc!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; #endif case _lock_pred : printf("_lock_pred!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _index_pred : printf("_index_pred!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #ifdef THREADS case _thread_local : printf("_thread_local!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif case _expand_index : printf("_expand_index!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _expand_clauses : printf("_expand_clauses!!\n"); - _p = ((yamop *)(&((_p)->y_u.sssllp.next))); + _p = ((yamop *)(&((_p)->u.sssllp.next))); break; case _undef_p : printf("_undef_p!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _spy_pred : printf("_spy_pred!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _try_clause : printf("_try_clause!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _try_clause2 : printf("_try_clause2!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _try_clause3 : printf("_try_clause3!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _try_clause4 : printf("_try_clause4!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _retry : printf("_retry!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _retry2 : printf("_retry2!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _retry3 : printf("_retry3!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _retry4 : printf("_retry4!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _trust : printf("_trust!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _try_in : printf("_try_in!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _enter_lu_pred : printf("_enter_lu_pred!!\n"); - _p = ((yamop *)(&((_p)->y_u.Illss.next))); + _p = ((yamop *)(&((_p)->u.Illss.next))); break; case _try_logical : printf("_try_logical!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _retry_logical : printf("_retry_logical!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _trust_logical : printf("_trust_logical!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtILl.next))); + _p = ((yamop *)(&((_p)->u.OtILl.next))); break; case _user_switch : printf("_user_switch!!\n"); - _p = ((yamop *)(&((_p)->y_u.lp.next))); + _p = ((yamop *)(&((_p)->u.lp.next))); break; case _switch_on_type : printf("_switch_on_type!!\n"); - _p = ((yamop *)(&((_p)->y_u.llll.next))); + _p = ((yamop *)(&((_p)->u.llll.next))); break; case _switch_list_nl : printf("_switch_list_nl!!\n"); - _p = ((yamop *)(&((_p)->y_u.ollll.next))); + _p = ((yamop *)(&((_p)->u.ollll.next))); break; case _switch_on_arg_type : printf("_switch_on_arg_type!!\n"); - _p = ((yamop *)(&((_p)->y_u.xllll.next))); + _p = ((yamop *)(&((_p)->u.xllll.next))); break; case _switch_on_sub_arg_type : printf("_switch_on_sub_arg_type!!\n"); - _p = ((yamop *)(&((_p)->y_u.sllll.next))); + _p = ((yamop *)(&((_p)->u.sllll.next))); break; case _jump_if_var : printf("_jump_if_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _jump_if_nonvar : printf("_jump_if_nonvar!!\n"); - _p = ((yamop *)(&((_p)->y_u.xll.next))); + _p = ((yamop *)(&((_p)->u.xll.next))); break; case _if_not_then : printf("_if_not_then!!\n"); - _p = ((yamop *)(&((_p)->y_u.clll.next))); + _p = ((yamop *)(&((_p)->u.clll.next))); break; case _switch_on_func : printf("_switch_on_func!!\n"); - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _switch_on_cons : printf("_switch_on_cons!!\n"); - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _go_on_func : printf("_go_on_func!!\n"); - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _go_on_cons : printf("_go_on_cons!!\n"); - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _if_func : printf("_if_func!!\n"); - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _if_cons : printf("_if_cons!!\n"); - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _index_dbref : printf("_index_dbref!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _index_blob : printf("_index_blob!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _index_long : printf("_index_long!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #if YAP_JIT case _jit_handler : printf("_jit_handler!!\n"); - _p = ((yamop *)(&((_p)->y_u.jhc.next))); + _p = ((yamop *)(&((_p)->u.jhc.next))); break; #endif case _p_atom_x : printf("_p_atom_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_atom_y : printf("_p_atom_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_atomic_x : printf("_p_atomic_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_atomic_y : printf("_p_atomic_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_integer_x : printf("_p_integer_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_integer_y : printf("_p_integer_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_nonvar_x : printf("_p_nonvar_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_nonvar_y : printf("_p_nonvar_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_number_x : printf("_p_number_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_number_y : printf("_p_number_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_var_x : printf("_p_var_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_var_y : printf("_p_var_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_db_ref_x : printf("_p_db_ref_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_db_ref_y : printf("_p_db_ref_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_primitive_x : printf("_p_primitive_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_primitive_y : printf("_p_primitive_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_compound_x : printf("_p_compound_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_compound_y : printf("_p_compound_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_float_x : printf("_p_float_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _p_float_y : printf("_p_float_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _p_plus_vv : printf("_p_plus_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_plus_vc : printf("_p_plus_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_plus_y_vv : printf("_p_plus_y_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_plus_y_vc : printf("_p_plus_y_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_minus_vv : printf("_p_minus_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_minus_cv : printf("_p_minus_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_minus_y_vv : printf("_p_minus_y_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_minus_y_cv : printf("_p_minus_y_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_times_vv : printf("_p_times_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_times_vc : printf("_p_times_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_times_y_vv : printf("_p_times_y_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_times_y_vc : printf("_p_times_y_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_div_vv : printf("_p_div_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_div_vc : printf("_p_div_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_div_cv : printf("_p_div_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_div_y_vv : printf("_p_div_y_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_div_y_vc : printf("_p_div_y_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_div_y_cv : printf("_p_div_y_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_and_vv : printf("_p_and_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_and_vc : printf("_p_and_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_and_y_vv : printf("_p_and_y_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_and_y_vc : printf("_p_and_y_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_or_vv : printf("_p_or_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_or_vc : printf("_p_or_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_or_y_vv : printf("_p_or_y_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_or_y_vc : printf("_p_or_y_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_sll_vv : printf("_p_sll_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_sll_vc : printf("_p_sll_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_sll_cv : printf("_p_sll_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_sll_y_vv : printf("_p_sll_y_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_sll_y_vc : printf("_p_sll_y_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_sll_y_cv : printf("_p_sll_y_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_slr_vv : printf("_p_slr_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_slr_vc : printf("_p_slr_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_slr_cv : printf("_p_slr_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_slr_y_vv : printf("_p_slr_y_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_slr_y_vc : printf("_p_slr_y_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_slr_y_cv : printf("_p_slr_y_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _call_bfunc_xx : printf("_call_bfunc_xx!!\n"); - _p = ((yamop *)(&((_p)->y_u.plxxs.next))); + _p = ((yamop *)(&((_p)->u.plxxs.next))); break; case _call_bfunc_yx : printf("_call_bfunc_yx!!\n"); - _p = ((yamop *)(&((_p)->y_u.plxys.next))); + _p = ((yamop *)(&((_p)->u.plxys.next))); break; case _call_bfunc_xy : printf("_call_bfunc_xy!!\n"); - _p = ((yamop *)(&((_p)->y_u.plxys.next))); + _p = ((yamop *)(&((_p)->u.plxys.next))); break; case _call_bfunc_yy : printf("_call_bfunc_yy!!\n"); - _p = ((yamop *)(&((_p)->y_u.plyys.next))); + _p = ((yamop *)(&((_p)->u.plyys.next))); break; case _p_equal : printf("_p_equal!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _p_dif : printf("_p_dif!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _p_eq : printf("_p_eq!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _p_arg_vv : printf("_p_arg_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_arg_cv : printf("_p_arg_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_arg_y_vv : printf("_p_arg_y_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_arg_y_cv : printf("_p_arg_y_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_func2s_vv : printf("_p_func2s_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_func2s_cv : printf("_p_func2s_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxc.next))); + _p = ((yamop *)(&((_p)->u.xxc.next))); break; case _p_func2s_vc : printf("_p_func2s_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _p_func2s_y_vv : printf("_p_func2s_y_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_func2s_y_cv : printf("_p_func2s_y_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_func2s_y_vc : printf("_p_func2s_y_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _p_func2f_xx : printf("_p_func2f_xx!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _p_func2f_xy : printf("_p_func2f_xy!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxy.next))); + _p = ((yamop *)(&((_p)->u.xxy.next))); break; case _p_func2f_yx : printf("_p_func2f_yx!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _p_func2f_yy : printf("_p_func2f_yy!!\n"); - _p = ((yamop *)(&((_p)->y_u.yyx.next))); + _p = ((yamop *)(&((_p)->u.yyx.next))); break; case _p_functor : printf("_p_functor!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _p_execute2 : printf("_p_execute2!!\n"); - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _p_execute : printf("_p_execute!!\n"); - _p = ((yamop *)(&((_p)->y_u.Osbmp.next))); + _p = ((yamop *)(&((_p)->u.Osbmp.next))); break; case _p_execute_tail : printf("_p_execute_tail!!\n"); - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; #ifdef YAPOR case _getwork_first_time : printf("_getwork_first_time!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _getwork : printf("_getwork!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _getwork_seq : printf("_getwork_seq!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _sync : printf("_sync!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; #endif @@ -1594,375 +1594,375 @@ print_preg(yamop* _p) { #ifdef TABLING_INNER_CUTS case _clause_with_cut : printf("_clause_with_cut!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif case _table_load_answer : printf("_table_load_answer!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_try_answer : printf("_table_try_answer!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_try_single : printf("_table_try_single!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_try_me : printf("_table_try_me!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_try : printf("_table_try!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_retry_me : printf("_table_retry_me!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_retry : printf("_table_retry!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_trust_me : printf("_table_trust_me!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_trust : printf("_table_trust!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_new_answer : printf("_table_new_answer!!\n"); - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _table_answer_resolution : printf("_table_answer_resolution!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _table_completion : printf("_table_completion!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; #ifdef THREADS_CONSUMER_SHARING case _table_answer_resolution_completion: printf("_table_answer_resolution_completion!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; #endif case _trie_do_var : printf("_trie_do_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_var : printf("_trie_trust_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_var : printf("_trie_try_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_var : printf("_trie_retry_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_var_in_pair : printf("_trie_do_var_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_var_in_pair : printf("_trie_trust_var_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_var_in_pair : printf("_trie_try_var_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_var_in_pair : printf("_trie_retry_var_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_val : printf("_trie_do_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_val : printf("_trie_trust_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_val : printf("_trie_try_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_val : printf("_trie_retry_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_val_in_pair : printf("_trie_do_val_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_val_in_pair : printf("_trie_trust_val_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_val_in_pair : printf("_trie_try_val_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_val_in_pair : printf("_trie_retry_val_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_atom : printf("_trie_do_atom!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_atom : printf("_trie_trust_atom!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_atom : printf("_trie_try_atom!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_atom : printf("_trie_retry_atom!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_atom_in_pair : printf("_trie_do_atom_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_atom_in_pair : printf("_trie_trust_atom_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_atom_in_pair : printf("_trie_try_atom_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_atom_in_pair : printf("_trie_retry_atom_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_null : printf("_trie_do_null!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_null : printf("_trie_trust_null!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_null : printf("_trie_try_null!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_null : printf("_trie_retry_null!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_null_in_pair : printf("_trie_do_null_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_null_in_pair : printf("_trie_trust_null_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_null_in_pair : printf("_tri_try_null_in_paire!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_null_in_pair : printf("_trie_retry_null_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_pair : printf("_trie_do_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_pair : printf("_trie_trust_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_pair : printf("_trie_try_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_pair : printf("_trie_retry_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_appl : printf("_trie_do_appl!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_appl : printf("_trie_trust_appl!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_appl : printf("_trie_try_appl!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_appl : printf("_trie_retry_appl!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_appl_in_pair : printf("_trie_do_appl_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_appl_in_pair : printf("_trie_trust_appl_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_appl_in_pair : printf("_trie_trty_appkl_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_appl_in_pair : printf("_trie_retry_appl_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_extension : printf("_trie_do_extension!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_extension : printf("_trie_trust_extension!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_extension : printf("_trie_try_extension!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_extension : printf("_trie_retry_extension!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_double : printf("_trie_do_double!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_double : printf("_trie_trust_double!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_double : printf("_trie_try_double!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_double : printf("_trie_retry_double!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_longint : printf("_trie_do_longint!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_longint : printf("_trie_trust_longint!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_longint : printf("_trie_try_longint!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_longint : printf("_trie_retry_longint!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_do_gterm : printf("_trie_do_gterm!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_trust_gterm : printf("_trie_trust_gterm!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_try_gterm : printf("_trie_try_gterm!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _trie_retry_gterm : printf("_trie_retry_gterm!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif @@ -1970,1596 +1970,1596 @@ print_preg(yamop* _p) { #ifdef YAPOR case _or_last : printf("_or_last!!\n"); - _p = ((yamop *)(&((_p)->y_u.sblp.next))); + _p = ((yamop *)(&((_p)->u.sblp.next))); break; #else case _or_last : printf("_or_last!!\n"); - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; #endif #if YAP_JIT case _traced_Ystop : printf("_Ystop!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_Nstop : printf("_Nstop!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_try_me : printf("_try_me!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_retry_me : printf("_retry_me!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_trust_me : printf("_trust_me!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_enter_profiling : printf("_enter_profiling!!\n"); - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _traced_retry_profiled : printf("_retry_profiled!!\n"); - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _traced_profiled_retry_me : printf("_profiled_retry_me!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_profiled_trust_me : printf("_profiled_trust_me!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_profiled_retry_logical : printf("_profiled_retry_logical!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _traced_profiled_trust_logical : printf("_profiled_trust_logical!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtILl.next))); + _p = ((yamop *)(&((_p)->u.OtILl.next))); break; case _traced_count_call : printf("_count_call!!\n"); - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _traced_count_retry : printf("_count_retry!!\n"); - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _traced_count_retry_me : printf("_count_retry_me!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_count_trust_me : printf("_count_trust_me!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_count_retry_logical : printf("_count_retry_logical!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _traced_count_trust_logical : printf("_count_trust_logical!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtILl.next))); + _p = ((yamop *)(&((_p)->u.OtILl.next))); break; case _traced_lock_lu : printf("_lock_lu!!\n"); - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _traced_unlock_lu : printf("_unlock_lu!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_alloc_for_logical_pred : printf("_alloc_for_logical_pred!!\n"); - _p = ((yamop *)(&((_p)->y_u.L.next))); + _p = ((yamop *)(&((_p)->u.L.next))); break; case _traced_copy_idb_term : printf("_copy_idb_term!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_unify_idb_term : printf("_unify_idb_term!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_ensure_space : printf("_ensure_space!!\n"); - _p = ((yamop *)(&((_p)->y_u.Osbpa.next))); + _p = ((yamop *)(&((_p)->u.Osbpa.next))); break; case _traced_spy_or_trymark : printf("_spy_or_trymark!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_try_and_mark : printf("_try_and_mark!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_count_retry_and_mark : printf("_count_retry_and_mark!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_profiled_retry_and_mark : printf("_profiled_retry_and_mark!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_retry_and_mark : printf("_retry_and_mark!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_trust_fail : printf("_trust_fail!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_op_fail : printf("_op_fail!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_cut : printf("_cut!!\n"); - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _traced_cut_t : printf("_cut_t!!\n"); - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _traced_cut_e : printf("_cut_e!!\n"); - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _traced_save_b_x : printf("_save_b_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _traced_save_b_y : printf("_save_b_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _traced_commit_b_x : printf("_commit_b_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xps.next))); + _p = ((yamop *)(&((_p)->u.xps.next))); break; case _traced_commit_b_y : printf("_commit_b_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yps.next))); + _p = ((yamop *)(&((_p)->u.yps.next))); break; case _traced_execute : printf("_execute!!\n"); - _p = ((yamop *)(&((_p)->y_u.pp.next))); + _p = ((yamop *)(&((_p)->u.pp.next))); break; case _traced_dexecute : printf("_dexecute!!\n"); - _p = ((yamop *)(&((_p)->y_u.pp.next))); + _p = ((yamop *)(&((_p)->u.pp.next))); break; case _traced_fcall : printf("_fcall!!\n"); - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _traced_call : printf("_call!!\n"); - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _traced_procceed : printf("_procceed!!\n"); - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; case _traced_allocate : printf("_allocate!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_deallocate : printf("_deallocate!!\n"); - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; #ifdef BEAM case _traced_retry_eam : printf("_retry_eam!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif #ifdef BEAM case _traced_run_eam : printf("_run_eam!!\n"); - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; #endif case _traced_get_x_var : printf("_get_x_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _traced_get_y_var : printf("_get_y_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_get_yy_var : printf("_get_yy_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.yyxx.next))); + _p = ((yamop *)(&((_p)->u.yyxx.next))); break; case _traced_get_x_val : printf("_get_x_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _traced_get_y_val : printf("_get_y_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_get_atom : printf("_get_atom!!\n"); - _p = ((yamop *)(&((_p)->y_u.xc.next))); + _p = ((yamop *)(&((_p)->u.xc.next))); break; case _traced_get_2atoms : printf("_get_2atoms!!\n"); - _p = ((yamop *)(&((_p)->y_u.cc.next))); + _p = ((yamop *)(&((_p)->u.cc.next))); break; case _traced_get_3atoms : printf("_get_3atoms!!\n"); - _p = ((yamop *)(&((_p)->y_u.ccc.next))); + _p = ((yamop *)(&((_p)->u.ccc.next))); break; case _traced_get_4atoms : printf("_get_4atoms!!\n"); - _p = ((yamop *)(&((_p)->y_u.cccc.next))); + _p = ((yamop *)(&((_p)->u.cccc.next))); break; case _traced_get_5atoms : printf("_get_5atoms!!\n"); - _p = ((yamop *)(&((_p)->y_u.ccccc.next))); + _p = ((yamop *)(&((_p)->u.ccccc.next))); break; case _traced_get_6atoms : printf("_get_6atoms!!\n"); - _p = ((yamop *)(&((_p)->y_u.cccccc.next))); + _p = ((yamop *)(&((_p)->u.cccccc.next))); break; case _traced_get_list : printf("_get_list!!\n"); - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _traced_get_struct : printf("_get_struct!!\n"); - _p = ((yamop *)(&((_p)->y_u.xfa.next))); + _p = ((yamop *)(&((_p)->u.xfa.next))); break; case _traced_get_float : printf("_get_float!!\n"); - _p = ((yamop *)(&((_p)->y_u.xd.next))); + _p = ((yamop *)(&((_p)->u.xd.next))); break; case _traced_get_longint : printf("_get_longint!!\n"); - _p = ((yamop *)(&((_p)->y_u.xi.next))); + _p = ((yamop *)(&((_p)->u.xi.next))); break; case _traced_get_bigint : printf("_get_bigint!!\n"); - _p = ((yamop *)(&((_p)->y_u.xN.next))); + _p = ((yamop *)(&((_p)->u.xN.next))); break; case _traced_get_dbterm : printf("_get_dbterm!!\n"); - _p = ((yamop *)(&((_p)->y_u.xD.next))); + _p = ((yamop *)(&((_p)->u.xD.next))); break; case _traced_glist_valx : printf("_glist_valx!!\n"); - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _traced_glist_valy : printf("_glist_valy!!\n"); - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_gl_void_varx : printf("_gl_void_varx!!\n"); - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _traced_gl_void_vary : printf("_gl_void_vary!!\n"); - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_gl_void_valx : printf("_gl_void_valx!!\n"); - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _traced_gl_void_valy : printf("_gl_void_valy!!\n"); - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_unify_x_var : printf("_unify_x_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_x_var_write : printf("_unify_x_var_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_l_x_var : printf("_unify_l_x_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_l_x_var_write : printf("_unify_l_x_var_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_x_var2 : printf("_unify_x_var2!!\n"); - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _traced_unify_x_var2_write : printf("_unify_x_var2_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _traced_unify_l_x_var2 : printf("_unify_l_x_var2!!\n"); - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _traced_unify_l_x_var2_write : printf("_unify_l_x_var2_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oxx.next))); + _p = ((yamop *)(&((_p)->u.oxx.next))); break; case _traced_unify_y_var : printf("_unify_y_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_y_var_write : printf("_unify_y_var_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_l_y_var : printf("_unify_l_y_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_l_y_var_write : printf("_unify_l_y_var_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_x_val : printf("_unify_x_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_x_val_write : printf("_unify_x_val_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_l_x_val : printf("_unify_l_x_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_l_x_val_write : printf("_uify_l_x_val_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_y_val : printf("_unify_y_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_y_val_write : printf("_unify_y_val_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_l_y_val : printf("_unify_l_y_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_l_y_val_write : printf("_unify_l_y_val_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_x_loc : printf("_unify_x_loc!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_x_loc_write : printf("_unify_x_loc_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_l_x_loc : printf("_unify_l_x_loc!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_l_x_loc_write : printf("_unify_l_x_loc_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_unify_y_loc : printf("_unify_y_loc!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_y_loc_write : printf("_unify_y_loc_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_l_y_loc : printf("_unify_l_y_loc!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_l_y_loc_write : printf("_unify_l_y_loc_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_unify_void : printf("_unify_void!!\n"); - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_void_write : printf("_unify_void_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_l_void : printf("_unify_l_void!!\n"); - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_l_void_write : printf("_unify_l_void_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_n_voids : printf("_unify_n_voids!!\n"); - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _traced_unify_n_voids_write : printf("_unify_n_voids_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _traced_unify_l_n_voids : printf("_unify_l_n_voids!!\n"); - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _traced_unify_l_n_voids_write : printf("_unify_l_n_voids_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.os.next))); + _p = ((yamop *)(&((_p)->u.os.next))); break; case _traced_unify_atom : printf("_unify_atom!!\n"); - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _traced_unify_atom_write : printf("_unify_atom_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _traced_unify_l_atom : printf("_unify_l_atom!!\n"); - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _traced_unify_l_atom_write : printf("_unify_l_atom_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oc.next))); + _p = ((yamop *)(&((_p)->u.oc.next))); break; case _traced_unify_n_atoms : printf("_unify_n_atoms!!\n"); - _p = ((yamop *)(&((_p)->y_u.osc.next))); + _p = ((yamop *)(&((_p)->u.osc.next))); break; case _traced_unify_n_atoms_write : printf("_unify_n_atoms_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.osc.next))); + _p = ((yamop *)(&((_p)->u.osc.next))); break; case _traced_unify_float : printf("_unify_float!!\n"); - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _traced_unify_float_write : printf("_unify_float_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _traced_unify_l_float : printf("_unify_l_float!!\n"); - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _traced_unify_l_float_write : printf("_unify_l_float_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.od.next))); + _p = ((yamop *)(&((_p)->u.od.next))); break; case _traced_unify_longint : printf("_unify_longint!!\n"); - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _traced_unify_longint_write : printf("_unify_longint_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _traced_unify_l_longint : printf("_unify_l_longint!!\n"); - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _traced_unify_l_longint_write : printf("_unify_l_longint_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oi.next))); + _p = ((yamop *)(&((_p)->u.oi.next))); break; case _traced_unify_bigint : printf("_unify_bigint!!\n"); - _p = ((yamop *)(&((_p)->y_u.oN.next))); + _p = ((yamop *)(&((_p)->u.oN.next))); break; case _traced_unify_l_bigint : printf("_unify_l_bigint!!\n"); - _p = ((yamop *)(&((_p)->y_u.oN.next))); + _p = ((yamop *)(&((_p)->u.oN.next))); break; case _traced_unify_dbterm : printf("_unify_dbterm!!\n"); - _p = ((yamop *)(&((_p)->y_u.oD.next))); + _p = ((yamop *)(&((_p)->u.oD.next))); break; case _traced_unify_l_dbterm : printf("_unify_l_dbterm!!\n"); - _p = ((yamop *)(&((_p)->y_u.oD.next))); + _p = ((yamop *)(&((_p)->u.oD.next))); break; case _traced_unify_list : printf("_unify_list!!\n"); - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_list_write : printf("_unify_list_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_l_list : printf("_unify_l_list!!\n"); - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_l_list_write : printf("_unify_l_list_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.o.next))); + _p = ((yamop *)(&((_p)->u.o.next))); break; case _traced_unify_struct : printf("_unify_struct!!\n"); - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _traced_unify_struct_write : printf("_unify_struct_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _traced_unify_l_struc : printf("_unify_l_struc!!\n"); - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _traced_unify_l_struc_write : printf("_unify_l_struc_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.ofa.next))); + _p = ((yamop *)(&((_p)->u.ofa.next))); break; case _traced_put_x_var : printf("_put_x_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _traced_put_y_var : printf("_put_y_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_put_x_val : printf("_put_x_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.xx.next))); + _p = ((yamop *)(&((_p)->u.xx.next))); break; case _traced_put_xx_val : printf("_put_xx_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxxx.next))); + _p = ((yamop *)(&((_p)->u.xxxx.next))); break; case _traced_put_y_val : printf("_put_y_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_put_y_vals : printf("_put_y_vals!!\n"); - _p = ((yamop *)(&((_p)->y_u.yyxx.next))); + _p = ((yamop *)(&((_p)->u.yyxx.next))); break; case _traced_put_unsafe : printf("_put_unsafe!!\n"); - _p = ((yamop *)(&((_p)->y_u.yx.next))); + _p = ((yamop *)(&((_p)->u.yx.next))); break; case _traced_put_atom : printf("_put_atom!!\n"); - _p = ((yamop *)(&((_p)->y_u.xc.next))); + _p = ((yamop *)(&((_p)->u.xc.next))); break; case _traced_put_dbterm : printf("_put_dbterm!!\n"); - _p = ((yamop *)(&((_p)->y_u.xD.next))); + _p = ((yamop *)(&((_p)->u.xD.next))); break; case _traced_put_bigint : printf("_put_bigint!!\n"); - _p = ((yamop *)(&((_p)->y_u.xN.next))); + _p = ((yamop *)(&((_p)->u.xN.next))); break; case _traced_put_float : printf("_put_float!!\n"); - _p = ((yamop *)(&((_p)->y_u.xd.next))); + _p = ((yamop *)(&((_p)->u.xd.next))); break; case _traced_put_longint : printf("_put_longint!!\n"); - _p = ((yamop *)(&((_p)->y_u.xi.next))); + _p = ((yamop *)(&((_p)->u.xi.next))); break; case _traced_put_list : printf("_put_list!!\n"); - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _traced_put_struct : printf("_put_struct!!\n"); - _p = ((yamop *)(&((_p)->y_u.xfa.next))); + _p = ((yamop *)(&((_p)->u.xfa.next))); break; case _traced_write_x_var : printf("_write_x_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _traced_write_void : printf("_write_void!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_write_n_voids : printf("_write_n_voids!!\n"); - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _traced_write_y_var : printf("_write_y_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _traced_write_x_val : printf("_write_x_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _traced_write_x_loc : printf("_write_x_loc!!\n"); - _p = ((yamop *)(&((_p)->y_u.x.next))); + _p = ((yamop *)(&((_p)->u.x.next))); break; case _traced_write_y_val : printf("_write_y_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _traced_write_y_loc : printf("_write_y_loc!!\n"); - _p = ((yamop *)(&((_p)->y_u.y.next))); + _p = ((yamop *)(&((_p)->u.y.next))); break; case _traced_write_atom : printf("_write_atom!!\n"); - _p = ((yamop *)(&((_p)->y_u.c.next))); + _p = ((yamop *)(&((_p)->u.c.next))); break; case _traced_write_bigint : printf("_write_bigint!!\n"); - _p = ((yamop *)(&((_p)->y_u.N.next))); + _p = ((yamop *)(&((_p)->u.N.next))); break; case _traced_write_dbterm : printf("_write_dbterm!!\n"); - _p = ((yamop *)(&((_p)->y_u.D.next))); + _p = ((yamop *)(&((_p)->u.D.next))); break; case _traced_write_float : printf("_write_float!!\n"); - _p = ((yamop *)(&((_p)->y_u.d.next))); + _p = ((yamop *)(&((_p)->u.d.next))); break; case _traced_write_longint : printf("_write_longint!!\n"); - _p = ((yamop *)(&((_p)->y_u.i.next))); + _p = ((yamop *)(&((_p)->u.i.next))); break; case _traced_write_n_atoms : printf("_write_n_atoms!!\n"); - _p = ((yamop *)(&((_p)->y_u.sc.next))); + _p = ((yamop *)(&((_p)->u.sc.next))); break; case _traced_write_list : printf("_write_list!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_write_l_list : printf("_write_l_list!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_write_struct : printf("_write_struct!!\n"); - _p = ((yamop *)(&((_p)->y_u.fa.next))); + _p = ((yamop *)(&((_p)->u.fa.next))); break; case _traced_write_l_struc : printf("_write_l_struc!!\n"); - _p = ((yamop *)(&((_p)->y_u.fa.next))); + _p = ((yamop *)(&((_p)->u.fa.next))); break; case _traced_save_pair_x : printf("_save_pair_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_save_pair_x_write : printf("_save_pair_x_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_save_pair_y : printf("_save_pair_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_save_pair_y_write : printf("_save_pair_y_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_save_appl_x : printf("_save_appl_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_save_appl_x_write : printf("_save_appl_x_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.ox.next))); + _p = ((yamop *)(&((_p)->u.ox.next))); break; case _traced_save_appl_y : printf("_save_appl_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_save_appl_y_write : printf("_save_appl_y_write!!\n"); - _p = ((yamop *)(&((_p)->y_u.oy.next))); + _p = ((yamop *)(&((_p)->u.oy.next))); break; case _traced_jump : printf("_jump!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_move_back : printf("_move_back!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_skip : printf("_skip!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_either : printf("_either!!\n"); - _p = ((yamop *)(&((_p)->y_u.Osblp.next))); + _p = ((yamop *)(&((_p)->u.Osblp.next))); break; case _traced_or_else : printf("_or_else!!\n"); - _p = ((yamop *)(&((_p)->y_u.Osblp.next))); + _p = ((yamop *)(&((_p)->u.Osblp.next))); break; case _traced_pop_n : printf("_pop_n!!\n"); - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _traced_pop : printf("_pop!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_call_cpred : printf("_call_cpred!!\n"); - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _traced_execute_cpred : printf("_execute_cpred!!\n"); - _p = ((yamop *)(&((_p)->y_u.pp.next))); + _p = ((yamop *)(&((_p)->u.pp.next))); break; case _traced_call_usercpred : printf("_call_usercpred!!\n"); - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _traced_call_c_wfail : printf("_call_x_wfail!!\n"); - _p = ((yamop *)(&((_p)->y_u.slp.next))); + _p = ((yamop *)(&((_p)->u.slp.next))); break; case _traced_try_c : printf("_try_c!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; case _traced_retry_c : printf("_retry_c!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; #ifdef CUT_C case _traced_cut_c : printf("_cut_c!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; #endif case _traced_try_userc : printf("_try_userc!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; case _traced_retry_userc : printf("_retry_userc!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; #ifdef CUT_C case _traced_cut_userc : printf("_cut_userc!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtapFs.next))); + _p = ((yamop *)(&((_p)->u.OtapFs.next))); break; #endif case _traced_lock_pred : printf("_lock_pred!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_index_pred : printf("_index_pred!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #ifdef THREADS case _traced_thread_local : printf("_thread_local!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif case _traced_expand_index : printf("_expand_index!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_expand_clauses : printf("_expand_clauses!!\n"); - _p = ((yamop *)(&((_p)->y_u.sssllp.next))); + _p = ((yamop *)(&((_p)->u.sssllp.next))); break; case _traced_undef_p : printf("_undef_p!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_spy_pred : printf("_spy_pred!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_try_clause : printf("_try_clause!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_try_clause2 : printf("_try_clause2!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_try_clause3 : printf("_try_clause3!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_try_clause4 : printf("_try_clause4!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_retry : printf("_retry!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_retry2 : printf("_retry2!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_retry3 : printf("_retry3!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_retry4 : printf("_retry4!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_trust : printf("_trust!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_try_in : printf("_try_in!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_enter_lu_pred : printf("_enter_lu_pred!!\n"); - _p = ((yamop *)(&((_p)->y_u.Illss.next))); + _p = ((yamop *)(&((_p)->u.Illss.next))); break; case _traced_try_logical : printf("_try_logical!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _traced_retry_logical : printf("_retry_logical!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtaLl.next))); + _p = ((yamop *)(&((_p)->u.OtaLl.next))); break; case _traced_trust_logical : printf("_trust_logical!!\n"); - _p = ((yamop *)(&((_p)->y_u.OtILl.next))); + _p = ((yamop *)(&((_p)->u.OtILl.next))); break; case _traced_user_switch : printf("_user_switch!!\n"); - _p = ((yamop *)(&((_p)->y_u.lp.next))); + _p = ((yamop *)(&((_p)->u.lp.next))); break; case _traced_switch_on_type : printf("_switch_on_type!!\n"); - _p = ((yamop *)(&((_p)->y_u.llll.next))); + _p = ((yamop *)(&((_p)->u.llll.next))); break; case _traced_switch_list_nl : printf("_switch_list_nl!!\n"); - _p = ((yamop *)(&((_p)->y_u.ollll.next))); + _p = ((yamop *)(&((_p)->u.ollll.next))); break; case _traced_switch_on_arg_type : printf("_switch_on_arg_type!!\n"); - _p = ((yamop *)(&((_p)->y_u.xllll.next))); + _p = ((yamop *)(&((_p)->u.xllll.next))); break; case _traced_switch_on_sub_arg_type : printf("_switch_on_sub_arg_type!!\n"); - _p = ((yamop *)(&((_p)->y_u.sllll.next))); + _p = ((yamop *)(&((_p)->u.sllll.next))); break; case _traced_jump_if_var : printf("_jump_if_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_jump_if_nonvar : printf("_jump_if_nonvar!!\n"); - _p = ((yamop *)(&((_p)->y_u.xll.next))); + _p = ((yamop *)(&((_p)->u.xll.next))); break; case _traced_if_not_then : printf("_if_not_then!!\n"); - _p = ((yamop *)(&((_p)->y_u.clll.next))); + _p = ((yamop *)(&((_p)->u.clll.next))); break; case _traced_switch_on_func : printf("_switch_on_func!!\n"); - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _traced_switch_on_cons : printf("_switch_on_cons!!\n"); - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _traced_go_on_func : printf("_go_on_func!!\n"); - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _traced_go_on_cons : printf("_go_on_cons!!\n"); - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _traced_if_func : printf("_if_func!!\n"); - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _traced_if_cons : printf("_if_cons!!\n"); - _p = ((yamop *)(&((_p)->y_u.sssl.next))); + _p = ((yamop *)(&((_p)->u.sssl.next))); break; case _traced_index_dbref : printf("_index_dbref!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_index_blob : printf("_index_blob!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_index_long : printf("_index_long!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_jit_handler : printf("_jit_handler!!\n"); - _p = ((yamop *)(&((_p)->y_u.jhc.next))); + _p = ((yamop *)(&((_p)->u.jhc.next))); break; case _traced_p_atom_x : printf("_p_atom_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_atom_y : printf("_p_atom_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_atomic_x : printf("_p_atomic_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_atomic_y : printf("_p_atomic_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_integer_x : printf("_p_integer_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_integer_y : printf("_p_integer_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_nonvar_x : printf("_p_nonvar_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_nonvar_y : printf("_p_nonvar_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_number_x : printf("_p_number_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_number_y : printf("_p_number_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_var_x : printf("_p_var_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_var_y : printf("_p_var_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_db_ref_x : printf("_p_db_ref_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_db_ref_y : printf("_p_db_ref_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_primitive_x : printf("_p_primitive_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_primitive_y : printf("_p_primitive_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_compound_x : printf("_p_compound_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_compound_y : printf("_p_compound_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_float_x : printf("_p_float_x!!\n"); - _p = ((yamop *)(&((_p)->y_u.xl.next))); + _p = ((yamop *)(&((_p)->u.xl.next))); break; case _traced_p_float_y : printf("_p_float_y!!\n"); - _p = ((yamop *)(&((_p)->y_u.yl.next))); + _p = ((yamop *)(&((_p)->u.yl.next))); break; case _traced_p_plus_vv : printf("_p_plus_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_plus_vc : printf("_p_plus_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_plus_y_vv : printf("_p_plus_y_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_plus_y_vc : printf("_p_plus_y_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_minus_vv : printf("_p_minus_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_minus_cv : printf("_p_minus_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_minus_y_vv : printf("_p_minus_y_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_minus_y_cv : printf("_p_minus_y_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_times_vv : printf("_p_times_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_times_vc : printf("_p_times_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_times_y_vv : printf("_p_times_y_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_times_y_vc : printf("_p_times_y_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_div_vv : printf("_p_div_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_div_vc : printf("_p_div_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_div_cv : printf("_p_div_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_div_y_vv : printf("_p_div_y_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_div_y_vc : printf("_p_div_y_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_div_y_cv : printf("_p_div_y_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_and_vv : printf("_p_and_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_and_vc : printf("_p_and_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_and_y_vv : printf("_p_and_y_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_and_y_vc : printf("_p_and_y_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_or_vv : printf("_p_or_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_or_vc : printf("_p_or_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_or_y_vv : printf("_p_or_y_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_or_y_vc : printf("_p_or_y_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_sll_vv : printf("_p_sll_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_sll_vc : printf("_p_sll_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_sll_cv : printf("_p_sll_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_sll_y_vv : printf("_p_sll_y_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_sll_y_vc : printf("_p_sll_y_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_sll_y_cv : printf("_p_sll_y_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_slr_vv : printf("_p_slr_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_slr_vc : printf("_p_slr_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_slr_cv : printf("_p_slr_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_slr_y_vv : printf("_p_slr_y_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_slr_y_vc : printf("_p_slr_y_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_slr_y_cv : printf("_p_slr_y_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_call_bfunc_xx : printf("_call_bfunc_xx!!\n"); - _p = ((yamop *)(&((_p)->y_u.plxxs.next))); + _p = ((yamop *)(&((_p)->u.plxxs.next))); break; case _traced_call_bfunc_yx : printf("_call_bfunc_yx!!\n"); - _p = ((yamop *)(&((_p)->y_u.plxys.next))); + _p = ((yamop *)(&((_p)->u.plxys.next))); break; case _traced_call_bfunc_xy : printf("_call_bfunc_xy!!\n"); - _p = ((yamop *)(&((_p)->y_u.plxys.next))); + _p = ((yamop *)(&((_p)->u.plxys.next))); break; case _traced_call_bfunc_yy : printf("_call_bfunc_yy!!\n"); - _p = ((yamop *)(&((_p)->y_u.plyys.next))); + _p = ((yamop *)(&((_p)->u.plyys.next))); break; case _traced_p_equal : printf("_p_equal!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_p_dif : printf("_p_dif!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_p_eq : printf("_p_eq!!\n"); - _p = ((yamop *)(&((_p)->y_u.l.next))); + _p = ((yamop *)(&((_p)->u.l.next))); break; case _traced_p_arg_vv : printf("_p_arg_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_arg_cv : printf("_p_arg_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_arg_y_vv : printf("_p_arg_y_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_arg_y_cv : printf("_p_arg_y_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_func2s_vv : printf("_p_func2s_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_func2s_cv : printf("_p_func2s_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxc.next))); + _p = ((yamop *)(&((_p)->u.xxc.next))); break; case _traced_p_func2s_vc : printf("_p_func2s_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxn.next))); + _p = ((yamop *)(&((_p)->u.xxn.next))); break; case _traced_p_func2s_y_vv : printf("_p_func2s_y_vv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_func2s_y_cv : printf("_p_func2s_y_cv!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_func2s_y_vc : printf("_p_func2s_y_vc!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxn.next))); + _p = ((yamop *)(&((_p)->u.yxn.next))); break; case _traced_p_func2f_xx : printf("_p_func2f_xx!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxx.next))); + _p = ((yamop *)(&((_p)->u.xxx.next))); break; case _traced_p_func2f_xy : printf("_p_func2f_xy!!\n"); - _p = ((yamop *)(&((_p)->y_u.xxy.next))); + _p = ((yamop *)(&((_p)->u.xxy.next))); break; case _traced_p_func2f_yx : printf("_p_func2f_yx!!\n"); - _p = ((yamop *)(&((_p)->y_u.yxx.next))); + _p = ((yamop *)(&((_p)->u.yxx.next))); break; case _traced_p_func2f_yy : printf("_p_func2f_yy!!\n"); - _p = ((yamop *)(&((_p)->y_u.yyx.next))); + _p = ((yamop *)(&((_p)->u.yyx.next))); break; case _traced_p_functor : printf("_p_functor!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_p_execute2 : printf("_p_execute2!!\n"); - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; case _traced_p_execute : printf("_p_execute!!\n"); - _p = ((yamop *)(&((_p)->y_u.Osbmp.next))); + _p = ((yamop *)(&((_p)->u.Osbmp.next))); break; case _traced_p_execute_tail : printf("_p_execute_tail!!\n"); - _p = ((yamop *)(&((_p)->y_u.Osbpp.next))); + _p = ((yamop *)(&((_p)->u.Osbpp.next))); break; #ifdef YAPOR case _traced_getwork_first_time : printf("_getwork_first_time!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_getwork : printf("_getwork!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_getwork_seq : printf("_getwork_seq!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_sync : printf("_sync!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; #endif @@ -3567,375 +3567,375 @@ print_preg(yamop* _p) { #ifdef TABLING_INNER_CUTS case _traced_clause_with_cut : printf("_clause_with_cut!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif case _traced_table_load_answer : printf("_table_load_answer!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_try_answer : printf("_table_try_answer!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_try_single : printf("_table_try_single!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_try_me : printf("_table_try_me!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_try : printf("_table_try!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_retry_me : printf("_table_retry_me!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_retry : printf("_table_retry!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_trust_me : printf("_table_trust_me!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_trust : printf("_table_trust!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_new_answer : printf("_table_new_answer!!\n"); - _p = ((yamop *)(&((_p)->y_u.s.next))); + _p = ((yamop *)(&((_p)->u.s.next))); break; case _traced_table_answer_resolution : printf("_table_answer_resolution!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; case _traced_table_completion : printf("_table_completion!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; #ifdef THREADS_CONSUMER_SHARING case _traced_table_answer_resolution_completion: printf("_table_answer_resolution_completion!!\n"); - _p = ((yamop *)(&((_p)->y_u.Otapl.next))); + _p = ((yamop *)(&((_p)->u.Otapl.next))); break; #endif case _traced_trie_do_var : printf("_trie_do_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_var : printf("_trie_trust_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_var : printf("_trie_try_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_var : printf("_trie_retry_var!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_var_in_pair : printf("_trie_do_var_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_var_in_pair : printf("_trie_trust_var_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_var_in_pair : printf("_trie_try_var_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_var_in_pair : printf("_trie_retry_var_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_val : printf("_trie_do_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_val : printf("_trie_trust_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_val : printf("_trie_try_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_val : printf("_trie_retry_val!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_val_in_pair : printf("_trie_do_val_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_val_in_pair : printf("_trie_trust_val_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_val_in_pair : printf("_trie_try_val_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_val_in_pair : printf("_trie_retry_val_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_atom : printf("_trie_do_atom!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_atom : printf("_trie_trust_atom!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_atom : printf("_trie_try_atom!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_atom : printf("_trie_retry_atom!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_atom_in_pair : printf("_trie_do_atom_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_atom_in_pair : printf("_trie_trust_atom_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_atom_in_pair : printf("_trie_try_atom_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_atom_in_pair : printf("_trie_retry_atom_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_null : printf("_trie_do_null!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_null : printf("_trie_trust_null!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_null : printf("_trie_try_null!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_null : printf("_trie_retry_null!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_null_in_pair : printf("_trie_do_null_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_null_in_pair : printf("_trie_trust_null_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_null_in_pair : printf("_tri_try_null_in_paire!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_null_in_pair : printf("_trie_retry_null_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_pair : printf("_trie_do_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_pair : printf("_trie_trust_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_pair : printf("_trie_try_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_pair : printf("_trie_retry_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_appl : printf("_trie_do_appl!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_appl : printf("_trie_trust_appl!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_appl : printf("_trie_try_appl!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_appl : printf("_trie_retry_appl!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_appl_in_pair : printf("_trie_do_appl_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_appl_in_pair : printf("_trie_trust_appl_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_appl_in_pair : printf("_trie_trty_appkl_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_appl_in_pair : printf("_trie_retry_appl_in_pair!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_extension : printf("_trie_do_extension!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_extension : printf("_trie_trust_extension!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_extension : printf("_trie_try_extension!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_extension : printf("_trie_retry_extension!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_double : printf("_trie_do_double!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_double : printf("_trie_trust_double!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_double : printf("_trie_try_double!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_double : printf("_trie_retry_double!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_longint : printf("_trie_do_longint!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_longint : printf("_trie_trust_longint!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_longint : printf("_trie_try_longint!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_longint : printf("_trie_retry_longint!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_do_gterm : printf("_trie_do_gterm!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_trust_gterm : printf("_trie_trust_gterm!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_try_gterm : printf("_trie_try_gterm!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; case _traced_trie_retry_gterm : printf("_trie_retry_gterm!!\n"); - _p = ((yamop *)(&((_p)->y_u.e.next))); + _p = ((yamop *)(&((_p)->u.e.next))); break; #endif @@ -3943,12 +3943,12 @@ print_preg(yamop* _p) { #ifdef YAPOR case _traced_or_last : printf("_or_last!!\n"); - _p = ((yamop *)(&((_p)->y_u.sblp.next))); + _p = ((yamop *)(&((_p)->u.sblp.next))); break; #else case _traced_or_last : printf("_or_last!!\n"); - _p = ((yamop *)(&((_p)->y_u.p.next))); + _p = ((yamop *)(&((_p)->u.p.next))); break; #endif diff --git a/JIT/HPP/singlecode_basics.h b/JIT/HPP/singlecode_basics.h index 7c50a3e92..5bf23dbc0 100644 --- a/JIT/HPP/singlecode_basics.h +++ b/JIT/HPP/singlecode_basics.h @@ -1,6 +1,6 @@ #if (defined(YAPOR_SBA) && defined(YAPOR)) || defined(TABLING) #define check_stack_on_fail \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) return external_labels[10]; + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) return external_labels[10]; #else #define check_stack_on_fail \ if (__builtin_expect(((Int)(Unsigned(ENV_YREG) - Unsigned(HR)) < CreepFlag ), 0) ) return external_labels[10]; @@ -49,6 +49,10 @@ else { FAIL(); } \ } \ else { FAIL(); } + +#define _native_me_instinit \ + (*_PREG) = NEXTOP((*_PREG), aFlp); \ + GONEXT(); #ifdef COROUTINING #define _op_fail_instinit \ diff --git a/JIT/HPP/singlecode_call.h b/JIT/HPP/singlecode_call.h index 8eeb98bf2..3e4dae5e5 100644 --- a/JIT/HPP/singlecode_call.h +++ b/JIT/HPP/singlecode_call.h @@ -1,6 +1,6 @@ #if (defined(YAPOR_SBA) && defined(YAPOR)) || defined(TABLING) #define check_stack_on_call \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) return external_labels[6]; + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) return external_labels[6]; #else #define check_stack_on_call \ if (__builtin_expect(((Int)(Unsigned(ENV_YREG) - Unsigned(HR)) < CreepFlag ), 0) ) return external_labels[6]; @@ -8,7 +8,7 @@ #if (defined(YAPOR_SBA) && defined(YAPOR)) || defined(TABLING) #define check_stack_on_execute \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) return external_labels[5]; + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) return external_labels[5]; #else #define check_stack_on_execute \ if (__builtin_expect(((Int)(Unsigned(ENV_YREG) - Unsigned(HR)) < CreepFlag ), 0) ) return external_labels[5]; @@ -16,7 +16,7 @@ #if (defined(YAPOR_SBA) && defined(YAPOR)) || defined(TABLING) #define check_stack_on_dexecute \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) return external_labels[7]; + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) return external_labels[7]; #else #define check_stack_on_dexecute \ if (__builtin_expect(((Int)(Unsigned(ENV_YREG) - Unsigned(HR)) < CreepFlag ), 0) ) return external_labels[7]; @@ -24,7 +24,7 @@ #if (defined(YAPOR_SBA) && defined(YAPOR)) || defined(TABLING) #define check_stack_on_deallocate \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) return external_labels[8]; + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) return external_labels[8]; #else #define check_stack_on_deallocate \ if (__builtin_expect(((Int)(Unsigned(ENV_YREG) - Unsigned(HR)) < CreepFlag ), 0) ) return external_labels[8]; @@ -76,15 +76,15 @@ #ifdef YAPOR #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -114,15 +114,15 @@ #else /* YAPOR */ #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -152,15 +152,15 @@ #ifdef YAPOR #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -190,15 +190,15 @@ #else /* YAPOR */ #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -230,15 +230,15 @@ #ifdef YAPOR #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -265,15 +265,15 @@ #else /* YAPOR */ #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -304,15 +304,15 @@ #ifdef YAPOR #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -331,15 +331,15 @@ #else /* YAPOR */ #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -358,15 +358,15 @@ #ifdef YAPOR #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -385,15 +385,15 @@ #else /* YAPOR */ #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -414,15 +414,15 @@ #ifdef YAPOR #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -438,15 +438,15 @@ #else /* YAPOR */ #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -468,16 +468,16 @@ #ifdef YAPOR #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -507,16 +507,16 @@ #else /* YAPOR */ #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -546,16 +546,16 @@ #ifdef YAPOR #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -585,16 +585,16 @@ #else /* YAPOR */ #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -626,16 +626,16 @@ #ifdef YAPOR #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -662,16 +662,16 @@ #else /* YAPOR */ #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -702,16 +702,16 @@ #ifdef YAPOR #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -730,16 +730,16 @@ #else /* YAPOR */ #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -758,16 +758,16 @@ #ifdef YAPOR #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -786,16 +786,16 @@ #else /* YAPOR */ #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -816,16 +816,16 @@ #ifdef YAPOR #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -841,16 +841,16 @@ #else /* YAPOR */ #define _call_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -876,10 +876,10 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -911,10 +911,10 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -946,10 +946,10 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -981,10 +981,10 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -1018,10 +1018,10 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -1050,10 +1050,10 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -1086,10 +1086,10 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -1110,10 +1110,10 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -1134,10 +1134,10 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -1158,10 +1158,10 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -1184,10 +1184,10 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -1205,10 +1205,10 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -1232,11 +1232,11 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -1268,11 +1268,11 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -1304,11 +1304,11 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -1340,11 +1340,11 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -1378,11 +1378,11 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -1411,11 +1411,11 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -1448,11 +1448,11 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -1473,11 +1473,11 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -1498,11 +1498,11 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -1523,11 +1523,11 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -1550,11 +1550,11 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -1572,11 +1572,11 @@ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); \ check_stack_on_call; \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ @@ -1601,7 +1601,7 @@ { \ PredEntry *pt0; \ CACHE_Y_AS_ENV(YREG); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -1632,7 +1632,7 @@ { \ PredEntry *pt0; \ CACHE_Y_AS_ENV(YREG); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -1653,7 +1653,7 @@ { \ PredEntry *pt0; \ CACHE_Y_AS_ENV(YREG); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -1685,7 +1685,7 @@ { \ PredEntry *pt0; \ CACHE_Y_AS_ENV(YREG); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -1709,7 +1709,7 @@ { \ PredEntry *pt0; \ CACHE_Y_AS_ENV(YREG); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -1737,7 +1737,7 @@ { \ PredEntry *pt0; \ CACHE_Y_AS_ENV(YREG); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -1755,7 +1755,7 @@ { \ PredEntry *pt0; \ CACHE_Y_AS_ENV(YREG); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -1784,7 +1784,7 @@ { \ PredEntry *pt0; \ CACHE_Y_AS_ENV(YREG); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -1807,13 +1807,13 @@ #ifdef YAPOR_SBA #define _dexecute_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.pp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.pp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (DEPTH <= MkIntTerm(1)) { \ if (pt0->ModuleOfPred) { \ if (DEPTH == MkIntTerm(0)) { \ @@ -1847,13 +1847,13 @@ #else /* YAPOR_SBA */ #define _dexecute_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.pp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.pp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (DEPTH <= MkIntTerm(1)) { \ if (pt0->ModuleOfPred) { \ if (DEPTH == MkIntTerm(0)) { \ @@ -1888,13 +1888,13 @@ #else /* FROZEN_STACKS */ #define _dexecute_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.pp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.pp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (DEPTH <= MkIntTerm(1)) { \ if (pt0->ModuleOfPred) { \ if (DEPTH == MkIntTerm(0)) { \ @@ -1928,13 +1928,13 @@ #ifdef YAPOR_SBA #define _dexecute_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.pp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.pp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ (*_PREG) = pt0->CodeOfPred; \ save_pc(); \ (*_CPREG) = (yamop *) ENV_YREG[E_CP]; \ @@ -1956,13 +1956,13 @@ #else /* YAPOR_SBA */ #define _dexecute_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.pp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.pp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ (*_PREG) = pt0->CodeOfPred; \ save_pc(); \ (*_CPREG) = (yamop *) ENV_YREG[E_CP]; \ @@ -1985,13 +1985,13 @@ #else /* FROZEN_STACKS */ #define _dexecute_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.pp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.pp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ (*_PREG) = pt0->CodeOfPred; \ save_pc(); \ (*_CPREG) = (yamop *) ENV_YREG[E_CP]; \ @@ -2015,13 +2015,13 @@ #ifdef YAPOR_SBA #define _dexecute_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.pp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.pp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ check_stack_on_dexecute; \ if (DEPTH <= MkIntTerm(1)) { \ if (pt0->ModuleOfPred) { \ @@ -2056,13 +2056,13 @@ #else /* YAPOR_SBA */ #define _dexecute_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.pp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.pp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ check_stack_on_dexecute; \ if (DEPTH <= MkIntTerm(1)) { \ if (pt0->ModuleOfPred) { \ @@ -2098,13 +2098,13 @@ #else /* FROZEN_STACKS */ #define _dexecute_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.pp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.pp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ check_stack_on_dexecute; \ if (DEPTH <= MkIntTerm(1)) { \ if (pt0->ModuleOfPred) { \ @@ -2139,13 +2139,13 @@ #ifdef YAPOR_SBA #define _dexecute_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.pp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.pp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ check_stack_on_dexecute; \ (*_PREG) = pt0->CodeOfPred; \ save_pc(); \ @@ -2168,13 +2168,13 @@ #else /* YAPOR_SBA */ #define _dexecute_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.pp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.pp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ check_stack_on_dexecute; \ (*_PREG) = pt0->CodeOfPred; \ save_pc(); \ @@ -2198,13 +2198,13 @@ #else /* FROZEN_STACKS */ #define _dexecute_instinit \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.pp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.pp.p,XREGS+1); \ } \ CACHE_Y_AS_ENV(YREG); \ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ check_stack_on_dexecute; \ (*_PREG) = pt0->CodeOfPred; \ save_pc(); \ @@ -2234,7 +2234,7 @@ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (DEPTH <= MkIntTerm(1)) { \ if (pt0->ModuleOfPred) { \ if (DEPTH == MkIntTerm(0)) { \ @@ -2271,7 +2271,7 @@ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (DEPTH <= MkIntTerm(1)) { \ if (pt0->ModuleOfPred) { \ if (DEPTH == MkIntTerm(0)) { \ @@ -2309,7 +2309,7 @@ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (DEPTH <= MkIntTerm(1)) { \ if (pt0->ModuleOfPred) { \ if (DEPTH == MkIntTerm(0)) { \ @@ -2346,7 +2346,7 @@ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ (*_PREG) = pt0->CodeOfPred; \ save_pc(); \ (*_CPREG) = (yamop *) ENV_YREG[E_CP]; \ @@ -2371,7 +2371,7 @@ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ (*_PREG) = pt0->CodeOfPred; \ save_pc(); \ (*_CPREG) = (yamop *) ENV_YREG[E_CP]; \ @@ -2397,7 +2397,7 @@ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ (*_PREG) = pt0->CodeOfPred; \ save_pc(); \ (*_CPREG) = (yamop *) ENV_YREG[E_CP]; \ @@ -2424,7 +2424,7 @@ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ check_stack_on_dexecute; \ if (DEPTH <= MkIntTerm(1)) { \ if (pt0->ModuleOfPred) { \ @@ -2462,7 +2462,7 @@ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ check_stack_on_dexecute; \ if (DEPTH <= MkIntTerm(1)) { \ if (pt0->ModuleOfPred) { \ @@ -2501,7 +2501,7 @@ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ check_stack_on_dexecute; \ if (DEPTH <= MkIntTerm(1)) { \ if (pt0->ModuleOfPred) { \ @@ -2539,7 +2539,7 @@ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ check_stack_on_dexecute; \ (*_PREG) = pt0->CodeOfPred; \ save_pc(); \ @@ -2565,7 +2565,7 @@ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ check_stack_on_dexecute; \ (*_PREG) = pt0->CodeOfPred; \ save_pc(); \ @@ -2592,7 +2592,7 @@ { \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ check_stack_on_dexecute; \ (*_PREG) = pt0->CodeOfPred; \ save_pc(); \ diff --git a/JIT/HPP/singlecode_cpred.h b/JIT/HPP/singlecode_cpred.h index 5787c9420..cd45f8071 100644 --- a/JIT/HPP/singlecode_cpred.h +++ b/JIT/HPP/singlecode_cpred.h @@ -4,7 +4,7 @@ #ifdef YAPOR_SBA #define _call_cpred_instinit \ check_trail(TR); \ - if (!((*_PREG)->y_u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ + if (!((*_PREG)->u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ CACHE_Y_AS_ENV(YREG); \ check_stack_on_call; \ ENDCACHE_Y_AS_ENV(); \ @@ -15,13 +15,13 @@ if (YREG > (CELL *) top_b || YREG < HR) \ ASP = (CELL *)top_b; \ else \ - ASP = (CELL *)(((char *)YREG) + (*_PREG)->y_u.Osbpp.s); \ + ASP = (CELL *)(((char *)YREG) + (*_PREG)->u.Osbpp.s); \ } \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ BEGD(d0); \ - CPredicate f = (*_PREG)->y_u.Osbpp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.Osbpp.p->cs.f_code; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -36,7 +36,7 @@ #else /* YAPOR_SBA */ #define _call_cpred_instinit \ check_trail(TR); \ - if (!((*_PREG)->y_u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ + if (!((*_PREG)->u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ CACHE_Y_AS_ENV(YREG); \ check_stack_on_call; \ ENDCACHE_Y_AS_ENV(); \ @@ -47,13 +47,13 @@ if (YREG > (CELL *) top_b) \ ASP = (CELL *)top_b; \ else \ - ASP = (CELL *)(((char *)YREG) + (*_PREG)->y_u.Osbpp.s); \ + ASP = (CELL *)(((char *)YREG) + (*_PREG)->u.Osbpp.s); \ } \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ BEGD(d0); \ - CPredicate f = (*_PREG)->y_u.Osbpp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.Osbpp.p->cs.f_code; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -69,17 +69,17 @@ #else /* FROZEN_STACKS */ #define _call_cpred_instinit \ check_trail(TR); \ - if (!((*_PREG)->y_u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ + if (!((*_PREG)->u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ CACHE_Y_AS_ENV(YREG); \ check_stack_on_call; \ ENDCACHE_Y_AS_ENV(); \ } \ - SET_ASP(YREG, (*_PREG)->y_u.Osbpp.s); \ + SET_ASP(YREG, (*_PREG)->u.Osbpp.s); \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ BEGD(d0); \ - CPredicate f = (*_PREG)->y_u.Osbpp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.Osbpp.p->cs.f_code; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -97,7 +97,7 @@ #ifdef YAPOR_SBA #define _call_cpred_instinit \ check_trail(TR); \ - if (!((*_PREG)->y_u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ + if (!((*_PREG)->u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ CACHE_Y_AS_ENV(YREG); \ check_stack_on_call; \ ENDCACHE_Y_AS_ENV(); \ @@ -108,10 +108,10 @@ if (YREG > (CELL *) top_b || YREG < HR) \ ASP = (CELL *)top_b; \ else \ - ASP = (CELL *)(((char *)YREG) + (*_PREG)->y_u.Osbpp.s); \ + ASP = (CELL *)(((char *)YREG) + (*_PREG)->u.Osbpp.s); \ } \ BEGD(d0); \ - CPredicate f = (*_PREG)->y_u.Osbpp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.Osbpp.p->cs.f_code; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -126,7 +126,7 @@ #else /* YAPOR_SBA */ #define _call_cpred_instinit \ check_trail(TR); \ - if (!((*_PREG)->y_u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ + if (!((*_PREG)->u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ CACHE_Y_AS_ENV(YREG); \ check_stack_on_call; \ ENDCACHE_Y_AS_ENV(); \ @@ -137,10 +137,10 @@ if (YREG > (CELL *) top_b) \ ASP = (CELL *)top_b; \ else \ - ASP = (CELL *)(((char *)YREG) + (*_PREG)->y_u.Osbpp.s); \ + ASP = (CELL *)(((char *)YREG) + (*_PREG)->u.Osbpp.s); \ } \ BEGD(d0); \ - CPredicate f = (*_PREG)->y_u.Osbpp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.Osbpp.p->cs.f_code; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -156,14 +156,14 @@ #else /* FROZEN_STACKS */ #define _call_cpred_instinit \ check_trail(TR); \ - if (!((*_PREG)->y_u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ + if (!((*_PREG)->u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ CACHE_Y_AS_ENV(YREG); \ check_stack_on_call; \ ENDCACHE_Y_AS_ENV(); \ } \ - SET_ASP(YREG, (*_PREG)->y_u.Osbpp.s); \ + SET_ASP(YREG, (*_PREG)->u.Osbpp.s); \ BEGD(d0); \ - CPredicate f = (*_PREG)->y_u.Osbpp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.Osbpp.p->cs.f_code; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -183,7 +183,7 @@ #ifdef YAPOR_SBA #define _call_cpred_instinit \ check_trail(TR); \ - if (!((*_PREG)->y_u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ + if (!((*_PREG)->u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ CACHE_Y_AS_ENV(YREG); \ check_stack_on_call; \ ENDCACHE_Y_AS_ENV(); \ @@ -194,13 +194,13 @@ if (YREG > (CELL *) top_b || YREG < HR) \ ASP = (CELL *)top_b; \ else \ - ASP = (CELL *)(((char *)YREG) + (*_PREG)->y_u.Osbpp.s); \ + ASP = (CELL *)(((char *)YREG) + (*_PREG)->u.Osbpp.s); \ } \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ BEGD(d0); \ - CPredicate f = (*_PREG)->y_u.Osbpp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.Osbpp.p->cs.f_code; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -214,7 +214,7 @@ #else /* YAPOR_SBA */ #define _call_cpred_instinit \ check_trail(TR); \ - if (!((*_PREG)->y_u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ + if (!((*_PREG)->u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ CACHE_Y_AS_ENV(YREG); \ check_stack_on_call; \ ENDCACHE_Y_AS_ENV(); \ @@ -225,13 +225,13 @@ if (YREG > (CELL *) top_b) \ ASP = (CELL *)top_b; \ else \ - ASP = (CELL *)(((char *)YREG) + (*_PREG)->y_u.Osbpp.s); \ + ASP = (CELL *)(((char *)YREG) + (*_PREG)->u.Osbpp.s); \ } \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ BEGD(d0); \ - CPredicate f = (*_PREG)->y_u.Osbpp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.Osbpp.p->cs.f_code; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -246,17 +246,17 @@ #else /* FROZEN_STACKS */ #define _call_cpred_instinit \ check_trail(TR); \ - if (!((*_PREG)->y_u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ + if (!((*_PREG)->u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ CACHE_Y_AS_ENV(YREG); \ check_stack_on_call; \ ENDCACHE_Y_AS_ENV(); \ } \ - SET_ASP(YREG, (*_PREG)->y_u.Osbpp.s); \ + SET_ASP(YREG, (*_PREG)->u.Osbpp.s); \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ BEGD(d0); \ - CPredicate f = (*_PREG)->y_u.Osbpp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.Osbpp.p->cs.f_code; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -273,7 +273,7 @@ #ifdef YAPOR_SBA #define _call_cpred_instinit \ check_trail(TR); \ - if (!((*_PREG)->y_u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ + if (!((*_PREG)->u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ CACHE_Y_AS_ENV(YREG); \ check_stack_on_call; \ ENDCACHE_Y_AS_ENV(); \ @@ -284,10 +284,10 @@ if (YREG > (CELL *) top_b || YREG < HR) \ ASP = (CELL *)top_b; \ else \ - ASP = (CELL *)(((char *)YREG) + (*_PREG)->y_u.Osbpp.s); \ + ASP = (CELL *)(((char *)YREG) + (*_PREG)->u.Osbpp.s); \ } \ BEGD(d0); \ - CPredicate f = (*_PREG)->y_u.Osbpp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.Osbpp.p->cs.f_code; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -301,7 +301,7 @@ #else /* YAPOR_SBA */ #define _call_cpred_instinit \ check_trail(TR); \ - if (!((*_PREG)->y_u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ + if (!((*_PREG)->u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ CACHE_Y_AS_ENV(YREG); \ check_stack_on_call; \ ENDCACHE_Y_AS_ENV(); \ @@ -312,10 +312,10 @@ if (YREG > (CELL *) top_b) \ ASP = (CELL *)top_b; \ else \ - ASP = (CELL *)(((char *)YREG) + (*_PREG)->y_u.Osbpp.s); \ + ASP = (CELL *)(((char *)YREG) + (*_PREG)->u.Osbpp.s); \ } \ BEGD(d0); \ - CPredicate f = (*_PREG)->y_u.Osbpp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.Osbpp.p->cs.f_code; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -330,14 +330,14 @@ #else /* FROZEN_STACKS */ #define _call_cpred_instinit \ check_trail(TR); \ - if (!((*_PREG)->y_u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ + if (!((*_PREG)->u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ CACHE_Y_AS_ENV(YREG); \ check_stack_on_call; \ ENDCACHE_Y_AS_ENV(); \ } \ - SET_ASP(YREG, (*_PREG)->y_u.Osbpp.s); \ + SET_ASP(YREG, (*_PREG)->u.Osbpp.s); \ BEGD(d0); \ - CPredicate f = (*_PREG)->y_u.Osbpp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.Osbpp.p->cs.f_code; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -373,7 +373,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -396,7 +396,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -434,7 +434,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -457,7 +457,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -488,7 +488,7 @@ BEGD(d0); \ CACHE_Y_AS_ENV(YREG); \ SET_ASP(YREG, E_CB*sizeof(CELL)); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -511,7 +511,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -552,7 +552,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -563,7 +563,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -600,7 +600,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -611,7 +611,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -641,7 +641,7 @@ BEGD(d0); \ CACHE_Y_AS_ENV(YREG); \ SET_ASP(YREG, E_CB*sizeof(CELL)); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -652,7 +652,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -694,7 +694,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -718,7 +718,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -756,7 +756,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -780,7 +780,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -811,7 +811,7 @@ BEGD(d0); \ CACHE_Y_AS_ENV(YREG); \ SET_ASP(YREG, E_CB*sizeof(CELL)); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -835,7 +835,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -876,7 +876,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -888,7 +888,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -925,7 +925,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -937,7 +937,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -967,7 +967,7 @@ BEGD(d0); \ CACHE_Y_AS_ENV(YREG); \ SET_ASP(YREG, E_CB*sizeof(CELL)); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -979,7 +979,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -1023,7 +1023,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -1046,7 +1046,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -1083,7 +1083,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -1106,7 +1106,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -1136,7 +1136,7 @@ BEGD(d0); \ CACHE_Y_AS_ENV(YREG); \ SET_ASP(YREG, E_CB*sizeof(CELL)); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -1159,7 +1159,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -1199,7 +1199,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -1210,7 +1210,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -1246,7 +1246,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -1257,7 +1257,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -1286,7 +1286,7 @@ BEGD(d0); \ CACHE_Y_AS_ENV(YREG); \ SET_ASP(YREG, E_CB*sizeof(CELL)); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -1297,7 +1297,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -1338,7 +1338,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -1362,7 +1362,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -1399,7 +1399,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -1423,7 +1423,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -1453,7 +1453,7 @@ BEGD(d0); \ CACHE_Y_AS_ENV(YREG); \ SET_ASP(YREG, E_CB*sizeof(CELL)); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -1477,7 +1477,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -1517,7 +1517,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -1529,7 +1529,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -1565,7 +1565,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -1577,7 +1577,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -1606,7 +1606,7 @@ BEGD(d0); \ CACHE_Y_AS_ENV(YREG); \ SET_ASP(YREG, E_CB*sizeof(CELL)); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ if (Yap_do_low_level_trace) { \ low_level_trace(enter_pred,pt0,XREGS+1); \ } \ @@ -1618,7 +1618,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -1663,7 +1663,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -1683,7 +1683,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -1721,7 +1721,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -1741,7 +1741,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -1772,7 +1772,7 @@ BEGD(d0); \ CACHE_Y_AS_ENV(YREG); \ SET_ASP(YREG, E_CB*sizeof(CELL)); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -1792,7 +1792,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -1833,7 +1833,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -1841,7 +1841,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -1878,7 +1878,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -1886,7 +1886,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -1916,7 +1916,7 @@ BEGD(d0); \ CACHE_Y_AS_ENV(YREG); \ SET_ASP(YREG, E_CB*sizeof(CELL)); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -1924,7 +1924,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -1966,7 +1966,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -1987,7 +1987,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -2025,7 +2025,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -2046,7 +2046,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -2077,7 +2077,7 @@ BEGD(d0); \ CACHE_Y_AS_ENV(YREG); \ SET_ASP(YREG, E_CB*sizeof(CELL)); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -2098,7 +2098,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -2139,7 +2139,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -2148,7 +2148,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -2185,7 +2185,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -2194,7 +2194,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -2224,7 +2224,7 @@ BEGD(d0); \ CACHE_Y_AS_ENV(YREG); \ SET_ASP(YREG, E_CB*sizeof(CELL)); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -2233,7 +2233,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -2277,7 +2277,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -2297,7 +2297,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -2334,7 +2334,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -2354,7 +2354,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -2384,7 +2384,7 @@ BEGD(d0); \ CACHE_Y_AS_ENV(YREG); \ SET_ASP(YREG, E_CB*sizeof(CELL)); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -2404,7 +2404,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -2444,7 +2444,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -2452,7 +2452,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -2488,7 +2488,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -2496,7 +2496,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -2525,7 +2525,7 @@ BEGD(d0); \ CACHE_Y_AS_ENV(YREG); \ SET_ASP(YREG, E_CB*sizeof(CELL)); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -2533,7 +2533,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -2574,7 +2574,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -2595,7 +2595,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -2632,7 +2632,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -2653,7 +2653,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -2683,7 +2683,7 @@ BEGD(d0); \ CACHE_Y_AS_ENV(YREG); \ SET_ASP(YREG, E_CB*sizeof(CELL)); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -2704,7 +2704,7 @@ DEPTH -= MkIntConstant(2); \ } \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -2744,7 +2744,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -2753,7 +2753,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -2789,7 +2789,7 @@ ASP = YREG+E_CB; \ } \ } \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -2798,7 +2798,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -2827,7 +2827,7 @@ BEGD(d0); \ CACHE_Y_AS_ENV(YREG); \ SET_ASP(YREG, E_CB*sizeof(CELL)); \ - pt0 = (*_PREG)->y_u.pp.p; \ + pt0 = (*_PREG)->u.pp.p; \ CACHE_A1(); \ BEGD(d0); \ d0 = (CELL)B; \ @@ -2836,7 +2836,7 @@ ENV_YREG[E_CB] = d0; \ ENDD(d0); \ { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -2870,21 +2870,21 @@ check_stack_on_call; \ ENDCACHE_Y_AS_ENV(); \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ { \ choiceptr top_b = PROTECT_FROZEN_B(B); \ if (YREG > (CELL *) top_b || YREG < HR) \ ASP = (CELL *) top_b; \ else \ - ASP = (CELL *)(((char *)YREG) + (*_PREG)->y_u.Osbpp.s); \ + ASP = (CELL *)(((char *)YREG) + (*_PREG)->u.Osbpp.s); \ } \ { \ yamop *savedP; \ Yap_StartSlots( PASS_REGS1 ); \ LOCAL_PrologMode = UserCCallMode; \ { \ - PredEntry *p = (*_PREG)->y_u.Osbpp.p; \ + PredEntry *p = (*_PREG)->u.Osbpp.p; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ savedP = (*_PREG); \ saveregs(); \ @@ -2914,21 +2914,21 @@ check_stack_on_call; \ ENDCACHE_Y_AS_ENV(); \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ { \ choiceptr top_b = PROTECT_FROZEN_B(B); \ if (YREG > (CELL *) top_b) \ ASP = (CELL *) top_b; \ else \ - ASP = (CELL *)(((char *)YREG) + (*_PREG)->y_u.Osbpp.s); \ + ASP = (CELL *)(((char *)YREG) + (*_PREG)->u.Osbpp.s); \ } \ { \ yamop *savedP; \ Yap_StartSlots( PASS_REGS1 ); \ LOCAL_PrologMode = UserCCallMode; \ { \ - PredEntry *p = (*_PREG)->y_u.Osbpp.p; \ + PredEntry *p = (*_PREG)->u.Osbpp.p; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ savedP = (*_PREG); \ saveregs(); \ @@ -2959,15 +2959,15 @@ check_stack_on_call; \ ENDCACHE_Y_AS_ENV(); \ if (Yap_do_low_level_trace) { \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); \ + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); \ } \ - SET_ASP(YREG, (*_PREG)->y_u.Osbpp.s); \ + SET_ASP(YREG, (*_PREG)->u.Osbpp.s); \ { \ yamop *savedP; \ Yap_StartSlots( PASS_REGS1 ); \ LOCAL_PrologMode = UserCCallMode; \ { \ - PredEntry *p = (*_PREG)->y_u.Osbpp.p; \ + PredEntry *p = (*_PREG)->u.Osbpp.p; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ savedP = (*_PREG); \ saveregs(); \ @@ -3004,14 +3004,14 @@ if (YREG > (CELL *) top_b || YREG < HR) \ ASP = (CELL *) top_b; \ else \ - ASP = (CELL *)(((char *)YREG) + (*_PREG)->y_u.Osbpp.s); \ + ASP = (CELL *)(((char *)YREG) + (*_PREG)->u.Osbpp.s); \ } \ { \ yamop *savedP; \ Yap_StartSlots( PASS_REGS1 ); \ LOCAL_PrologMode = UserCCallMode; \ { \ - PredEntry *p = (*_PREG)->y_u.Osbpp.p; \ + PredEntry *p = (*_PREG)->u.Osbpp.p; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ savedP = (*_PREG); \ saveregs(); \ @@ -3045,14 +3045,14 @@ if (YREG > (CELL *) top_b) \ ASP = (CELL *) top_b; \ else \ - ASP = (CELL *)(((char *)YREG) + (*_PREG)->y_u.Osbpp.s); \ + ASP = (CELL *)(((char *)YREG) + (*_PREG)->u.Osbpp.s); \ } \ { \ yamop *savedP; \ Yap_StartSlots( PASS_REGS1 ); \ LOCAL_PrologMode = UserCCallMode; \ { \ - PredEntry *p = (*_PREG)->y_u.Osbpp.p; \ + PredEntry *p = (*_PREG)->u.Osbpp.p; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ savedP = (*_PREG); \ saveregs(); \ @@ -3082,13 +3082,13 @@ CACHE_Y_AS_ENV(YREG); \ check_stack_on_call; \ ENDCACHE_Y_AS_ENV(); \ - SET_ASP(YREG, (*_PREG)->y_u.Osbpp.s); \ + SET_ASP(YREG, (*_PREG)->u.Osbpp.s); \ { \ yamop *savedP; \ Yap_StartSlots( PASS_REGS1 ); \ LOCAL_PrologMode = UserCCallMode; \ { \ - PredEntry *p = (*_PREG)->y_u.Osbpp.p; \ + PredEntry *p = (*_PREG)->u.Osbpp.p; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ savedP = (*_PREG); \ saveregs(); \ diff --git a/JIT/HPP/singlecode_cut.h b/JIT/HPP/singlecode_cut.h index 22e90bb46..659e2683d 100644 --- a/JIT/HPP/singlecode_cut.h +++ b/JIT/HPP/singlecode_cut.h @@ -1,6 +1,6 @@ #if (defined(YAPOR_SBA) && defined(YAPOR)) || defined(TABLING) #define check_stack_on_cut \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) return external_labels[1]; + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) return external_labels[1]; #else #define check_stack_on_cut \ if (__builtin_expect(((Int)(Unsigned(ENV_YREG) - Unsigned(HR)) < CreepFlag ), 0) ) return external_labels[1]; @@ -8,7 +8,7 @@ #if (defined(YAPOR_SBA) && defined(YAPOR)) || defined(TABLING) #define check_stack_on_cutt \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) return external_labels[3]; + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) return external_labels[3]; #else #define check_stack_on_cutt \ if (__builtin_expect(((Int)(Unsigned(ENV_YREG) - Unsigned(HR)) < CreepFlag ), 0) ) return external_labels[3]; @@ -16,7 +16,7 @@ #if (defined(YAPOR_SBA) && defined(YAPOR)) || defined(TABLING) #define check_stack_on_commitx \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) return external_labels[11]; + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) return external_labels[11]; #else #define check_stack_on_commitx \ if (__builtin_expect(((Int)(Unsigned(ENV_YREG) - Unsigned(HR)) < CreepFlag ), 0) ) return external_labels[11]; @@ -30,7 +30,7 @@ ENDCACHE_Y_AS_ENV(); \ } \ do_cut: \ - SET_ASP(YREG, (*_PREG)->y_u.s.s); \ + SET_ASP(YREG, (*_PREG)->u.s.s); \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), s),Osbpp),l); \ saveregs(); \ prune((choiceptr)YREG[E_CB]); \ @@ -38,7 +38,7 @@ GONEXT(); #else /* COROUTINING */ #define _cut_instinit \ - SET_ASP(YREG, (*_PREG)->y_u.s.s); \ + SET_ASP(YREG, (*_PREG)->u.s.s); \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), s),Osbpp),l); \ saveregs(); \ prune((choiceptr)YREG[E_CB]); \ @@ -54,7 +54,7 @@ ENDCACHE_Y_AS_ENV(); \ } \ do_cut_t: \ - SET_ASP(YREG, (*_PREG)->y_u.s.s); \ + SET_ASP(YREG, (*_PREG)->u.s.s); \ saveregs(); \ prune((choiceptr)YREG[E_CB]); \ setregs(); \ @@ -62,7 +62,7 @@ GONEXT(); #else /* COROUTINING */ #define _cut_t_instinit \ - SET_ASP(YREG, (*_PREG)->y_u.s.s); \ + SET_ASP(YREG, (*_PREG)->u.s.s); \ saveregs(); \ prune((choiceptr)YREG[E_CB]); \ setregs(); \ @@ -80,7 +80,7 @@ #endif #define CUT_E_NOCOROUTINING \ - SET_ASP(YREG, (*_PREG)->y_u.s.s); \ + SET_ASP(YREG, (*_PREG)->u.s.s); \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), s),Osbpp),l); \ saveregs(); \ prune((choiceptr)(*_SREG)[E_CB]); \ @@ -90,7 +90,7 @@ #if defined(YAPOR_SBA) && defined(FROZEN_STACKS) #define _save_b_x_instinit \ BEGD(d0); \ - d0 = (*_PREG)->y_u.x.x; \ + d0 = (*_PREG)->u.x.x; \ XREG(d0) = MkIntegerTerm((Int)B); \ (*_PREG) = NEXTOP((*_PREG), x); \ ENDD(d0); \ @@ -98,7 +98,7 @@ #else /* defined(YAPOR_SBA) && defined(FROZEN_STACKS) */ #define _save_b_x_instinit \ BEGD(d0); \ - d0 = (*_PREG)->y_u.x.x; \ + d0 = (*_PREG)->u.x.x; \ XREG(d0) = MkIntegerTerm(LCL0-(CELL *) (B)); \ (*_PREG) = NEXTOP((*_PREG), x); \ ENDD(d0); \ @@ -107,12 +107,12 @@ #if defined(YAPOR_SBA) #define _save_b_y_instinit \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.y.y,MkIntegerTerm((Int)B)); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.y.y,MkIntegerTerm((Int)B)); \ (*_PREG) = NEXTOP((*_PREG), y); \ GONEXT(); #else /* defined(YAPOR_SBA) */ #define _save_b_y_instinit \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.y.y,MkIntegerTerm(LCL0-(CELL *)(B))); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.y.y,MkIntegerTerm(LCL0-(CELL *)(B))); \ (*_PREG) = NEXTOP((*_PREG), y); \ GONEXT(); #endif /* defined(YAPOR_SBA) */ @@ -125,10 +125,10 @@ ENDCACHE_Y_AS_ENV(); \ do_commit_b_x: \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.xps.x); \ + d0 = XREG((*_PREG)->u.xps.x); \ deref_head(d0, commit_b_x_unk); \ commit_b_x_nvar: \ - SET_ASP(YREG, (*_PREG)->y_u.xps.s); \ + SET_ASP(YREG, (*_PREG)->u.xps.s); \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xps),Osbpp),l); \ { \ choiceptr pt0; \ @@ -151,10 +151,10 @@ ENDCACHE_Y_AS_ENV(); \ do_commit_b_x: \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.xps.x); \ + d0 = XREG((*_PREG)->u.xps.x); \ deref_head(d0, commit_b_x_unk); \ commit_b_x_nvar: \ - SET_ASP(YREG, (*_PREG)->y_u.xps.s); \ + SET_ASP(YREG, (*_PREG)->u.xps.s); \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xps),Osbpp),l); \ { \ choiceptr pt0; \ @@ -175,10 +175,10 @@ #if defined(YAPOR_SBA) && defined(FROZEN_STACKS) #define _commit_b_x_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.xps.x); \ + d0 = XREG((*_PREG)->u.xps.x); \ deref_head(d0, commit_b_x_unk); \ commit_b_x_nvar: \ - SET_ASP(YREG, (*_PREG)->y_u.xps.s); \ + SET_ASP(YREG, (*_PREG)->u.xps.s); \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xps),Osbpp),l); \ { \ choiceptr pt0; \ @@ -197,10 +197,10 @@ #else /* defined(YAPOR_SBA) && defined(FROZEN_STACKS) */ #define _commit_b_x_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.xps.x); \ + d0 = XREG((*_PREG)->u.xps.x); \ deref_head(d0, commit_b_x_unk); \ commit_b_x_nvar: \ - SET_ASP(YREG, (*_PREG)->y_u.xps.s); \ + SET_ASP(YREG, (*_PREG)->u.xps.s); \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xps),Osbpp),l); \ { \ choiceptr pt0; \ @@ -224,10 +224,10 @@ register CELL *pt1; #define COMMIT_B_Y_DO_COMMIT_B_Y \ - d0 = YREG[(*_PREG)->y_u.yps.y]; + d0 = YREG[(*_PREG)->u.yps.y]; #define COMMIT_B_Y_COMMIT_B_Y_NVAR \ - SET_ASP(YREG, (*_PREG)->y_u.yps.s); \ + SET_ASP(YREG, (*_PREG)->u.yps.s); \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yps),Osbpp),l); \ choiceptr pt0; diff --git a/JIT/HPP/singlecode_get.h b/JIT/HPP/singlecode_get.h index d24666050..6022601a5 100644 --- a/JIT/HPP/singlecode_get.h +++ b/JIT/HPP/singlecode_get.h @@ -1,15 +1,15 @@ #define _get_x_var_instinit \ register CELL d0; \ - d0 = XREG((*_PREG)->y_u.xx.xr); \ - XREG((*_PREG)->y_u.xx.xl) = d0; \ + d0 = XREG((*_PREG)->u.xx.xr); \ + XREG((*_PREG)->u.xx.xl) = d0; \ (*_PREG) = NEXTOP((*_PREG), xx); \ GONEXT(); #define _get_y_var_instinit \ register CELL d0; \ register CELL *pt0; \ - pt0 = YREG + (*_PREG)->y_u.yx.y; \ - d0 = XREG((*_PREG)->y_u.yx.x); \ + pt0 = YREG + (*_PREG)->u.yx.y; \ + d0 = XREG((*_PREG)->u.yx.x); \ (*_PREG) = NEXTOP((*_PREG), yx); \ INITIALIZE_PERMVAR(pt0,d0); \ GONEXT(); @@ -18,10 +18,10 @@ register CELL d0, d1; \ register CELL *pt0, *pt1; \ CACHE_Y(YREG); \ - pt0 = S_YREG + (*_PREG)->y_u.yyxx.y1; \ - d0 = XREG((*_PREG)->y_u.yyxx.x1); \ - pt1 = S_YREG + (*_PREG)->y_u.yyx.y2; \ - d1 = XREG((*_PREG)->y_u.yyxx.x2); \ + pt0 = S_YREG + (*_PREG)->u.yyxx.y1; \ + d0 = XREG((*_PREG)->u.yyxx.x1); \ + pt1 = S_YREG + (*_PREG)->u.yyx.y2; \ + d1 = XREG((*_PREG)->u.yyxx.x2); \ (*_PREG) = NEXTOP((*_PREG), yyxx); \ INITIALIZE_PERMVAR(pt0,d0); \ INITIALIZE_PERMVAR(pt1,d1); \ @@ -30,12 +30,12 @@ #define _get_x_val_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.xx.xl); \ + d0 = XREG((*_PREG)->u.xx.xl); \ deref_head(d0, gvalx_unk); \ \ gvalx_nonvar: \ BEGD(d1); \ - d1 = XREG((*_PREG)->y_u.xx.xr); \ + d1 = XREG((*_PREG)->u.xx.xr); \ deref_head(d1, gvalx_nonvar_unk); \ \ gvalx_nonvar_nonvar: \ @@ -53,7 +53,7 @@ BEGP(pt0); \ deref_body(d0, pt0, gvalx_unk, gvalx_nonvar); \ BEGD(d1); \ - d1 = XREG((*_PREG)->y_u.xx.xr); \ + d1 = XREG((*_PREG)->u.xx.xr); \ deref_head(d1, gvalx_var_unk); \ \ gvalx_var_nonvar: \ @@ -75,12 +75,12 @@ BEGD(d0); \ BEGD(d1); \ BEGP(pt0); \ - pt0 = YREG + (*_PREG)->y_u.yx.y; \ + pt0 = YREG + (*_PREG)->u.yx.y; \ d0 = *pt0; \ \ deref_head(d0, gvaly_unk); \ gvaly_nonvar: \ - d1 = XREG((*_PREG)->y_u.yx.x); \ + d1 = XREG((*_PREG)->u.yx.x); \ deref_head(d1, gvaly_nonvar_unk); \ \ gvaly_nonvar_nonvar: \ @@ -95,7 +95,7 @@ ENDP(pt1); \ \ derefa_body(d0, pt0, gvaly_unk, gvaly_nonvar); \ - d1 = XREG((*_PREG)->y_u.yx.x); \ + d1 = XREG((*_PREG)->u.yx.x); \ deref_head(d1, gvaly_var_unk); \ gvaly_var_nonvar: \ (*_PREG) = NEXTOP((*_PREG), yx); \ @@ -115,8 +115,8 @@ #define _get_atom_instinit \ BEGD(d0); \ BEGD(d1); \ - d0 = XREG((*_PREG)->y_u.xc.x); \ - d1 = (*_PREG)->y_u.xc.c; \ + d0 = XREG((*_PREG)->u.xc.x); \ + d1 = (*_PREG)->u.xc.c; \ \ BEGP(pt0); \ deref_head(d0, gatom_unk); \ @@ -145,7 +145,7 @@ BEGP(pt0); \ deref_head(d0, gatom_2unk); \ gatom_2nonvar: \ - if (d0 == (*_PREG)->y_u.cc.c1) { \ + if (d0 == (*_PREG)->u.cc.c1) { \ goto gatom_2b; \ } \ else { \ @@ -153,11 +153,11 @@ } \ \ deref_body(d0, pt0, gatom_2unk, gatom_2nonvar); \ - Bind(pt0, (*_PREG)->y_u.cc.c1); \ + Bind(pt0, (*_PREG)->u.cc.c1); \ ENDP(pt0); \ gatom_2b: \ d0 = ARG2; \ - d1 = (*_PREG)->y_u.cc.c2; \ + d1 = (*_PREG)->u.cc.c2; \ \ BEGP(pt0); \ deref_head(d0, gatom_2bunk); \ @@ -186,7 +186,7 @@ BEGP(pt0); \ deref_head(d0, gatom_3unk); \ gatom_3nonvar: \ - if (d0 == (*_PREG)->y_u.ccc.c1) { \ + if (d0 == (*_PREG)->u.ccc.c1) { \ goto gatom_3b; \ } \ else { \ @@ -194,7 +194,7 @@ } \ \ deref_body(d0, pt0, gatom_3unk, gatom_3nonvar); \ - Bind(pt0, (*_PREG)->y_u.ccc.c1); \ + Bind(pt0, (*_PREG)->u.ccc.c1); \ ENDP(pt0); \ gatom_3b: \ d0 = ARG2; \ @@ -202,7 +202,7 @@ BEGP(pt0); \ deref_head(d0, gatom_3bunk); \ gatom_3bnonvar: \ - if (d0 == (*_PREG)->y_u.ccc.c2) { \ + if (d0 == (*_PREG)->u.ccc.c2) { \ goto gatom_3c; \ } \ else { \ @@ -210,11 +210,11 @@ } \ \ deref_body(d0, pt0, gatom_3bunk, gatom_3bnonvar); \ - Bind(pt0, (*_PREG)->y_u.ccc.c2); \ + Bind(pt0, (*_PREG)->u.ccc.c2); \ ENDP(pt0); \ gatom_3c: \ d0 = ARG3; \ - d1 = (*_PREG)->y_u.ccc.c3; \ + d1 = (*_PREG)->u.ccc.c3; \ \ BEGP(pt0); \ deref_head(d0, gatom_3cunk); \ @@ -241,23 +241,23 @@ d0 = ARG1; #define GET_4ATOMS_GATOM_4UNK \ - Bind(pt0, (*_PREG)->y_u.cccc.c1); + Bind(pt0, (*_PREG)->u.cccc.c1); #define GET_4ATOMS_GATOM_4B \ d0 = ARG2; #define GET_4ATOMS_GATOM_4BUNK \ - Bind(pt0, (*_PREG)->y_u.cccc.c2); + Bind(pt0, (*_PREG)->u.cccc.c2); #define GET_4ATOMS_GATOM_4C \ d0 = ARG3; #define GET_4ATOMS_GATOM_4CUNK \ - Bind(pt0, (*_PREG)->y_u.cccc.c3); + Bind(pt0, (*_PREG)->u.cccc.c3); #define GET_4ATOMS_GATOM_4D \ d0 = ARG4; \ - d1 = (*_PREG)->y_u.cccc.c4; + d1 = (*_PREG)->u.cccc.c4; #define GET_4ATOMS_EQUALS \ (*_PREG) = NEXTOP((*_PREG), cccc); \ @@ -274,29 +274,29 @@ d0 = ARG1; #define GET_5ATOMS_GATOM_5UNK \ - Bind(pt0, (*_PREG)->y_u.ccccc.c1); + Bind(pt0, (*_PREG)->u.ccccc.c1); #define GET_5ATOMS_GATOM_5B \ d0 = ARG2; #define GET_5ATOMS_GATOM_5BUNK \ - Bind(pt0, (*_PREG)->y_u.ccccc.c2); + Bind(pt0, (*_PREG)->u.ccccc.c2); #define GET_5ATOMS_GATOM_5C \ d0 = ARG3; #define GET_5ATOMS_GATOM_5CUNK \ - Bind(pt0, (*_PREG)->y_u.ccccc.c3); + Bind(pt0, (*_PREG)->u.ccccc.c3); #define GET_5ATOMS_GATOM_5D \ d0 = ARG4; #define GET_5ATOMS_GATOM_5DUNK \ - Bind(pt0, (*_PREG)->y_u.ccccc.c4); + Bind(pt0, (*_PREG)->u.ccccc.c4); #define GET_5ATOMS_GATOM_5E \ d0 = ARG5; \ - d1 = (*_PREG)->y_u.ccccc.c5; + d1 = (*_PREG)->u.ccccc.c5; #define GET_5ATOMS_EQUALS \ (*_PREG) = NEXTOP((*_PREG), ccccc); \ @@ -313,35 +313,35 @@ d0 = ARG1; #define GET_6ATOMS_GATOM_6UNK \ - Bind(pt0, (*_PREG)->y_u.cccccc.c1); + Bind(pt0, (*_PREG)->u.cccccc.c1); #define GET_6ATOMS_GATOM_6B \ d0 = ARG2; #define GET_6ATOMS_GATOM_6BUNK \ - Bind(pt0, (*_PREG)->y_u.cccccc.c2); + Bind(pt0, (*_PREG)->u.cccccc.c2); #define GET_6ATOMS_GATOM_6C \ d0 = ARG3; #define GET_6ATOMS_GATOM_6CUNK \ - Bind(pt0, (*_PREG)->y_u.cccccc.c3); + Bind(pt0, (*_PREG)->u.cccccc.c3); #define GET_6ATOMS_GATOM_6D \ d0 = ARG4; #define GET_6ATOMS_GATOM_6DUNK \ - Bind(pt0, (*_PREG)->y_u.cccccc.c4); + Bind(pt0, (*_PREG)->u.cccccc.c4); #define GET_6ATOMS_GATOM_6E \ d0 = ARG5; #define GET_6ATOMS_GATOM_6EUNK \ - Bind(pt0, (*_PREG)->y_u.cccccc.c5); + Bind(pt0, (*_PREG)->u.cccccc.c5); #define GET_6ATOMS_GATOM_6F \ d0 = ARG6; \ - d1 = (*_PREG)->y_u.cccccc.c6; + d1 = (*_PREG)->u.cccccc.c6; #define GET_6ATOMS_EQUALS \ (*_PREG) = NEXTOP((*_PREG), cccccc); \ @@ -354,7 +354,7 @@ #define _get_list_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.x.x); \ + d0 = XREG((*_PREG)->u.x.x); \ deref_head(d0, glist_unk); \ \ glist_nonvar: \ @@ -384,7 +384,7 @@ #define _get_struct_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.xfa.x); \ + d0 = XREG((*_PREG)->u.xfa.x); \ deref_head(d0, gstruct_unk); \ \ gstruct_nonvar: \ @@ -393,7 +393,7 @@ } \ CACHE_S(); \ S_SREG = RepAppl(d0); \ - d0 = (CELL) ((*_PREG)->y_u.xfa.f); \ + d0 = (CELL) ((*_PREG)->u.xfa.f); \ if (*S_SREG != d0) { \ FAIL(); \ } \ @@ -409,9 +409,9 @@ Bind(pt0, d1); \ pt0 = HR; \ ENDD(d1); \ - d0 = (CELL) ((*_PREG)->y_u.xfa.f); \ + d0 = (CELL) ((*_PREG)->u.xfa.f); \ *pt0++ = d0; \ - HR = pt0 + (*_PREG)->y_u.xfa.a; \ + HR = pt0 + (*_PREG)->u.xfa.a; \ (*_PREG) = NEXTOP((*_PREG), xfa); \ (*_SREG) = pt0; \ GONEXTW(); \ @@ -421,7 +421,7 @@ #if SIZEOF_DOUBLE == 2*SIZEOF_INT_P #define _get_float_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.xd.x); \ + d0 = XREG((*_PREG)->u.xd.x); \ deref_head(d0, gfloat_unk); \ \ gfloat_nonvar: \ @@ -434,7 +434,7 @@ FAIL(); \ } \ BEGP(pt1); \ - pt1 = (*_PREG)->y_u.xd.d; \ + pt1 = (*_PREG)->u.xd.d; \ (*_PREG) = NEXTOP((*_PREG), xd); \ if ( \ pt1[1] != pt0[1] \ @@ -449,7 +449,7 @@ BEGP(pt0); \ deref_body(d0, pt0, gfloat_unk, gfloat_nonvar); \ BEGD(d1); \ - d1 = AbsAppl((*_PREG)->y_u.xd.d); \ + d1 = AbsAppl((*_PREG)->u.xd.d); \ (*_PREG) = NEXTOP((*_PREG), xd); \ Bind(pt0, d1); \ GONEXT(); \ @@ -459,7 +459,7 @@ #else /* SIZEOF_DOUBLE == 2*SIZEOF_INT_P */ #define _get_float_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.xd.x); \ + d0 = XREG((*_PREG)->u.xd.x); \ deref_head(d0, gfloat_unk); \ \ gfloat_nonvar: \ @@ -472,7 +472,7 @@ FAIL(); \ } \ BEGP(pt1); \ - pt1 = (*_PREG)->y_u.xd.d; \ + pt1 = (*_PREG)->u.xd.d; \ (*_PREG) = NEXTOP((*_PREG), xd); \ if ( \ pt1[1] != pt0[1] \ @@ -486,7 +486,7 @@ BEGP(pt0); \ deref_body(d0, pt0, gfloat_unk, gfloat_nonvar); \ BEGD(d1); \ - d1 = AbsAppl((*_PREG)->y_u.xd.d); \ + d1 = AbsAppl((*_PREG)->u.xd.d); \ (*_PREG) = NEXTOP((*_PREG), xd); \ Bind(pt0, d1); \ GONEXT(); \ @@ -498,7 +498,7 @@ #define GET_LONGINT_INSTINIT \ register CELL d0, d1; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xi.x); + d0 = XREG((*_PREG)->u.xi.x); #define GET_LONGINT_GLONGINT_NONVAR_INIT \ START_PREFETCH(xi); \ @@ -511,7 +511,7 @@ #define GET_LONGINT_GLONGINT_UNK \ START_PREFETCH(xi); \ - d1 = AbsAppl((*_PREG)->y_u.xi.i); \ + d1 = AbsAppl((*_PREG)->u.xi.i); \ (*_PREG) = NEXTOP((*_PREG), xi); \ Bind(pt0, d1); \ GONext(); \ @@ -521,7 +521,7 @@ #define GET_BIGINT_INSTINIT \ register CELL d0, d1; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xN.x); + d0 = XREG((*_PREG)->u.xN.x); #define GET_BIGINT_GBIGINT_NONVAR_INIT \ START_PREFETCH(xN); \ @@ -534,7 +534,7 @@ #define GET_BIGINT_GBIGINT_UNK \ START_PREFETCH(xN); \ - d1 = (*_PREG)->y_u.xN.b; \ + d1 = (*_PREG)->u.xN.b; \ (*_PREG) = NEXTOP((*_PREG), xN); \ Bind(pt0, d1); \ GONext(); \ @@ -544,17 +544,17 @@ #define GET_DBTERM_INSTINIT \ register CELL d0, d1; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xD.x); + d0 = XREG((*_PREG)->u.xD.x); #define GET_DBTERM_GDBTERM_NONVAR \ BLOCK = (CELL)GET_DBTERM_GDBTERM_NONVAR; \ - d1 = (*_PREG)->y_u.xD.D; \ + d1 = (*_PREG)->u.xD.D; \ (*_PREG) = NEXTOP((*_PREG), xD); \ YAAM_UNIFYBOUND; #define GET_DBTERM_GDBTERM_UNK \ START_PREFETCH(xD); \ - d1 = (*_PREG)->y_u.xD.D; \ + d1 = (*_PREG)->u.xD.D; \ (*_PREG) = NEXTOP((*_PREG), xD); \ Bind(pt0, d1); \ GONext(); \ @@ -562,7 +562,7 @@ #define _glist_valx_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.xx.xl); \ + d0 = XREG((*_PREG)->u.xx.xl); \ deref_head(d0, glist_valx_write); \ glist_valx_read: \ BEGP(pt0); \ @@ -576,7 +576,7 @@ \ glist_valx_nonvar: \ BEGD(d1); \ - d1 = XREG((*_PREG)->y_u.xx.xr); \ + d1 = XREG((*_PREG)->u.xx.xr); \ deref_head(d1, glist_valx_nonvar_unk); \ \ glist_valx_nonvar_nonvar: \ @@ -592,7 +592,7 @@ ENDD(d1); \ \ derefa_body(d0, pt0, glist_valx_unk, glist_valx_nonvar); \ - d0 = XREG((*_PREG)->y_u.xx.xr); \ + d0 = XREG((*_PREG)->u.xx.xr); \ deref_head(d0, glist_valx_var_unk); \ \ glist_valx_var_nonvar: \ @@ -613,7 +613,7 @@ CACHE_S(); \ S_SREG = HR; \ BEGD(d1); \ - d1 = XREG((*_PREG)->y_u.xx.xr); \ + d1 = XREG((*_PREG)->u.xx.xr); \ d0 = AbsPair(S_SREG); \ S_SREG[0] = d1; \ ENDD(d1); \ @@ -629,7 +629,7 @@ #define GLIST_VALY_INSTINIT \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.yx.x); + d0 = XREG((*_PREG)->u.yx.x); #define GLIST_VALY_GLIST_VALY_READ \ if (!IsPairTerm(d0)) { \ @@ -641,7 +641,7 @@ d0 = *pt0; #define GLIST_VALY_GLIST_VALY_NONVAR \ - pt1 = YREG + (*_PREG)->y_u.yx.y; \ + pt1 = YREG + (*_PREG)->u.yx.y; \ d1 = *pt1; \ (*_PREG) = NEXTOP((*_PREG), yx); @@ -655,7 +655,7 @@ GONext(); #define GLIST_VALY_GLIST_VALY_UNK \ - pt1 = YREG+(*_PREG)->y_u.yx.y; \ + pt1 = YREG+(*_PREG)->u.yx.y; \ d1 = *pt1; #define GLIST_VALY_GLIST_VALY_VAR_NONVAR \ @@ -674,7 +674,7 @@ pt1 = HR; \ d0 = AbsPair(pt1); \ Bind(pt0, d0); \ - d0 = YREG[(*_PREG)->y_u.yx.y]; \ + d0 = YREG[(*_PREG)->u.yx.y]; \ pt1[0] = d0; \ HR = pt1 + 2; \ (*_SREG) = pt1 + 1; \ @@ -684,7 +684,7 @@ #define _gl_void_varx_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.xx.xl); \ + d0 = XREG((*_PREG)->u.xx.xl); \ deref_head(d0, glist_void_varx_write); \ glist_void_varx_read: \ if (!IsPairTerm(d0)) { \ @@ -693,7 +693,7 @@ BEGP(pt0); \ pt0 = RepPair(d0); \ d0 = pt0[1]; \ - XREG((*_PREG)->y_u.xx.xr) = d0; \ + XREG((*_PREG)->u.xx.xr) = d0; \ (*_PREG) = NEXTOP((*_PREG), xx); \ GONEXT(); \ ENDP(pt0); \ @@ -702,7 +702,7 @@ deref_body(d0, pt0, glist_void_varx_write, glist_void_varx_read); \ BEGP(pt1); \ pt1 = HR; \ - XREG((*_PREG)->y_u.xx.xr) = \ + XREG((*_PREG)->u.xx.xr) = \ Unsigned(pt1 + 1); \ RESET_VARIABLE(pt1); \ RESET_VARIABLE(pt1+1); \ @@ -721,7 +721,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.yx.x); + d0 = XREG((*_PREG)->u.yx.x); #define GL_VOID_VARY_GLIST_VOID_VARY_READ \ BLOCK = (CELL)GL_VOID_VARY_GLIST_VOID_VARY_READ; \ @@ -732,14 +732,14 @@ else { \ pt0 = RepPair(d0); \ d0 = pt0[1]; \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.yx.y,d0); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.yx.y,d0); \ (*_PREG) = NEXTOP((*_PREG), yx); \ GONext(); \ } #define GL_VOID_VARY_GLIST_VOID_VARY_WRITE \ pt1 = HR; \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.yx.y,Unsigned(pt1 + 1)); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.yx.y,Unsigned(pt1 + 1)); \ (*_PREG) = NEXTOP((*_PREG), yx); \ RESET_VARIABLE(pt1); \ RESET_VARIABLE(pt1+1); \ @@ -752,7 +752,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.xx.xl); + d0 = XREG((*_PREG)->u.xx.xl); #define GL_VOID_VALX_GLIST_VOID_VALX_READ \ BLOCK = (CELL)GL_VOID_VALX_GLIST_VOID_VALX_READ; \ @@ -766,7 +766,7 @@ } #define GL_VOID_VALX_GLIST_VOID_VALX_NONVAR \ - d1 = XREG((*_PREG)->y_u.xx.xr); + d1 = XREG((*_PREG)->u.xx.xr); #define GL_VOID_VALX_GLIST_VOID_VALX_NONVAR_NONVAR \ BLOCK = (CELL)GL_VOID_VALX_GLIST_VOID_VALX_NONVAR_NONVAR; \ @@ -779,7 +779,7 @@ GONext(); #define GL_VOID_VALX_GLIST_VOID_VALX_UNK \ - d1 = XREG((*_PREG)->y_u.xx.xr); + d1 = XREG((*_PREG)->u.xx.xr); #define GL_VOID_VALX_GLIST_VOID_VALX_VAR_NONVAR \ (*_PREG) = NEXTOP((*_PREG), xx); \ @@ -796,7 +796,7 @@ d0 = AbsPair(pt1); \ Bind(pt0, d0); \ pt1 = HR; \ - d0 = XREG((*_PREG)->y_u.xx.xr); \ + d0 = XREG((*_PREG)->u.xx.xr); \ RESET_VARIABLE(pt1); \ pt1[1] = d0; \ HR = pt1 + 2; \ @@ -807,7 +807,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.yx.x); + d0 = XREG((*_PREG)->u.yx.x); #define GL_VOID_VALY_GLIST_VOID_VALY_READ \ BLOCK = (CELL)GL_VOID_VALY_GLIST_VOID_VALY_READ; \ @@ -821,7 +821,7 @@ } #define GL_VOID_VALY_GLIST_VOID_VALY_NONVAR \ - pt1 = YREG+(*_PREG)->y_u.yx.y; \ + pt1 = YREG+(*_PREG)->u.yx.y; \ d1 = *pt1; #define GL_VOID_VALY_GLIST_VOID_VALY_NONVAR_NONVAR \ @@ -835,7 +835,7 @@ GONext(); #define GL_VOID_VALY_GLIST_VOID_VALY_UNK \ - pt1 = YREG+(*_PREG)->y_u.yx.y; \ + pt1 = YREG+(*_PREG)->u.yx.y; \ d1 = *pt1; #define GL_VOID_VALY_GLIST_VOID_VALY_VAR_NONVAR \ @@ -854,7 +854,7 @@ d0 = AbsPair(S_SREG); \ Bind(pt0, d0); \ S_SREG = HR; \ - d1 = YREG[(*_PREG)->y_u.yx.y]; \ + d1 = YREG[(*_PREG)->u.yx.y]; \ RESET_VARIABLE(S_SREG); \ S_SREG[1] = d1; \ (*_PREG) = NEXTOP((*_PREG), yx); \ diff --git a/JIT/HPP/singlecode_misc.h b/JIT/HPP/singlecode_misc.h index e4f921422..f4ff7b0e7 100644 --- a/JIT/HPP/singlecode_misc.h +++ b/JIT/HPP/singlecode_misc.h @@ -1,6 +1,6 @@ #if (defined(YAPOR_SBA) && defined(YAPOR)) || defined(TABLING) #define check_stack_on_either \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) return external_labels[4]; + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) return external_labels[4]; #else #define check_stack_on_either \ if (__builtin_expect(((Int)(Unsigned(ENV_YREG) - Unsigned(HR)) < CreepFlag ), 0) ) return external_labels[4]; @@ -13,7 +13,7 @@ GONext(); #define LOCK_LU_PARALLEL \ - PP = (*_PREG)->y_u.p.p; \ + PP = (*_PREG)->u.p.p; \ PELOCK(3, PP); #endif @@ -37,7 +37,7 @@ #if MULTIPLE_STACKS #define ALLOC_FOR_LOGICAL_PRED_MULTIPLE_STACKS \ - LogUpdClause *cl = (*_PREG)->y_u.L.ClBase; + LogUpdClause *cl = (*_PREG)->u.L.ClBase; #if PARALLEL_YAP #define ALLOC_FOR_LOGICAL_PRED_MULTIPLE_STACKS_PARALLEL \ PredEntry *ap = cl->ClPred; @@ -49,7 +49,7 @@ PP = NULL; #else #define ALLOC_FOR_LOGICAL_PRED_NOMULTIPLE_STACKS_INIT \ - LogUpdClause *cl = (LogUpdClause *)(*_PREG)->y_u.L.ClBase; + LogUpdClause *cl = (LogUpdClause *)(*_PREG)->u.L.ClBase; #define ALLOC_FOR_LOGICAL_PRED_NOMULTIPLE_STACKS_IFOK \ cl->ClFlags |= InUseMask; \ @@ -539,8 +539,8 @@ JMPNext(); #define ENSURE_SPACE_INSTINIT \ - Int sz = (*_PREG)->y_u.Osbpa.i; \ - UInt arity = (*_PREG)->y_u.Osbpa.p->ArityOfPE; + Int sz = (*_PREG)->u.Osbpa.i; \ + UInt arity = (*_PREG)->u.Osbpa.p->ArityOfPE; #define ENSURE_SPACE_FIRSTIFOK_INIT \ YENV[E_CP] = (CELL) (*_CPREG); \ @@ -552,7 +552,7 @@ #endif #define ENSURE_SPACE_FIRSTIFOK_END \ - SET_ASP(YREG, (*_PREG)->y_u.Osbpa.s); \ + SET_ASP(YREG, (*_PREG)->u.Osbpa.s); \ (*_PREG) = NEXTOP((*_PREG),Osbpa); \ saveregs(); @@ -571,7 +571,7 @@ JMPNext(); #define _jump_instinit \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); #define MOVE_BACK_INSTINIT \ @@ -596,7 +596,7 @@ ENDCACHE_Y_AS_ENV(); \ either_notest: \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ choiceptr top_b = PROTECT_FROZEN_B(B); \ @@ -604,7 +604,7 @@ pt1 = top_b; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SCH_set_load(pt1); \ SET_BB(pt1); \ @@ -622,7 +622,7 @@ ENDCACHE_Y_AS_ENV(); \ either_notest: \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ choiceptr top_b = PROTECT_FROZEN_B(B); \ @@ -630,7 +630,7 @@ pt1 = top_b; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SCH_set_load(pt1); \ SET_BB(pt1); \ @@ -649,14 +649,14 @@ ENDCACHE_Y_AS_ENV(); \ either_notest: \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ if (pt1 > B) \ pt1 = B; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SCH_set_load(pt1); \ SET_BB(pt1); \ @@ -674,7 +674,7 @@ ENDCACHE_Y_AS_ENV(); \ either_notest: \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ choiceptr top_b = PROTECT_FROZEN_B(B); \ @@ -682,7 +682,7 @@ pt1 = top_b; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SCH_set_load(pt1); \ SET_BB(pt1); \ @@ -697,7 +697,7 @@ ENDCACHE_Y_AS_ENV(); \ either_notest: \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ choiceptr top_b = PROTECT_FROZEN_B(B); \ @@ -705,7 +705,7 @@ pt1 = top_b; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SCH_set_load(pt1); \ SET_BB(pt1); \ @@ -721,14 +721,14 @@ ENDCACHE_Y_AS_ENV(); \ either_notest: \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ if (pt1 > B) \ pt1 = B; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SCH_set_load(pt1); \ SET_BB(pt1); \ @@ -747,7 +747,7 @@ low_level_trace(try_or, (PredEntry *)(*_PREG), NULL); \ } \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ choiceptr top_b = PROTECT_FROZEN_B(B); \ @@ -755,7 +755,7 @@ pt1 = top_b; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SCH_set_load(pt1); \ SET_BB(pt1); \ @@ -769,7 +769,7 @@ low_level_trace(try_or, (PredEntry *)(*_PREG), NULL); \ } \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ choiceptr top_b = PROTECT_FROZEN_B(B); \ @@ -777,7 +777,7 @@ pt1 = top_b; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SCH_set_load(pt1); \ SET_BB(pt1); \ @@ -792,14 +792,14 @@ low_level_trace(try_or, (PredEntry *)(*_PREG), NULL); \ } \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ if (pt1 > B) \ pt1 = B; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SCH_set_load(pt1); \ SET_BB(pt1); \ @@ -813,7 +813,7 @@ #ifdef YAPOR_SBA #define _either_instinit \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ choiceptr top_b = PROTECT_FROZEN_B(B); \ @@ -821,7 +821,7 @@ pt1 = top_b; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SCH_set_load(pt1); \ SET_BB(pt1); \ @@ -832,7 +832,7 @@ #else /* YAPOR_SBA */ #define _either_instinit \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ choiceptr top_b = PROTECT_FROZEN_B(B); \ @@ -840,7 +840,7 @@ pt1 = top_b; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SCH_set_load(pt1); \ SET_BB(pt1); \ @@ -852,14 +852,14 @@ #else /* FROZEN_STACKS */ #define _either_instinit \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ if (pt1 > B) \ pt1 = B; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SCH_set_load(pt1); \ SET_BB(pt1); \ @@ -884,7 +884,7 @@ ENDCACHE_Y_AS_ENV(); \ either_notest: \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ choiceptr top_b = PROTECT_FROZEN_B(B); \ @@ -892,7 +892,7 @@ pt1 = top_b; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SET_BB(pt1); \ ENDCHO(pt1); \ @@ -909,7 +909,7 @@ ENDCACHE_Y_AS_ENV(); \ either_notest: \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ choiceptr top_b = PROTECT_FROZEN_B(B); \ @@ -917,7 +917,7 @@ pt1 = top_b; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SET_BB(pt1); \ ENDCHO(pt1); \ @@ -935,14 +935,14 @@ ENDCACHE_Y_AS_ENV(); \ either_notest: \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ if (pt1 > B) \ pt1 = B; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SET_BB(pt1); \ ENDCHO(pt1); \ @@ -959,7 +959,7 @@ ENDCACHE_Y_AS_ENV(); \ either_notest: \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ choiceptr top_b = PROTECT_FROZEN_B(B); \ @@ -967,7 +967,7 @@ pt1 = top_b; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SET_BB(pt1); \ ENDCHO(pt1); \ @@ -981,7 +981,7 @@ ENDCACHE_Y_AS_ENV(); \ either_notest: \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ choiceptr top_b = PROTECT_FROZEN_B(B); \ @@ -989,7 +989,7 @@ pt1 = top_b; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SET_BB(pt1); \ ENDCHO(pt1); \ @@ -1004,14 +1004,14 @@ ENDCACHE_Y_AS_ENV(); \ either_notest: \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ if (pt1 > B) \ pt1 = B; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SET_BB(pt1); \ ENDCHO(pt1); \ @@ -1029,7 +1029,7 @@ low_level_trace(try_or, (PredEntry *)(*_PREG), NULL); \ } \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ choiceptr top_b = PROTECT_FROZEN_B(B); \ @@ -1037,7 +1037,7 @@ pt1 = top_b; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SET_BB(pt1); \ ENDCHO(pt1); \ @@ -1050,7 +1050,7 @@ low_level_trace(try_or, (PredEntry *)(*_PREG), NULL); \ } \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ choiceptr top_b = PROTECT_FROZEN_B(B); \ @@ -1058,7 +1058,7 @@ pt1 = top_b; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SET_BB(pt1); \ ENDCHO(pt1); \ @@ -1072,14 +1072,14 @@ low_level_trace(try_or, (PredEntry *)(*_PREG), NULL); \ } \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ if (pt1 > B) \ pt1 = B; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SET_BB(pt1); \ ENDCHO(pt1); \ @@ -1092,7 +1092,7 @@ #ifdef YAPOR_SBA #define _either_instinit \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ choiceptr top_b = PROTECT_FROZEN_B(B); \ @@ -1100,7 +1100,7 @@ pt1 = top_b; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SET_BB(pt1); \ ENDCHO(pt1); \ @@ -1110,7 +1110,7 @@ #else /* YAPOR_SBA */ #define _either_instinit \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ choiceptr top_b = PROTECT_FROZEN_B(B); \ @@ -1118,7 +1118,7 @@ pt1 = top_b; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SET_BB(pt1); \ ENDCHO(pt1); \ @@ -1129,14 +1129,14 @@ #else /* FROZEN_STACKS */ #define _either_instinit \ BEGD(d0); \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ BEGCHO(pt1); \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); \ if (pt1 > B) \ pt1 = B; \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); \ SET_BB(pt1); \ ENDCHO(pt1); \ @@ -1149,7 +1149,7 @@ #endif /* YAPOR */ #define OR_ELSE_INSTINIT \ - HR = HBREG = PROTECT_FROZEN_H(B); \ + HR = HRBREG = PROTECT_FROZEN_H(B); \ ENV = B->cp_env; \ B->cp_cp = (*_PREG); @@ -1163,11 +1163,11 @@ #ifdef YAPOR #define OR_ELSE_YAPOR \ - SCH_new_alternative((*_PREG), (*_PREG)->y_u.Osblp.l); + SCH_new_alternative((*_PREG), (*_PREG)->u.Osblp.l); #endif #define OR_ELSE_END \ - B->cp_ap = (*_PREG)->y_u.Osblp.l; \ + B->cp_ap = (*_PREG)->u.Osblp.l; \ (*_PREG) = NEXTOP((*_PREG), Osblp); \ YREG = (CELL *) B->cp_a1; \ GONext(); @@ -1178,7 +1178,7 @@ #ifdef YAPOR #define OR_LAST_IFOK_INIT \ - HR = HBREG = PROTECT_FROZEN_H(pt0); \ + H = HRBREG = PROTECT_FROZEN_H(pt0); \ YREG = (CELL *) pt0->cp_a1; \ ENV = pt0->cp_env; @@ -1193,7 +1193,7 @@ #define OR_LAST_NOIF_INIT \ B = pt0->cp_b; \ - HR = PROTECT_FROZEN_H(pt0); \ + H = PROTECT_FROZEN_H(pt0); \ YREG = (CELL *) pt0->cp_a1; \ ENV = pt0->cp_env; @@ -1346,7 +1346,7 @@ JMPNext(); #define EXPAND_CLAUSES_INSTINIT \ - PredEntry *pe = (*_PREG)->y_u.sssllp.p; \ + PredEntry *pe = (*_PREG)->u.sssllp.p; \ yamop *pt0; \ SET_ASP(YREG, E_CB*sizeof(CELL)); @@ -1400,7 +1400,7 @@ } \ else { \ HR[d0 + 2] = AbsAppl(HR); \ - *HR = (CELL) pe->FunctorOfPred; \ + *H = (CELL) pe->FunctorOfPred; \ HR++; \ pt1 = XREGS + 1; \ for (; d0 > 0; --d0) { \ @@ -1412,14 +1412,14 @@ (pt0) = (CELL *)(d1); \ (d1) = *(CELL *)(d1); \ if(!IsVarTerm(d1)) { \ - *HR++ = d1; \ + *H++ = d1; \ setHwithd1 = 1; \ break; \ } \ } \ if (setHwithd1) { continue; } \ if (pt0 <= HR) { \ - *HR++ = (CELL)pt0; \ + *H++ = (CELL)pt0; \ } else { \ d1 = Unsigned(HR); \ RESET_VARIABLE(HR); \ @@ -1428,7 +1428,7 @@ } \ } \ else { \ - *HR++ = d1; \ + *H++ = d1; \ } \ } \ } \ @@ -1463,7 +1463,7 @@ } \ else { \ HR[d0 + 2] = AbsAppl(HR); \ - *HR = (CELL) pe->FunctorOfPred; \ + *H = (CELL) pe->FunctorOfPred; \ HR++; \ pt1 = XREGS + 1; \ for (; d0 > 0; --d0) { \ @@ -1475,14 +1475,14 @@ (pt0) = (CELL *)(d1); \ (d1) = *(CELL *)(d1); \ if(!IsVarTerm(d1)) { \ - *HR++ = d1; \ + *H++ = d1; \ setHwithd1 = 1; \ break; \ } \ } \ if (setHwithd1) { continue; } \ if (pt0 <= HR) { \ - *HR++ = (CELL)pt0; \ + *H++ = (CELL)pt0; \ } else { \ d1 = Unsigned(HR); \ RESET_VARIABLE(HR); \ @@ -1491,7 +1491,7 @@ } \ } \ else { \ - *HR++ = d1; \ + *H++ = d1; \ } \ } \ } \ @@ -1525,7 +1525,7 @@ } \ else { \ HR[d0 + 2] = AbsAppl(HR); \ - *HR = (CELL) pe->FunctorOfPred; \ + *H = (CELL) pe->FunctorOfPred; \ HR++; \ pt1 = XREGS + 1; \ for (; d0 > 0; --d0) { \ @@ -1537,14 +1537,14 @@ (pt0) = (CELL *)(d1); \ (d1) = *(CELL *)(d1); \ if(!IsVarTerm(d1)) { \ - *HR++ = d1; \ + *H++ = d1; \ setHwithd1 = 1; \ break; \ } \ } \ if (setHwithd1) { continue; } \ if (pt0 <= HR) { \ - *HR++ = (CELL)pt0; \ + *H++ = (CELL)pt0; \ } else { \ d1 = Unsigned(HR); \ RESET_VARIABLE(HR); \ @@ -1553,7 +1553,7 @@ } \ } \ else { \ - *HR++ = d1; \ + *H++ = d1; \ } \ } \ } \ @@ -1588,7 +1588,7 @@ } \ else { \ HR[d0 + 2] = AbsAppl(HR); \ - *HR = (CELL) pe->FunctorOfPred; \ + *H = (CELL) pe->FunctorOfPred; \ HR++; \ pt1 = XREGS + 1; \ for (; d0 > 0; --d0) { \ @@ -1600,14 +1600,14 @@ (pt0) = (CELL *)(d1); \ (d1) = *(CELL *)(d1); \ if(!IsVarTerm(d1)) { \ - *HR++ = d1; \ + *H++ = d1; \ setHwithd1 = 1; \ break; \ } \ } \ if (setHwithd1) { continue; } \ if (pt0 <= HR) { \ - *HR++ = (CELL)pt0; \ + *H++ = (CELL)pt0; \ } else { \ d1 = Unsigned(HR); \ RESET_VARIABLE(HR); \ @@ -1616,7 +1616,7 @@ } \ } \ else { \ - *HR++ = d1; \ + *H++ = d1; \ } \ } \ } \ @@ -1697,7 +1697,7 @@ HR[1] = MkAtomTerm((Atom)(pe->FunctorOfPred)); #define SPY_PRED_D0ISNOZERO_INIT \ - *HR = (CELL) pe->FunctorOfPred; \ + *H = (CELL) pe->FunctorOfPred; \ HR[d0 + 2] = AbsAppl(HR); \ HR++; \ pt1 = XREGS + 1; @@ -1707,10 +1707,10 @@ d1 = *pt0; #define SPY_PRED_D0ISNOZERO_INSIDEFOR_DOSPY_NONVAR \ - *HR++ = d1; + *H++ = d1; #define SPY_PRED_D0ISNOZERO_INSIDEFOR_SAFEVAR \ - *HR++ = (CELL)pt0; + *H++ = (CELL)pt0; #define SPY_PRED_D0ISNOZERO_INSIDEFOR_UNSAFEVAR \ d1 = Unsigned(HR); \ @@ -1719,7 +1719,7 @@ Bind_Local(pt0, d1); #define SPY_PRED_POST_IFS \ - HR[0] = Yap_Module_Name(pe); \ + H[0] = Yap_Module_Name(pe); \ ARG1 = (Term) AbsPair(HR); \ HR += 2; \ PredEntry *pt0; diff --git a/JIT/HPP/singlecode_pop.h b/JIT/HPP/singlecode_pop.h index ae03eba7e..349a8eb89 100644 --- a/JIT/HPP/singlecode_pop.h +++ b/JIT/HPP/singlecode_pop.h @@ -1,7 +1,7 @@ #define POP_N_INIT \ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ - d0 = (*_PREG)->y_u.os.s; \ + d0 = (*_PREG)->u.os.s; \ SP = (CELL *) (((char *) SP) + d0); \ d0 = SP[0]; \ if (d0) { \ diff --git a/JIT/HPP/singlecode_primitive_predicates.h b/JIT/HPP/singlecode_primitive_predicates.h index f6b3f3e84..76e92e25b 100644 --- a/JIT/HPP/singlecode_primitive_predicates.h +++ b/JIT/HPP/singlecode_primitive_predicates.h @@ -1,6 +1,6 @@ #define _p_integer_x_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.xl.x); \ + d0 = XREG((*_PREG)->u.xl.x); \ deref_head(d0, integer_x_unk); \ integer_x_nvar: \ if (IsIntTerm(d0)) { \ @@ -16,17 +16,17 @@ (*_PREG) = NEXTOP((*_PREG), xl); \ GONEXT(); \ default: \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ BACK(); \ } \ } \ } \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ BACK(); \ \ BEGP(pt0); \ deref_body(d0, pt0, integer_x_unk, integer_x_nvar); \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ BACK(); \ ENDP(pt0); \ ENDD(d0); @@ -34,10 +34,10 @@ #define _p_plus_vv_instinit \ BEGD(d0); \ BEGD(d1); \ - d0 = XREG((*_PREG)->y_u.xxx.x1); \ + d0 = XREG((*_PREG)->u.xxx.x1); \ deref_head(d0, plus_vv_unk); \ plus_vv_nvar: \ - d1 = XREG((*_PREG)->y_u.xxx.x2); \ + d1 = XREG((*_PREG)->u.xxx.x2); \ deref_head(d1, plus_vv_nvar_unk); \ plus_vv_nvar_nvar: \ if (IsIntTerm(d0) && IsIntTerm(d1)) { \ @@ -54,7 +54,7 @@ FAIL(); \ } \ } \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONEXT(); \ \ @@ -78,11 +78,11 @@ #define _p_plus_vc_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.xxn.xi); \ + d0 = XREG((*_PREG)->u.xxn.xi); \ deref_head(d0, plus_vc_unk); \ plus_vc_nvar: \ { \ - Int d1 = (*_PREG)->y_u.xxn.c; \ + Int d1 = (*_PREG)->u.xxn.c; \ if (IsIntTerm(d0)) { \ d0 = MkIntegerTerm(IntOfTerm(d0) + d1); \ } \ @@ -98,14 +98,14 @@ } \ } \ } \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONEXT(); \ \ BEGP(pt0); \ deref_body(d0, pt0, plus_vc_unk, plus_vc_nvar); \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is A + " Int_FORMAT, (*_PREG)->y_u.xxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is A + " Int_FORMAT, (*_PREG)->u.xxn.c); \ setregs(); \ FAIL(); \ ENDP(pt0); \ @@ -114,10 +114,10 @@ #define _p_plus_y_vv_instinit \ BEGD(d0); \ BEGD(d1); \ - d0 = XREG((*_PREG)->y_u.yxx.x1); \ + d0 = XREG((*_PREG)->u.yxx.x1); \ deref_head(d0, plus_y_vv_unk); \ plus_y_vv_nvar: \ - d1 = XREG((*_PREG)->y_u.xxx.x2); \ + d1 = XREG((*_PREG)->u.xxx.x2); \ deref_head(d1, plus_y_vv_nvar_unk); \ plus_y_vv_nvar_nvar: \ if (IsIntTerm(d0) && IsIntTerm(d1)) { \ @@ -135,7 +135,7 @@ } \ } \ BEGP(pt0); \ - pt0 = YREG + (*_PREG)->y_u.yxx.y; \ + pt0 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0,d0); \ ENDP(pt0); \ @@ -161,11 +161,11 @@ #define _p_plus_y_vc_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.yxn.xi); \ + d0 = XREG((*_PREG)->u.yxn.xi); \ deref_head(d0, plus_y_vc_unk); \ plus_y_vc_nvar: \ { \ - Int d1 = (*_PREG)->y_u.yxn.c; \ + Int d1 = (*_PREG)->u.yxn.c; \ if (IsIntTerm(d0)) { \ d0 = MkIntegerTerm(IntOfTerm(d0) + d1); \ } \ @@ -182,7 +182,7 @@ } \ } \ BEGP(pt0); \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ ENDP(pt0); \ @@ -191,7 +191,7 @@ BEGP(pt0); \ deref_body(d0, pt0, plus_y_vc_unk, plus_y_vc_nvar); \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is A + " Int_FORMAT, (*_PREG)->y_u.yxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is A + " Int_FORMAT, (*_PREG)->u.yxn.c); \ setregs(); \ FAIL(); \ ENDP(pt0); \ @@ -200,10 +200,10 @@ #define _p_minus_vv_instinit \ BEGD(d0); \ BEGD(d1); \ - d0 = XREG((*_PREG)->y_u.xxx.x1); \ + d0 = XREG((*_PREG)->u.xxx.x1); \ deref_head(d0, minus_vv_unk); \ minus_vv_nvar: \ - d1 = XREG((*_PREG)->y_u.xxx.x2); \ + d1 = XREG((*_PREG)->u.xxx.x2); \ deref_head(d1, minus_vv_nvar_unk); \ minus_vv_nvar_nvar: \ if (IsIntTerm(d0) && IsIntTerm(d1)) { \ @@ -220,7 +220,7 @@ FAIL(); \ } \ } \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONEXT(); \ \ @@ -245,10 +245,10 @@ #define _p_times_vv_instinit \ BEGD(d0); \ BEGD(d1); \ - d0 = XREG((*_PREG)->y_u.xxx.x1); \ + d0 = XREG((*_PREG)->u.xxx.x1); \ deref_head(d0, times_vv_unk); \ times_vv_nvar: \ - d1 = XREG((*_PREG)->y_u.xxx.x2); \ + d1 = XREG((*_PREG)->u.xxx.x2); \ deref_head(d1, times_vv_nvar_unk); \ times_vv_nvar_nvar: \ if (IsIntTerm(d0) && IsIntTerm(d1)) { \ @@ -265,7 +265,7 @@ FAIL(); \ } \ } \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONEXT(); \ \ @@ -289,11 +289,11 @@ #define _p_times_vc_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.xxn.xi); \ + d0 = XREG((*_PREG)->u.xxn.xi); \ deref_head(d0, times_vc_unk); \ times_vc_nvar: \ { \ - Int d1 = (*_PREG)->y_u.xxn.c; \ + Int d1 = (*_PREG)->u.xxn.c; \ if (IsIntTerm(d0)) { \ d0 = times_int(IntOfTerm(d0), d1); \ } \ @@ -309,14 +309,14 @@ } \ } \ } \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONEXT(); \ \ BEGP(pt0); \ deref_body(d0, pt0, times_vc_unk, times_vc_nvar); \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is A* " Int_FORMAT, (*_PREG)->y_u.xxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is A* " Int_FORMAT, (*_PREG)->u.xxn.c); \ setregs(); \ FAIL(); \ ENDP(pt0); \ @@ -325,10 +325,10 @@ #define _p_div_vv_instinit \ BEGD(d0); \ BEGD(d1); \ - d0 = XREG((*_PREG)->y_u.xxx.x1); \ + d0 = XREG((*_PREG)->u.xxx.x1); \ deref_head(d0, div_vv_unk); \ div_vv_nvar: \ - d1 = XREG((*_PREG)->y_u.xxx.x2); \ + d1 = XREG((*_PREG)->u.xxx.x2); \ deref_head(d1, div_vv_nvar_unk); \ div_vv_nvar_nvar: \ if (IsIntTerm(d0) && IsIntTerm(d1)) { \ @@ -352,7 +352,7 @@ FAIL(); \ } \ } \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONEXT(); \ \ @@ -377,10 +377,10 @@ #define _p_and_vv_instinit \ BEGD(d0); \ BEGD(d1); \ - d0 = XREG((*_PREG)->y_u.xxx.x1); \ + d0 = XREG((*_PREG)->u.xxx.x1); \ deref_head(d0, and_vv_unk); \ and_vv_nvar: \ - d1 = XREG((*_PREG)->y_u.xxx.x2); \ + d1 = XREG((*_PREG)->u.xxx.x2); \ deref_head(d1, and_vv_nvar_unk); \ and_vv_nvar_nvar: \ if (IsIntTerm(d0) && IsIntTerm(d1)) { \ @@ -397,7 +397,7 @@ FAIL(); \ } \ } \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONEXT(); \ \ @@ -421,11 +421,11 @@ #define _p_and_vc_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.xxn.xi); \ + d0 = XREG((*_PREG)->u.xxn.xi); \ deref_head(d0, and_vc_unk); \ and_vc_nvar: \ { \ - Int d1 = (*_PREG)->y_u.xxn.c; \ + Int d1 = (*_PREG)->u.xxn.c; \ if (IsIntTerm(d0)) { \ d0 = MkIntegerTerm(IntOfTerm(d0) & d1); \ } \ @@ -441,14 +441,14 @@ } \ } \ } \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONEXT(); \ \ BEGP(pt0); \ deref_body(d0, pt0, and_vc_unk, and_vc_nvar); \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is A /\\ " Int_FORMAT , (*_PREG)->y_u.xxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is A /\\ " Int_FORMAT , (*_PREG)->u.xxn.c); \ setregs(); \ FAIL(); \ ENDP(pt0); \ @@ -456,11 +456,11 @@ #define _p_sll_cv_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.xxn.xi); \ + d0 = XREG((*_PREG)->u.xxn.xi); \ deref_head(d0, sll_cv_unk); \ sll_cv_nvar: \ { \ - Int d1 = (*_PREG)->y_u.xxn.c; \ + Int d1 = (*_PREG)->u.xxn.c; \ if (IsIntTerm(d0)) { \ Int i2 = IntOfTerm(d0); \ if (i2 < 0) { \ @@ -480,7 +480,7 @@ setregs(); \ FAIL(); \ } \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONEXT(); \ \ @@ -495,11 +495,11 @@ #define _p_slr_vc_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.xxn.xi); \ + d0 = XREG((*_PREG)->u.xxn.xi); \ deref_head(d0, slr_vc_unk); \ slr_vc_nvar: \ { \ - Int d1 = (*_PREG)->y_u.xxn.c; \ + Int d1 = (*_PREG)->u.xxn.c; \ if (IsIntTerm(d0)) { \ d0 = MkIntTerm(SLR(IntOfTerm(d0), d1)); \ } \ @@ -515,7 +515,7 @@ } \ } \ } \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONEXT(); \ \ @@ -531,16 +531,16 @@ #define _call_bfunc_xx_instinit \ BEGD(d0); \ BEGD(d1); \ - d0 = XREG((*_PREG)->y_u.plxxs.x1); \ + d0 = XREG((*_PREG)->u.plxxs.x1); \ call_bfunc_xx_nvar: \ - d1 = XREG((*_PREG)->y_u.plxxs.x2); \ + d1 = XREG((*_PREG)->u.plxxs.x2); \ call_bfunc_xx2_nvar: \ deref_head(d0, call_bfunc_xx_unk); \ deref_head(d1, call_bfunc_xx2_unk); \ if (IsIntTerm(d0) && IsIntTerm(d1)) { \ COUNT flags; \ Int v = IntOfTerm(d0) - IntOfTerm(d1); \ - flags = (*_PREG)->y_u.plxxs.flags; \ + flags = (*_PREG)->u.plxxs.flags; \ if (v > 0) { \ if (flags & GT_OK_IN_CMP) { \ yamop *nextp = NEXTOP((*_PREG), plxxs); \ @@ -548,7 +548,7 @@ GONEXT(); \ } \ else { \ - yamop *nextp = (*_PREG)->y_u.plxxs.f; \ + yamop *nextp = (*_PREG)->u.plxxs.f; \ (*_PREG) = nextp; \ BACK(); \ } \ @@ -560,7 +560,7 @@ GONEXT(); \ } \ else { \ - yamop *nextp = (*_PREG)->y_u.plxxs.f; \ + yamop *nextp = (*_PREG)->u.plxxs.f; \ (*_PREG) = nextp; \ BACK(); \ } \ @@ -572,7 +572,7 @@ GONEXT(); \ } \ else { \ - yamop *nextp = (*_PREG)->y_u.plxxs.f; \ + yamop *nextp = (*_PREG)->u.plxxs.f; \ (*_PREG) = nextp; \ BACK(); \ } \ @@ -580,7 +580,7 @@ } \ exec_bin_cmp_xx: \ { \ - CmpPredicate f = (*_PREG)->y_u.plxxs.p->cs.d_code; \ + CmpPredicate f = (*_PREG)->u.plxxs.p->cs.d_code; \ saveregs(); \ d0 = (CELL) (f) (d0,d1); \ setregs(); \ @@ -589,7 +589,7 @@ BACK(); \ } \ if (!d0) { \ - (*_PREG) = (*_PREG)->y_u.plxxs.f; \ + (*_PREG) = (*_PREG)->u.plxxs.f; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), plxxs); \ @@ -613,8 +613,8 @@ BEGD(d0); \ BEGD(d1); \ BEGP(pt0); \ - pt0 = YREG + (*_PREG)->y_u.plxys.y; \ - d1 = XREG((*_PREG)->y_u.plxys.x); \ + pt0 = YREG + (*_PREG)->u.plxys.y; \ + d1 = XREG((*_PREG)->u.plxys.x); \ d0 = *pt0; \ ENDP(pt0); \ deref_head(d0, call_bfunc_yx_unk); \ @@ -624,13 +624,13 @@ if (IsIntTerm(d0) && IsIntTerm(d1)) { \ int flags; \ Int v = IntOfTerm(d0) - IntOfTerm(d1); \ - flags = (*_PREG)->y_u.plxys.flags; \ + flags = (*_PREG)->u.plxys.flags; \ if (v > 0) { \ if (flags & GT_OK_IN_CMP) { \ (*_PREG) = NEXTOP((*_PREG), plxys); \ GONEXT(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ BACK(); \ } \ } else if (v < 0) { \ @@ -638,7 +638,7 @@ (*_PREG) = NEXTOP((*_PREG), plxys); \ GONEXT(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ BACK(); \ } \ } else { \ @@ -646,21 +646,21 @@ (*_PREG) = NEXTOP((*_PREG), plxys); \ GONEXT(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ BACK(); \ } \ } \ } \ exec_bin_cmp_yx: \ { \ - CmpPredicate f = (*_PREG)->y_u.plxys.p->cs.d_code; \ + CmpPredicate f = (*_PREG)->u.plxys.p->cs.d_code; \ saveregs(); \ d0 = (CELL) (f) (d0,d1); \ setregs(); \ } \ if (!d0 || (*_PREG) == FAILCODE) { \ if ((*_PREG) != FAILCODE) { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ } \ BACK(); \ } \ @@ -684,8 +684,8 @@ BEGD(d0); \ BEGD(d1); \ BEGP(pt0); \ - pt0 = YREG + (*_PREG)->y_u.plxys.y; \ - d0 = XREG((*_PREG)->y_u.plxys.x); \ + pt0 = YREG + (*_PREG)->u.plxys.y; \ + d0 = XREG((*_PREG)->u.plxys.x); \ d1 = *pt0; \ ENDP(pt0); \ deref_head(d0, call_bfunc_xy_unk); \ @@ -695,13 +695,13 @@ if (IsIntTerm(d0) && IsIntTerm(d1)) { \ int flags; \ Int v = IntOfTerm(d0) - IntOfTerm(d1); \ - flags = (*_PREG)->y_u.plxys.flags; \ + flags = (*_PREG)->u.plxys.flags; \ if (v > 0) { \ if (flags & GT_OK_IN_CMP) { \ (*_PREG) = NEXTOP((*_PREG), plxys); \ GONEXT(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ BACK(); \ } \ } else if (v < 0) { \ @@ -709,7 +709,7 @@ (*_PREG) = NEXTOP((*_PREG), plxys); \ GONEXT(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ BACK(); \ } \ } else { \ @@ -717,21 +717,21 @@ (*_PREG) = NEXTOP((*_PREG), plxys); \ GONEXT(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ BACK(); \ } \ } \ } \ exec_bin_cmp_xy: \ { \ - CmpPredicate f = (*_PREG)->y_u.plxys.p->cs.d_code; \ + CmpPredicate f = (*_PREG)->u.plxys.p->cs.d_code; \ saveregs(); \ d0 = (CELL) (f) (d0,d1); \ setregs(); \ } \ if (!d0 || (*_PREG) == FAILCODE) { \ if ((*_PREG) != FAILCODE) { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ } \ BACK(); \ } \ @@ -755,9 +755,9 @@ BEGD(d0); \ BEGD(d1); \ BEGP(pt0); \ - pt0 = YREG + (*_PREG)->y_u.plyys.y1; \ + pt0 = YREG + (*_PREG)->u.plyys.y1; \ BEGP(pt1); \ - pt1 = YREG + (*_PREG)->y_u.plyys.y2; \ + pt1 = YREG + (*_PREG)->u.plyys.y2; \ d0 = *pt0; \ d1 = *pt1; \ ENDP(pt1); \ @@ -769,13 +769,13 @@ if (IsIntTerm(d0) && IsIntTerm(d1)) { \ int flags; \ Int v = IntOfTerm(d0) - IntOfTerm(d1); \ - flags = (*_PREG)->y_u.plyys.flags; \ + flags = (*_PREG)->u.plyys.flags; \ if (v > 0) { \ if (flags & GT_OK_IN_CMP) { \ (*_PREG) = NEXTOP((*_PREG), plyys); \ GONEXT(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plyys.f; \ + (*_PREG) = (*_PREG)->u.plyys.f; \ BACK(); \ } \ } else if (v < 0) { \ @@ -783,7 +783,7 @@ (*_PREG) = NEXTOP((*_PREG), plyys); \ GONEXT(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plyys.f; \ + (*_PREG) = (*_PREG)->u.plyys.f; \ BACK(); \ } \ } else { \ @@ -791,21 +791,21 @@ (*_PREG) = NEXTOP((*_PREG), plyys); \ GONEXT(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plyys.f; \ + (*_PREG) = (*_PREG)->u.plyys.f; \ BACK(); \ } \ } \ } \ exec_bin_cmp_yy: \ { \ - CmpPredicate f = (*_PREG)->y_u.plyys.p->cs.d_code; \ + CmpPredicate f = (*_PREG)->u.plyys.p->cs.d_code; \ saveregs(); \ d0 = (CELL) (f) (d0,d1); \ setregs(); \ } \ if (!d0 || (*_PREG) == FAILCODE) { \ if ((*_PREG) != FAILCODE) { \ - (*_PREG) = (*_PREG)->y_u.plyys.f; \ + (*_PREG) = (*_PREG)->u.plyys.f; \ } \ BACK(); \ } \ @@ -843,7 +843,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -869,7 +869,7 @@ } \ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HR = HBREG; \ + H = HRBREG; \ HBREG = B->cp_h; \ while (TR != pt0) { \ BEGD(d1); \ @@ -889,7 +889,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -900,13 +900,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -924,7 +924,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -950,7 +950,7 @@ } \ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HR = HBREG; \ + H = HRBREG; \ HBREG = B->cp_h; \ while (TR != pt0) { \ BEGD(d1); \ @@ -971,7 +971,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -982,13 +982,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -1007,7 +1007,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -1033,7 +1033,7 @@ } \ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HR = HBREG; \ + H = HRBREG; \ HBREG = B->cp_h; \ while (TR != pt0) { \ BEGD(d1); \ @@ -1050,7 +1050,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -1061,13 +1061,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -1088,7 +1088,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -1128,7 +1128,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -1139,13 +1139,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -1163,7 +1163,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -1204,7 +1204,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -1215,13 +1215,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -1240,7 +1240,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -1277,7 +1277,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -1288,13 +1288,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -1317,7 +1317,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -1343,7 +1343,7 @@ } \ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HR = HBREG; \ + H = HRBREG; \ HBREG = B->cp_h; \ while (TR != pt0) { \ BEGD(d1); \ @@ -1359,7 +1359,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -1370,13 +1370,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -1394,7 +1394,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -1420,7 +1420,7 @@ } \ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HR = HBREG; \ + H = HRBREG; \ HBREG = B->cp_h; \ while (TR != pt0) { \ BEGD(d1); \ @@ -1437,7 +1437,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -1448,13 +1448,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -1473,7 +1473,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -1499,7 +1499,7 @@ } \ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HR = HBREG; \ + H = HRBREG; \ HBREG = B->cp_h; \ while (TR != pt0) { \ BEGD(d1); \ @@ -1512,7 +1512,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -1523,13 +1523,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -1550,7 +1550,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -1586,7 +1586,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -1597,13 +1597,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -1621,7 +1621,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -1658,7 +1658,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -1669,13 +1669,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -1694,7 +1694,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -1727,7 +1727,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -1738,13 +1738,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -1766,7 +1766,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -1792,7 +1792,7 @@ } \ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HR = HBREG; \ + H = HRBREG; \ HBREG = B->cp_h; \ while (TR != pt0) { \ BEGD(d1); \ @@ -1812,7 +1812,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -1823,13 +1823,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -1844,7 +1844,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -1870,7 +1870,7 @@ } \ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HR = HBREG; \ + H = HRBREG; \ HBREG = B->cp_h; \ while (TR != pt0) { \ BEGD(d1); \ @@ -1891,7 +1891,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -1902,13 +1902,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -1924,7 +1924,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -1950,7 +1950,7 @@ } \ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HR = HBREG; \ + H = HRBREG; \ HBREG = B->cp_h; \ while (TR != pt0) { \ BEGD(d1); \ @@ -1967,7 +1967,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -1978,13 +1978,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -2002,7 +2002,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -2042,7 +2042,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -2053,13 +2053,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -2074,7 +2074,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -2115,7 +2115,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -2126,13 +2126,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -2148,7 +2148,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -2185,7 +2185,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -2196,13 +2196,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -2222,7 +2222,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -2248,7 +2248,7 @@ } \ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HR = HBREG; \ + H = HRBREG; \ HBREG = B->cp_h; \ while (TR != pt0) { \ BEGD(d1); \ @@ -2264,7 +2264,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -2275,13 +2275,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -2296,7 +2296,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -2322,7 +2322,7 @@ } \ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HR = HBREG; \ + H = HRBREG; \ HBREG = B->cp_h; \ while (TR != pt0) { \ BEGD(d1); \ @@ -2339,7 +2339,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -2350,13 +2350,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -2372,7 +2372,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -2398,7 +2398,7 @@ } \ B = pt1; \ SET_BB(PROTECT_FROZEN_B(pt1)); \ - HR = HBREG; \ + H = HRBREG; \ HBREG = B->cp_h; \ while (TR != pt0) { \ BEGD(d1); \ @@ -2411,7 +2411,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -2422,13 +2422,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -2446,7 +2446,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -2482,7 +2482,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -2493,13 +2493,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -2514,7 +2514,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -2551,7 +2551,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -2562,13 +2562,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -2584,7 +2584,7 @@ deref_head(d1, dif_nvar1_unk2); \ dif_nvar1_nvar2: \ if (d0 == d1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { \ @@ -2617,7 +2617,7 @@ ENDD(d1); \ } \ if (opresult) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -2628,13 +2628,13 @@ BEGP(pt0); \ deref_body(d0, pt0, dif_unk1, dif_nvar1); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ BEGP(pt0); \ deref_body(d1, pt0, dif_nvar1_unk2, dif_nvar1_nvar2); \ ENDP(pt0); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ ENDD(d1); \ ENDD(d0); @@ -2663,13 +2663,13 @@ } \ if (IsPairTerm(d0)) { \ if (!IsPairTerm(d1)) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ always_save_pc(); \ d2 = iequ_complex(RepPair(d0)-1, RepPair(d0)+1,RepPair(d1)-1); \ if (d2 == FALSE) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ always_set_pc(); \ @@ -2681,7 +2681,7 @@ Functor f1; \ \ if (!IsApplTerm(d1)) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ f1 = FunctorOfTerm(d1); \ @@ -2693,33 +2693,33 @@ (*_PREG) = NEXTOP((*_PREG), l); \ GONEXT(); \ } \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ case (CELL)FunctorLongInt: \ if (f1 != FunctorLongInt) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (LongIntOfTerm(d0) == LongIntOfTerm(d1)) { \ (*_PREG) = NEXTOP((*_PREG), l); \ GONEXT(); \ } \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ case (CELL)FunctorBigInt: \ if (f1 != FunctorBigInt) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (Yap_gmp_tcmp_big_big(d0,d1) == 0) { \ (*_PREG) = NEXTOP((*_PREG), l); \ GONEXT(); \ } \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ case (CELL)FunctorDouble: \ if (f1 != FunctorDouble) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (FloatOfTerm(d0) == FloatOfTerm(d1)) { \ @@ -2727,41 +2727,41 @@ GONEXT(); \ } \ default: \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ } \ if (f0 != f1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ always_save_pc(); \ d2 = iequ_complex(RepAppl(d0), RepAppl(d0)+ArityOfFunctor(f0), RepAppl(d1)); \ if (d2 == FALSE) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ always_set_pc(); \ (*_PREG) = NEXTOP((*_PREG), l); \ GONEXT(); \ } \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ deref_body(d1, pt0, p_eq_nvar1_unk2, p_eq_nvar1_nvar2); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ deref_body(d0, pt0, p_eq_unk1, p_eq_nvar1); \ d1 = ARG2; \ deref_head(d1, p_eq_var1_unk2); \ p_eq_var1_nvar2: \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ deref_body(d1, pt1, p_eq_var1_unk2, p_eq_var1_nvar2); \ if (pt1 != pt0) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -2785,13 +2785,13 @@ } \ if (IsPairTerm(d0)) { \ if (!IsPairTerm(d1)) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ always_save_pc(); \ d2 = iequ_complex(RepPair(d0)-1, RepPair(d0)+1,RepPair(d1)-1); \ if (d2 == FALSE) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ always_set_pc(); \ @@ -2803,7 +2803,7 @@ Functor f1; \ \ if (!IsApplTerm(d1)) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ f1 = FunctorOfTerm(d1); \ @@ -2815,22 +2815,22 @@ (*_PREG) = NEXTOP((*_PREG), l); \ GONEXT(); \ } \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ case (CELL)FunctorLongInt: \ if (f1 != FunctorLongInt) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (LongIntOfTerm(d0) == LongIntOfTerm(d1)) { \ (*_PREG) = NEXTOP((*_PREG), l); \ GONEXT(); \ } \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ case (CELL)FunctorDouble: \ if (f1 != FunctorDouble) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (FloatOfTerm(d0) == FloatOfTerm(d1)) { \ @@ -2838,41 +2838,41 @@ GONEXT(); \ } \ default: \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ } \ if (f0 != f1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ always_save_pc(); \ d2 = iequ_complex(RepAppl(d0), RepAppl(d0)+ArityOfFunctor(f0), RepAppl(d1)); \ if (d2 == FALSE) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ always_set_pc(); \ (*_PREG) = NEXTOP((*_PREG), l); \ GONEXT(); \ } \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ deref_body(d1, pt0, p_eq_nvar1_unk2, p_eq_nvar1_nvar2); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ deref_body(d0, pt0, p_eq_unk1, p_eq_nvar1); \ d1 = ARG2; \ deref_head(d1, p_eq_var1_unk2); \ p_eq_var1_nvar2: \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ deref_body(d1, pt1, p_eq_var1_unk2, p_eq_var1_nvar2); \ if (pt1 != pt0) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -2895,13 +2895,13 @@ } \ if (IsPairTerm(d0)) { \ if (!IsPairTerm(d1)) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ always_save_pc(); \ d2 = iequ_complex(RepPair(d0)-1, RepPair(d0)+1,RepPair(d1)-1); \ if (d2 == FALSE) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ always_set_pc(); \ @@ -2913,7 +2913,7 @@ Functor f1; \ \ if (!IsApplTerm(d1)) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ f1 = FunctorOfTerm(d1); \ @@ -2925,33 +2925,33 @@ (*_PREG) = NEXTOP((*_PREG), l); \ GONEXT(); \ } \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ case (CELL)FunctorLongInt: \ if (f1 != FunctorLongInt) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (LongIntOfTerm(d0) == LongIntOfTerm(d1)) { \ (*_PREG) = NEXTOP((*_PREG), l); \ GONEXT(); \ } \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ case (CELL)FunctorBigInt: \ if (f1 != FunctorBigInt) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (Yap_gmp_tcmp_big_big(d0,d1) == 0) { \ (*_PREG) = NEXTOP((*_PREG), l); \ GONEXT(); \ } \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ case (CELL)FunctorDouble: \ if (f1 != FunctorDouble) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (FloatOfTerm(d0) == FloatOfTerm(d1)) { \ @@ -2959,41 +2959,41 @@ GONEXT(); \ } \ default: \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ } \ if (f0 != f1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ always_save_pc(); \ d2 = iequ_complex(RepAppl(d0), RepAppl(d0)+ArityOfFunctor(f0), RepAppl(d1)); \ if (d2 == FALSE) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ always_set_pc(); \ (*_PREG) = NEXTOP((*_PREG), l); \ GONEXT(); \ } \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ deref_body(d1, pt0, p_eq_nvar1_unk2, p_eq_nvar1_nvar2); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ deref_body(d0, pt0, p_eq_unk1, p_eq_nvar1); \ d1 = ARG2; \ deref_head(d1, p_eq_var1_unk2); \ p_eq_var1_nvar2: \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ deref_body(d1, pt1, p_eq_var1_unk2, p_eq_var1_nvar2); \ if (pt1 != pt0) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -3014,13 +3014,13 @@ } \ if (IsPairTerm(d0)) { \ if (!IsPairTerm(d1)) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ always_save_pc(); \ d2 = iequ_complex(RepPair(d0)-1, RepPair(d0)+1,RepPair(d1)-1); \ if (d2 == FALSE) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ always_set_pc(); \ @@ -3032,7 +3032,7 @@ Functor f1; \ \ if (!IsApplTerm(d1)) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ f1 = FunctorOfTerm(d1); \ @@ -3044,22 +3044,22 @@ (*_PREG) = NEXTOP((*_PREG), l); \ GONEXT(); \ } \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ case (CELL)FunctorLongInt: \ if (f1 != FunctorLongInt) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (LongIntOfTerm(d0) == LongIntOfTerm(d1)) { \ (*_PREG) = NEXTOP((*_PREG), l); \ GONEXT(); \ } \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ case (CELL)FunctorDouble: \ if (f1 != FunctorDouble) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ if (FloatOfTerm(d0) == FloatOfTerm(d1)) { \ @@ -3067,41 +3067,41 @@ GONEXT(); \ } \ default: \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ } \ if (f0 != f1) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ always_save_pc(); \ d2 = iequ_complex(RepAppl(d0), RepAppl(d0)+ArityOfFunctor(f0), RepAppl(d1)); \ if (d2 == FALSE) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ always_set_pc(); \ (*_PREG) = NEXTOP((*_PREG), l); \ GONEXT(); \ } \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ deref_body(d1, pt0, p_eq_nvar1_unk2, p_eq_nvar1_nvar2); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ deref_body(d0, pt0, p_eq_unk1, p_eq_nvar1); \ d1 = ARG2; \ deref_head(d1, p_eq_var1_unk2); \ p_eq_var1_nvar2: \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ \ deref_body(d1, pt1, p_eq_var1_unk2, p_eq_var1_nvar2); \ if (pt1 != pt0) { \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ BACK(); \ } \ (*_PREG) = NEXTOP((*_PREG), l); \ @@ -3112,13 +3112,13 @@ #ifdef LOW_LEVEL_TRACER #define _p_arg_vv_instinit \ if (Yap_do_low_level_trace) { \ - HR[0] = XREG((*_PREG)->y_u.xxx.x1); \ - HR[1] = XREG((*_PREG)->y_u.xxx.x2); \ + H[0] = XREG((*_PREG)->u.xxx.x1); \ + H[1] = XREG((*_PREG)->u.xxx.x2); \ RESET_VARIABLE(HR+2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); \ + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),H); \ } \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.xxx.x1); \ + d0 = XREG((*_PREG)->u.xxx.x1); \ deref_head(d0, arg_arg1_unk); \ arg_arg1_nvar: \ if (IsIntTerm(d0)) { \ @@ -3133,7 +3133,7 @@ } \ \ BEGD(d1); \ - d1 = XREG((*_PREG)->y_u.xxx.x2); \ + d1 = XREG((*_PREG)->u.xxx.x2); \ deref_head(d1, arg_arg2_unk); \ arg_arg2_nvar: \ if (IsApplTerm(d1)) { \ @@ -3147,7 +3147,7 @@ (Int)d0 > ArityOfFunctor((Functor) d1)) { \ FAIL(); \ } \ - XREG((*_PREG)->y_u.xxx.x) = pt0[d0]; \ + XREG((*_PREG)->u.xxx.x) = pt0[d0]; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONEXT(); \ ENDP(pt0); \ @@ -3164,7 +3164,7 @@ } \ FAIL(); \ } \ - XREG((*_PREG)->y_u.xxx.x) = pt0[d0-1]; \ + XREG((*_PREG)->u.xxx.x) = pt0[d0-1]; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONEXT(); \ ENDP(pt0); \ @@ -3193,7 +3193,7 @@ #else /* LOW_LEVEL_TRACER */ #define _p_arg_vv_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.xxx.x1); \ + d0 = XREG((*_PREG)->u.xxx.x1); \ deref_head(d0, arg_arg1_unk); \ arg_arg1_nvar: \ if (IsIntTerm(d0)) { \ @@ -3208,7 +3208,7 @@ } \ \ BEGD(d1); \ - d1 = XREG((*_PREG)->y_u.xxx.x2); \ + d1 = XREG((*_PREG)->u.xxx.x2); \ deref_head(d1, arg_arg2_unk); \ arg_arg2_nvar: \ if (IsApplTerm(d1)) { \ @@ -3222,7 +3222,7 @@ (Int)d0 > ArityOfFunctor((Functor) d1)) { \ FAIL(); \ } \ - XREG((*_PREG)->y_u.xxx.x) = pt0[d0]; \ + XREG((*_PREG)->u.xxx.x) = pt0[d0]; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONEXT(); \ ENDP(pt0); \ @@ -3239,7 +3239,7 @@ } \ FAIL(); \ } \ - XREG((*_PREG)->y_u.xxx.x) = pt0[d0-1]; \ + XREG((*_PREG)->u.xxx.x) = pt0[d0-1]; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONEXT(); \ ENDP(pt0); \ @@ -3271,17 +3271,17 @@ #define _p_arg_cv_instinit \ if (Yap_do_low_level_trace) { \ CELL *Ho = HR; \ - Term t = MkIntegerTerm((*_PREG)->y_u.xxn.c); \ - HR[0] = t; \ - HR[1] = XREG((*_PREG)->y_u.xxn.xi); \ + Term t = MkIntegerTerm((*_PREG)->u.xxn.c); \ + H[0] = t; \ + H[1] = XREG((*_PREG)->u.xxn.xi); \ RESET_VARIABLE(HR+2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); \ - HR = Ho; \ + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),H); \ + H = HRo; \ } \ BEGD(d0); \ - d0 = (*_PREG)->y_u.xxn.c; \ + d0 = (*_PREG)->u.xxn.c; \ BEGD(d1); \ - d1 = XREG((*_PREG)->y_u.xxn.xi); \ + d1 = XREG((*_PREG)->u.xxn.xi); \ deref_head(d1, arg_arg2_vc_unk); \ arg_arg2_vc_nvar: \ if (IsApplTerm(d1)) { \ @@ -3295,7 +3295,7 @@ (Int)d0 > ArityOfFunctor((Functor) d1)) { \ FAIL(); \ } \ - XREG((*_PREG)->y_u.xxn.x) = pt0[d0]; \ + XREG((*_PREG)->u.xxn.x) = pt0[d0]; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONEXT(); \ ENDP(pt0); \ @@ -3312,7 +3312,7 @@ } \ FAIL(); \ } \ - XREG((*_PREG)->y_u.xxn.x) = pt0[d0-1]; \ + XREG((*_PREG)->u.xxn.x) = pt0[d0-1]; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONEXT(); \ ENDP(pt0); \ @@ -3333,9 +3333,9 @@ #else /* LOW_LEVEL_TRACER */ #define _p_arg_cv_instinit \ BEGD(d0); \ - d0 = (*_PREG)->y_u.xxn.c; \ + d0 = (*_PREG)->u.xxn.c; \ BEGD(d1); \ - d1 = XREG((*_PREG)->y_u.xxn.xi); \ + d1 = XREG((*_PREG)->u.xxn.xi); \ deref_head(d1, arg_arg2_vc_unk); \ arg_arg2_vc_nvar: \ if (IsApplTerm(d1)) { \ @@ -3349,7 +3349,7 @@ (Int)d0 > ArityOfFunctor((Functor) d1)) { \ FAIL(); \ } \ - XREG((*_PREG)->y_u.xxn.x) = pt0[d0]; \ + XREG((*_PREG)->u.xxn.x) = pt0[d0]; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONEXT(); \ ENDP(pt0); \ @@ -3366,7 +3366,7 @@ } \ FAIL(); \ } \ - XREG((*_PREG)->y_u.xxn.x) = pt0[d0-1]; \ + XREG((*_PREG)->u.xxn.x) = pt0[d0-1]; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONEXT(); \ ENDP(pt0); \ @@ -3389,14 +3389,14 @@ #ifdef LOW_LEVEL_TRACER #define _p_arg_y_vv_instinit \ if (Yap_do_low_level_trace) { \ - HR[0] = XREG((*_PREG)->y_u.yxx.x1); \ - HR[1] = XREG((*_PREG)->y_u.yxx.x2); \ - HR[2] = YREG[(*_PREG)->y_u.yxx.y]; \ + H[0] = XREG((*_PREG)->u.yxx.x1); \ + H[1] = XREG((*_PREG)->u.yxx.x2); \ + H[2] = YREG[(*_PREG)->u.yxx.y]; \ RESET_VARIABLE(HR+2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); \ + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),H); \ } \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.yxx.x1); \ + d0 = XREG((*_PREG)->u.yxx.x1); \ deref_head(d0, arg_y_arg1_unk); \ arg_y_arg1_nvar: \ if (IsIntTerm(d0)) { \ @@ -3411,7 +3411,7 @@ } \ \ BEGD(d1); \ - d1 = XREG((*_PREG)->y_u.yxx.x2); \ + d1 = XREG((*_PREG)->u.yxx.x2); \ deref_head(d1, arg_y_arg2_unk); \ arg_y_arg2_nvar: \ if (IsApplTerm(d1)) { \ @@ -3426,7 +3426,7 @@ FAIL(); \ } \ BEGP(pt1); \ - pt1 = YREG + (*_PREG)->y_u.yxx.y; \ + pt1 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt1,pt0[d0]); \ ENDP(pt1); \ @@ -3446,7 +3446,7 @@ FAIL(); \ } \ BEGP(pt1); \ - pt1 = YREG + (*_PREG)->y_u.yxx.y; \ + pt1 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt1,pt0[d0-1]); \ GONEXT(); \ @@ -3477,7 +3477,7 @@ #else /* LOW_LEVEL_TRACER */ #define _p_arg_y_vv_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.yxx.x1); \ + d0 = XREG((*_PREG)->u.yxx.x1); \ deref_head(d0, arg_y_arg1_unk); \ arg_y_arg1_nvar: \ if (IsIntTerm(d0)) { \ @@ -3492,7 +3492,7 @@ } \ \ BEGD(d1); \ - d1 = XREG((*_PREG)->y_u.yxx.x2); \ + d1 = XREG((*_PREG)->u.yxx.x2); \ deref_head(d1, arg_y_arg2_unk); \ arg_y_arg2_nvar: \ if (IsApplTerm(d1)) { \ @@ -3507,7 +3507,7 @@ FAIL(); \ } \ BEGP(pt1); \ - pt1 = YREG + (*_PREG)->y_u.yxx.y; \ + pt1 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt1,pt0[d0]); \ ENDP(pt1); \ @@ -3527,7 +3527,7 @@ FAIL(); \ } \ BEGP(pt1); \ - pt1 = YREG + (*_PREG)->y_u.yxx.y; \ + pt1 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt1,pt0[d0-1]); \ GONEXT(); \ @@ -3650,7 +3650,7 @@ RESET_VARIABLE(HR); \ RESET_VARIABLE(HR+1); \ d0 = AbsPair(HR); \ - HR += 2; \ + H += 2; \ } \ else if ((Int)d1 > 0) { \ if (!IsAtomTerm(d0)) { \ @@ -3683,7 +3683,7 @@ RESET_VARIABLE(pt1); \ pt1++; \ } \ - HR = pt1; \ + H = pt1; \ ENDP(pt1); \ } else if ((Int)d1 < 0) { \ saveregs(); \ @@ -3803,7 +3803,7 @@ RESET_VARIABLE(HR); \ RESET_VARIABLE(HR+1); \ d0 = AbsPair(HR); \ - HR += 2; \ + H += 2; \ } \ else if ((Int)d1 > 0) { \ if (!IsAtomTerm(d0)) { \ @@ -3836,7 +3836,7 @@ RESET_VARIABLE(pt1); \ pt1++; \ } \ - HR = pt1; \ + H = pt1; \ ENDP(pt1); \ } else if ((Int)d1 < 0) { \ saveregs(); \ diff --git a/JIT/HPP/singlecode_put.h b/JIT/HPP/singlecode_put.h index d47690044..7f5962ccb 100644 --- a/JIT/HPP/singlecode_put.h +++ b/JIT/HPP/singlecode_put.h @@ -1,9 +1,9 @@ #define _put_x_var_instinit \ register CELL *pt0; \ pt0 = HR; \ - XREG((*_PREG)->y_u.xx.xl) = Unsigned(pt0); \ + XREG((*_PREG)->u.xx.xl) = Unsigned(pt0); \ HR = pt0 + 1; \ - XREG((*_PREG)->y_u.xx.xr) = Unsigned(pt0); \ + XREG((*_PREG)->u.xx.xr) = Unsigned(pt0); \ (*_PREG) = NEXTOP((*_PREG), xx); \ RESET_VARIABLE(pt0); \ GONEXT(); @@ -11,8 +11,8 @@ #if defined(YAPOR_SBA) && defined(FROZEN_STACKS) #define _put_y_var_instinit \ register CELL *pt0; \ - pt0 = YREG + (*_PREG)->y_u.yx.y; \ - XREG((*_PREG)->y_u.yx.x) = (CELL) pt0; \ + pt0 = YREG + (*_PREG)->u.yx.y; \ + XREG((*_PREG)->u.yx.x) = (CELL) pt0; \ (*_PREG) = NEXTOP((*_PREG), yx); \ if (Unsigned((Int)(pt0)-(Int)(H_FZ)) > \ Unsigned((Int)(B_FZ)-(Int)(H_FZ))) { \ @@ -23,8 +23,8 @@ #else /* defined(YAPOR_SBA) && defined(FROZEN_STACKS) */ #define _put_y_var_instinit \ register CELL *pt0; \ - pt0 = YREG + (*_PREG)->y_u.yx.y; \ - XREG((*_PREG)->y_u.yx.x) = (CELL) pt0; \ + pt0 = YREG + (*_PREG)->u.yx.y; \ + XREG((*_PREG)->u.yx.x) = (CELL) pt0; \ (*_PREG) = NEXTOP((*_PREG), yx); \ INITIALIZE_PERMVAR(pt0, (CELL)pt0); \ GONEXT(); @@ -32,35 +32,35 @@ #define _put_x_val_instinit \ register CELL d0; \ - d0 = XREG((*_PREG)->y_u.xx.xl); \ - XREG((*_PREG)->y_u.xx.xr) = d0; \ + d0 = XREG((*_PREG)->u.xx.xl); \ + XREG((*_PREG)->u.xx.xr) = d0; \ (*_PREG) = NEXTOP((*_PREG), xx); \ GONEXT(); #define _put_xx_val_instinit \ register CELL d0, d1; \ - d0 = XREG((*_PREG)->y_u.xxxx.xl1); \ - d1 = XREG((*_PREG)->y_u.xxxx.xl2); \ - XREG((*_PREG)->y_u.xxxx.xr1) = d0; \ - XREG((*_PREG)->y_u.xxxx.xr2) = d1; \ + d0 = XREG((*_PREG)->u.xxxx.xl1); \ + d1 = XREG((*_PREG)->u.xxxx.xl2); \ + XREG((*_PREG)->u.xxxx.xr1) = d0; \ + XREG((*_PREG)->u.xxxx.xr2) = d1; \ (*_PREG) = NEXTOP((*_PREG), xxxx); \ GONEXT(); #ifdef YAPOR_SBA #define _put_y_val_instinit \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.yx.y]; \ + d0 = YREG[(*_PREG)->u.yx.y]; \ if (d0 == 0) { \ - XREG((*_PREG)->y_u.yx.x) = (CELL)(YREG+(*_PREG)->y_u.yx.y); \ + XREG((*_PREG)->u.yx.x) = (CELL)(YREG+(*_PREG)->u.yx.y); \ } else \ - XREG((*_PREG)->y_u.yx.x) = d0; \ + XREG((*_PREG)->u.yx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), yx); \ GONEXT(); #else /* YAPOR_SBA */ #define _put_y_val_instinit \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.yx.y]; \ - XREG((*_PREG)->y_u.yx.x) = d0; \ + d0 = YREG[(*_PREG)->u.yx.y]; \ + XREG((*_PREG)->u.yx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), yx); \ GONEXT(); #endif /* YAPOR_SBA */ @@ -68,51 +68,51 @@ #ifdef YAPOR_SBA #define _put_y_vals_instinit \ register CELL d0, d1; \ - d0 = YREG[(*_PREG)->y_u.yyxx.y1]; \ + d0 = YREG[(*_PREG)->u.yyxx.y1]; \ if (d0 == 0) \ - XREG((*_PREG)->y_u.yyxx.x1) = (CELL)(YREG+(*_PREG)->y_u.yyxx.y1); \ + XREG((*_PREG)->u.yyxx.x1) = (CELL)(YREG+(*_PREG)->u.yyxx.y1); \ else \ - XREG((*_PREG)->y_u.yyxx.x1) = d0; \ + XREG((*_PREG)->u.yyxx.x1) = d0; \ (*_PREG) = NEXTOP((*_PREG), yyxx); \ - d1 = YREG[PREVOP((*_PREG),yyxx)->y_u.yyxx.y2]; \ + d1 = YREG[PREVOP((*_PREG),yyxx)->u.yyxx.y2]; \ if (d1 == 0) \ - XREG(PREVOP((*_PREG)->y_u.yyxx,yyxx).x2) = (CELL)(YREG+(*_PREG)->y_u.yyxx.y2); \ + XREG(PREVOP((*_PREG)->u.yyxx,yyxx).x2) = (CELL)(YREG+(*_PREG)->u.yyxx.y2); \ else \ - XREG(PREVOP((*_PREG),yyxx)->y_u.yyxx.x2) = d1; \ + XREG(PREVOP((*_PREG),yyxx)->u.yyxx.x2) = d1; \ GONEXT(); #else /* YAPOR_SBA */ #define _put_y_vals_instinit \ register CELL d0, d1; \ - d0 = YREG[(*_PREG)->y_u.yyxx.y1]; \ - XREG((*_PREG)->y_u.yyxx.x1) = d0; \ + d0 = YREG[(*_PREG)->u.yyxx.y1]; \ + XREG((*_PREG)->u.yyxx.x1) = d0; \ (*_PREG) = NEXTOP((*_PREG), yyxx); \ - d1 = YREG[PREVOP((*_PREG),yyxx)->y_u.yyxx.y2]; \ - XREG(PREVOP((*_PREG),yyxx)->y_u.yyxx.x2) = d1; \ + d1 = YREG[PREVOP((*_PREG),yyxx)->u.yyxx.y2]; \ + XREG(PREVOP((*_PREG),yyxx)->u.yyxx.x2) = d1; \ GONEXT(); #endif /* YAPOR_SBA */ #define _put_unsafe_instinit \ BEGD(d0); \ BEGP(pt0); \ - pt0 = YREG+(*_PREG)->y_u.yx.y; \ + pt0 = YREG+(*_PREG)->u.yx.y; \ d0 = *pt0; \ deref_head(d0, punsafe_unk); \ punsafe_nonvar: \ - XREG((*_PREG)->y_u.yx.x) = d0; \ + XREG((*_PREG)->u.yx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), yx); \ GONEXT(); \ \ derefa_body(d0, pt0, punsafe_unk, punsafe_nonvar); \ if (pt0 <= HR || pt0 >= YREG) { \ - XREG((*_PREG)->y_u.yx.x) = Unsigned(pt0); \ + XREG((*_PREG)->u.yx.x) = Unsigned(pt0); \ (*_PREG) = NEXTOP((*_PREG), yx); \ GONEXT(); \ } \ else { \ Bind_Local(pt0, Unsigned(HR)); \ - XREG((*_PREG)->y_u.yx.x) = (CELL) HR; \ + XREG((*_PREG)->u.yx.x) = (CELL) HR; \ RESET_VARIABLE(HR); \ - HR++; \ + H++; \ (*_PREG) = NEXTOP((*_PREG), yx); \ GONEXT(); \ } \ @@ -121,36 +121,36 @@ #define _put_atom_instinit \ register CELL d0; \ - d0 = (*_PREG)->y_u.xc.c; \ - XREG((*_PREG)->y_u.xc.x) = d0; \ + d0 = (*_PREG)->u.xc.c; \ + XREG((*_PREG)->u.xc.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xc); \ GONEXT(); #define PUT_DBTERM_INSTINIT \ register CELL d0; \ - d0 = (*_PREG)->y_u.xD.D; \ - XREG((*_PREG)->y_u.xD.x) = d0; \ + d0 = (*_PREG)->u.xD.D; \ + XREG((*_PREG)->u.xD.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xD); \ GONext(); #define PUT_BIGINT_INSTINIT \ register CELL d0; \ - d0 = (*_PREG)->y_u.xN.b; \ - XREG((*_PREG)->y_u.xN.x) = d0; \ + d0 = (*_PREG)->u.xN.b; \ + XREG((*_PREG)->u.xN.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xN); \ GONext(); #define _put_float_instinit \ register CELL d0; \ - d0 = AbsAppl((*_PREG)->y_u.xd.d); \ - XREG((*_PREG)->y_u.xd.x) = d0; \ + d0 = AbsAppl((*_PREG)->u.xd.d); \ + XREG((*_PREG)->u.xd.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xd); \ GONEXT(); #define PUT_LONGINT_INSTINIT \ register CELL d0; \ - d0 = AbsAppl((*_PREG)->y_u.xi.i); \ - XREG((*_PREG)->y_u.xi.x) = d0; \ + d0 = AbsAppl((*_PREG)->u.xi.i); \ + XREG((*_PREG)->u.xi.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xi); \ GONext(); @@ -161,7 +161,7 @@ S_SREG = HR; \ HR += 2; \ d0 = AbsPair(S_SREG); \ - XREG((*_PREG)->y_u.x.x) = d0; \ + XREG((*_PREG)->u.x.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), x); \ WRITEBACK_S(S_SREG); \ ENDCACHE_S(); \ @@ -170,11 +170,11 @@ #define _put_struct_instinit \ register CELL d0; \ d0 = AbsAppl(HR); \ - XREG((*_PREG)->y_u.xfa.x) = d0; \ - d0 = (CELL) ((*_PREG)->y_u.xfa.f); \ - *HR++ = d0; \ + XREG((*_PREG)->u.xfa.x) = d0; \ + d0 = (CELL) ((*_PREG)->u.xfa.f); \ + *H++ = d0; \ (*_SREG) = HR; \ - HR += (*_PREG)->y_u.xfa.a; \ + HR += (*_PREG)->u.xfa.a; \ (*_PREG) = NEXTOP((*_PREG), xfa); \ GONEXT(); diff --git a/JIT/HPP/singlecode_unify.h b/JIT/HPP/singlecode_unify.h index 08d280312..99c483e0e 100644 --- a/JIT/HPP/singlecode_unify.h +++ b/JIT/HPP/singlecode_unify.h @@ -8,7 +8,7 @@ d0 = (CELL)S_SREG; \ } \ WRITEBACK_S(S_SREG+1); \ - XREG((*_PREG)->y_u.ox.x) = d0; \ + XREG((*_PREG)->u.ox.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), ox); \ GONEXT(); \ ENDD(d0); \ @@ -20,7 +20,7 @@ BEGD(d0); \ d0 = *S_SREG; \ WRITEBACK_S(S_SREG+1); \ - XREG((*_PREG)->y_u.ox.x) = d0; \ + XREG((*_PREG)->u.ox.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), ox); \ GONEXT(); \ ENDD(d0); \ @@ -31,7 +31,7 @@ register CELL *pt0; \ CACHE_S(); \ READ_IN_S(); \ - pt0 = &XREG((*_PREG)->y_u.ox.x); \ + pt0 = &XREG((*_PREG)->u.ox.x); \ (*_PREG) = NEXTOP((*_PREG), ox); \ RESET_VARIABLE(S_SREG); \ *pt0 = (CELL) S_SREG; \ @@ -44,7 +44,7 @@ BEGP(pt0); \ BEGD(d0); \ d0 = SREG[0]; \ - pt0 = &XREG((*_PREG)->y_u.ox.x); \ + pt0 = &XREG((*_PREG)->u.ox.x); \ (*_PREG) = NEXTOP((*_PREG), ox); \ if (d0 == 0) { \ d0 = (CELL)SREG; \ @@ -58,7 +58,7 @@ BEGP(pt0); \ BEGD(d0); \ d0 = (*_SREG)[0]; \ - pt0 = &XREG((*_PREG)->y_u.ox.x); \ + pt0 = &XREG((*_PREG)->u.ox.x); \ (*_PREG) = NEXTOP((*_PREG), ox); \ *pt0 = d0; \ GONEXT(); \ @@ -70,7 +70,7 @@ register CELL *pt0; \ CACHE_S(); \ READ_IN_S(); \ - pt0 = &XREG((*_PREG)->y_u.ox.x); \ + pt0 = &XREG((*_PREG)->u.ox.x); \ (*_PREG) = NEXTOP((*_PREG), ox); \ RESET_VARIABLE(S_SREG); \ *pt0 = (CELL)S_SREG; \ @@ -82,7 +82,7 @@ CACHE_S(); \ READ_IN_S(); \ BEGP(pt0); \ - pt0 = &XREG((*_PREG)->y_u.oxx.xr); \ + pt0 = &XREG((*_PREG)->u.oxx.xr); \ BEGD(d0); \ d0 = S_SREG[0]; \ BEGD(d1); \ @@ -94,7 +94,7 @@ d1 = (CELL)(S_SREG+1); \ } \ WRITEBACK_S(S_SREG+2); \ - XREG((*_PREG)->y_u.oxx.xl) = d0; \ + XREG((*_PREG)->u.oxx.xl) = d0; \ (*_PREG) = NEXTOP((*_PREG), oxx); \ *pt0 = d1; \ ENDD(d0); \ @@ -107,13 +107,13 @@ CACHE_S(); \ READ_IN_S(); \ BEGP(pt0); \ - pt0 = &XREG((*_PREG)->y_u.oxx.xr); \ + pt0 = &XREG((*_PREG)->u.oxx.xr); \ BEGD(d0); \ d0 = S_SREG[0]; \ BEGD(d1); \ d1 = S_SREG[1]; \ WRITEBACK_S(S_SREG+2); \ - XREG((*_PREG)->y_u.oxx.xl) = d0; \ + XREG((*_PREG)->u.oxx.xl) = d0; \ (*_PREG) = NEXTOP((*_PREG), oxx); \ *pt0 = d1; \ ENDD(d0); \ @@ -127,9 +127,9 @@ register CELL *pt0; \ CACHE_S(); \ READ_IN_S(); \ - pt0 = &XREG((*_PREG)->y_u.oxx.xr); \ + pt0 = &XREG((*_PREG)->u.oxx.xr); \ RESET_VARIABLE(S_SREG); \ - XREG((*_PREG)->y_u.oxx.xl) = (CELL) S_SREG; \ + XREG((*_PREG)->u.oxx.xl) = (CELL) S_SREG; \ S_SREG++; \ (*_PREG) = NEXTOP((*_PREG), oxx); \ RESET_VARIABLE(S_SREG); \ @@ -144,13 +144,13 @@ register CELL *pt0; \ CACHE_S(); \ READ_IN_S(); \ - pt0 = &XREG((*_PREG)->y_u.oxx.xr); \ + pt0 = &XREG((*_PREG)->u.oxx.xr); \ d0 = S_SREG[0]; \ d1 = S_SREG[1]; \ if (d0 == 0) \ - XREG((*_PREG)->y_u.oxx.xl) = (CELL)S_SREG; \ + XREG((*_PREG)->u.oxx.xl) = (CELL)S_SREG; \ else \ - XREG((*_PREG)->y_u.oxx.xl) = d0; \ + XREG((*_PREG)->u.oxx.xl) = d0; \ (*_PREG) = NEXTOP((*_PREG), oxx); \ if (d1 == 0) \ *pt0 = (CELL)(S_SREG+1); \ @@ -164,11 +164,11 @@ register CELL *pt0; \ CACHE_S(); \ READ_IN_S(); \ - pt0 = &XREG((*_PREG)->y_u.oxx.xr); \ + pt0 = &XREG((*_PREG)->u.oxx.xr); \ d0 = S_SREG[0]; \ d1 = S_SREG[1]; \ { \ - XREG((*_PREG)->y_u.oxx.xl) = d0; \ + XREG((*_PREG)->u.oxx.xl) = d0; \ } \ (*_PREG) = NEXTOP((*_PREG), oxx); \ { \ @@ -182,8 +182,8 @@ register CELL *pt0; \ CACHE_S(); \ READ_IN_S(); \ - pt0 = &XREG((*_PREG)->y_u.oxx.xr); \ - XREG((*_PREG)->y_u.oxx.xl) = (CELL) S_SREG; \ + pt0 = &XREG((*_PREG)->u.oxx.xr); \ + XREG((*_PREG)->u.oxx.xl) = (CELL) S_SREG; \ RESET_VARIABLE(S_SREG); \ S_SREG++; \ *pt0 = (CELL) S_SREG; \ @@ -197,7 +197,7 @@ register CELL d0; \ d0 = *(*_SREG)++; \ if (d0 == 0) { \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,(CELL)((*_SREG)-1)); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,(CELL)((*_SREG)-1)); \ } else \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONEXT(); @@ -205,7 +205,7 @@ #define _unify_y_var_instinit \ register CELL d0; \ d0 = *(*_SREG)++; \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,d0); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,d0); \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONEXT(); #endif /* YAPOR_SBA */ @@ -213,7 +213,7 @@ #define _unify_y_var_write_instinit \ CACHE_S(); \ READ_IN_S(); \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,(CELL) S_SREG); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,(CELL) S_SREG); \ (*_PREG) = NEXTOP((*_PREG), oy); \ RESET_VARIABLE(S_SREG); \ WRITEBACK_S(S_SREG+1); \ @@ -225,7 +225,7 @@ register CELL d0; \ d0 = (*_SREG)[0]; \ if (d0 == 0) { \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,(CELL)(*_SREG)); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,(CELL)(*_SREG)); \ } else \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONEXT(); @@ -233,7 +233,7 @@ #define _unify_l_y_var_instinit \ register CELL d0; \ d0 = (*_SREG)[0]; \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,d0); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,d0); \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONEXT(); #endif /* YAPOR_SBA */ @@ -241,7 +241,7 @@ #define _unify_l_y_var_write_instinit \ CACHE_S(); \ READ_IN_S(); \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,(CELL) S_SREG); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,(CELL) S_SREG); \ (*_PREG) = NEXTOP((*_PREG), oy); \ RESET_VARIABLE(S_SREG); \ ENDCACHE_S(); \ @@ -256,7 +256,7 @@ deref_head(d0, uvalx_unk); \ \ uvalx_nonvar: \ - d1 = XREG((*_PREG)->y_u.ox.x); \ + d1 = XREG((*_PREG)->u.ox.x); \ deref_head(d1, uvalx_nonvar_unk); \ \ uvalx_nonvar_nonvar: \ @@ -273,7 +273,7 @@ ENDP(pt1); \ \ derefa_body(d0, pt0, uvalx_unk, uvalx_nonvar); \ - d1 = XREG((*_PREG)->y_u.ox.x); \ + d1 = XREG((*_PREG)->u.ox.x); \ deref_head(d1, uvalx_var_unk); \ \ uvalx_var_nonvar: \ @@ -294,7 +294,7 @@ ENDD(d0); #define _unify_x_val_write_instinit \ - *(*_SREG)++ = XREG((*_PREG)->y_u.ox.x); \ + *(*_SREG)++ = XREG((*_PREG)->u.ox.x); \ (*_PREG) = NEXTOP((*_PREG), ox); \ GONEXTW(); @@ -307,7 +307,7 @@ deref_head(d0, ulvalx_unk); \ \ ulvalx_nonvar: \ - d1 = XREG((*_PREG)->y_u.ox.x); \ + d1 = XREG((*_PREG)->u.ox.x); \ deref_head(d1, ulvalx_nonvar_unk); \ \ ulvalx_nonvar_nonvar: \ @@ -322,7 +322,7 @@ ENDP(pt1); \ \ derefa_body(d0, pt0, ulvalx_unk, ulvalx_nonvar); \ - d1 = XREG((*_PREG)->y_u.ox.x); \ + d1 = XREG((*_PREG)->u.ox.x); \ deref_head(d1, ulvalx_var_unk); \ \ ulvalx_var_nonvar: \ @@ -341,7 +341,7 @@ ENDD(d0); #define _unify_l_x_val_write_instinit \ - (*_SREG)[0] = XREG((*_PREG)->y_u.ox.x); \ + (*_SREG)[0] = XREG((*_PREG)->u.ox.x); \ (*_PREG) = NEXTOP((*_PREG), ox); \ GONEXT(); @@ -352,7 +352,7 @@ d0 = *pt0; #define UNIFY_Y_VAL_UVALY_NONVAR \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_Y_VAL_UVALY_NONVAR_NONVAR \ @@ -368,7 +368,7 @@ GONext(); #define UNIFY_Y_VAL_UVALY_UNK \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_Y_VAL_UVALY_VAR_NONVAR \ @@ -386,9 +386,9 @@ #ifdef YAPOR_SBA #define UNIFY_Y_VAL_WRITE_INSTINIT \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.oy.y]; \ + d0 = YREG[(*_PREG)->u.oy.y]; \ if (d0 == 0) \ - *(*_SREG)++ = (CELL)(YREG+(*_PREG)->y_u.oy.y); \ + *(*_SREG)++ = (CELL)(YREG+(*_PREG)->u.oy.y); \ else \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), oy); \ @@ -396,7 +396,7 @@ #else /* YAPOR_SBA */ #define UNIFY_Y_VAL_WRITE_INSTINIT \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.oy.y]; \ + d0 = YREG[(*_PREG)->u.oy.y]; \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONextW(); @@ -409,7 +409,7 @@ d0 = *pt0; #define UNIFY_L_Y_VAL_ULVALY_NONVAR \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_L_Y_VAL_ULVALY_NONVAR_NONVAR \ @@ -423,7 +423,7 @@ GONext(); #define UNIFY_L_Y_VAL_ULVALY_UNK \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_L_Y_VAL_ULVALY_VAR_NONVAR \ @@ -439,9 +439,9 @@ #ifdef YAPOR_SBA #define UNIFY_L_Y_VAL_WRITE_INSTINIT \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.oy.y]; \ + d0 = YREG[(*_PREG)->u.oy.y]; \ if (d0 == 0) \ - (*_SREG)[0] = (CELL)(YREG+(*_PREG)->y_u.oy.y); \ + (*_SREG)[0] = (CELL)(YREG+(*_PREG)->u.oy.y); \ else \ (*_SREG)[0] = d0; \ (*_PREG) = NEXTOP((*_PREG), oy); \ @@ -449,7 +449,7 @@ #else /* YAPOR_SBA */ #define UNIFY_L_Y_VAL_WRITE_INSTINIT \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.oy.y]; \ + d0 = YREG[(*_PREG)->u.oy.y]; \ (*_SREG)[0] = d0; \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONext(); @@ -464,7 +464,7 @@ deref_head(d0, uvalx_loc_unk); \ \ uvalx_loc_nonvar: \ - d1 = XREG((*_PREG)->y_u.ox.x); \ + d1 = XREG((*_PREG)->u.ox.x); \ deref_head(d1, uvalx_loc_nonvar_unk); \ \ uvalx_loc_nonvar_nonvar: \ @@ -481,7 +481,7 @@ ENDP(pt1); \ \ derefa_body(d0, pt0, uvalx_loc_unk, uvalx_loc_nonvar); \ - d1 = XREG((*_PREG)->y_u.ox.x); \ + d1 = XREG((*_PREG)->u.ox.x); \ deref_head(d1, uvalx_loc_var_unk); \ \ uvalx_loc_var_nonvar: \ @@ -503,7 +503,7 @@ #define _unify_x_loc_write_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.ox.x); \ + d0 = XREG((*_PREG)->u.ox.x); \ deref_head(d0, unify_x_loc_unk); \ unify_x_loc_nonvar: \ *(*_SREG)++ = d0; \ @@ -538,7 +538,7 @@ deref_head(d0, ulvalx_loc_unk); \ \ ulvalx_loc_nonvar: \ - d1 = XREG((*_PREG)->y_u.ox.x); \ + d1 = XREG((*_PREG)->u.ox.x); \ deref_head(d1, ulvalx_loc_nonvar_unk); \ \ ulvalx_loc_nonvar_nonvar: \ @@ -551,7 +551,7 @@ GONEXT(); \ \ derefa_body(d0, pt0, ulvalx_loc_unk, ulvalx_loc_nonvar); \ - d1 = XREG((*_PREG)->y_u.ox.x); \ + d1 = XREG((*_PREG)->u.ox.x); \ deref_head(d1, ulvalx_loc_var_unk); \ \ ulvalx_loc_var_nonvar: \ @@ -571,7 +571,7 @@ #define _unify_l_x_loc_write_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.ox.x); \ + d0 = XREG((*_PREG)->u.ox.x); \ deref_head(d0, ulnify_x_loc_unk); \ ulnify_x_loc_nonvar: \ (*_SREG)[0] = d0; \ @@ -600,7 +600,7 @@ d0 = *pt0; #define UNIFY_Y_LOC_UVALY_LOC_NONVAR \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_Y_LOC_UVALY_LOC_NONVAR_NONVAR \ @@ -616,7 +616,7 @@ GONext(); #define UNIFY_Y_LOC_UVALY_LOC_UNK \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_Y_LOC_UVALY_LOC_VAR_NONVAR \ @@ -634,7 +634,7 @@ #define UNIFY_Y_LOC_WRITE_INSTINIT \ register CELL d0; \ register CELL *pt0; \ - pt0 = YREG+(*_PREG)->y_u.oy.y; \ + pt0 = YREG+(*_PREG)->u.oy.y; \ d0 = *pt0; #define UNIFY_Y_LOC_WRITE_UNIFY_Y_LOC_NONVAR \ @@ -665,7 +665,7 @@ d0 = *pt0; #define UNIFY_L_Y_LOC_ULVALY_LOC_NONVAR \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_L_Y_LOC_ULVALY_LOC_NONVAR_NONVAR \ @@ -679,7 +679,7 @@ GONext(); #define UNIFY_L_Y_LOC_ULVALY_LOC_UNK \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_L_Y_LOC_ULVALY_LOC_VAR_NONVAR \ @@ -695,7 +695,7 @@ #define UNIFY_L_Y_LOC_WRITE_INSTINIT \ register CELL d0; \ register CELL *pt0; \ - pt0 = YREG+(*_PREG)->y_u.oy.y; \ + pt0 = YREG+(*_PREG)->u.oy.y; \ d0 = *pt0; #define UNIFY_L_Y_LOC_WRITE_ULUNIFY_Y_LOC_NONVAR \ @@ -742,14 +742,14 @@ GONext(); #define _unify_n_voids_instinit \ - (*_SREG) += (*_PREG)->y_u.os.s; \ + (*_SREG) += (*_PREG)->u.os.s; \ (*_PREG) = NEXTOP((*_PREG), os); \ GONEXT(); #define _unify_n_voids_write_instinit \ register CELL d0; \ CACHE_S(); \ - d0 = (*_PREG)->y_u.os.s; \ + d0 = (*_PREG)->u.os.s; \ READ_IN_S(); \ (*_PREG) = NEXTOP((*_PREG), os); \ for (; d0 > 0; d0--) { \ @@ -766,7 +766,7 @@ #define _unify_l_n_voids_write_instinit \ register CELL d0; \ - d0 = (*_PREG)->y_u.os.s; \ + d0 = (*_PREG)->u.os.s; \ (*_PREG) = NEXTOP((*_PREG), os); \ CACHE_S(); \ READ_IN_S(); \ @@ -784,14 +784,14 @@ d0 = *pt0; \ deref_head(d0, uatom_unk); \ uatom_nonvar: \ - if (d0 != (*_PREG)->y_u.oc.c) { \ + if (d0 != (*_PREG)->u.oc.c) { \ FAIL(); \ } \ (*_PREG) = NEXTOP((*_PREG), oc); \ GONEXT(); \ \ derefa_body(d0, pt0, uatom_unk, uatom_nonvar); \ - d0 = (*_PREG)->y_u.oc.c; \ + d0 = (*_PREG)->u.oc.c; \ (*_PREG) = NEXTOP((*_PREG), oc); \ Bind_Global(pt0, d0); \ GONEXT(); \ @@ -799,7 +799,7 @@ ENDD(d0); #define _unify_atom_write_instinit \ - * (*_SREG)++ = (*_PREG)->y_u.oc.c; \ + * (*_SREG)++ = (*_PREG)->u.oc.c; \ (*_PREG) = NEXTOP((*_PREG), oc); \ GONEXTW(); @@ -810,14 +810,14 @@ d0 = *(*_SREG); \ deref_head(d0, ulatom_unk); \ ulatom_nonvar: \ - if (d0 != (*_PREG)->y_u.oc.c) { \ + if (d0 != (*_PREG)->u.oc.c) { \ FAIL(); \ } \ (*_PREG) = NEXTOP((*_PREG), oc); \ GONEXT(); \ \ derefa_body(d0, pt0, ulatom_unk, ulatom_nonvar); \ - d0 = (*_PREG)->y_u.oc.c; \ + d0 = (*_PREG)->u.oc.c; \ (*_PREG) = NEXTOP((*_PREG), oc); \ Bind_Global(pt0, d0); \ GONEXT(); \ @@ -825,15 +825,15 @@ ENDD(d0); #define _unify_l_atom_write_instinit \ - (*_SREG)[0] = (*_PREG)->y_u.oc.c; \ + (*_SREG)[0] = (*_PREG)->u.oc.c; \ (*_PREG) = NEXTOP((*_PREG), oc); \ GONEXT(); #define UNIFY_N_ATOMS_INSTINIT \ - register Int i = (*_PREG)->y_u.osc.s; \ + register Int i = (*_PREG)->u.osc.s; \ register CELL d0, d1; \ register CELL *pt0; \ - d1 = (*_PREG)->y_u.osc.c; \ + d1 = (*_PREG)->u.osc.c; \ for (; i > 0; i--) { \ pt0 = (*_SREG)++; \ d0 = *pt0; \ @@ -865,8 +865,8 @@ #define UNIFY_N_ATOMS_WRITE_INSTINIT \ register CELL d0, d1; \ - d0 = (*_PREG)->y_u.osc.s; \ - d1 = (*_PREG)->y_u.osc.c; \ + d0 = (*_PREG)->u.osc.s; \ + d1 = (*_PREG)->u.osc.c; \ CACHE_S(); \ READ_IN_S(); \ (*_PREG) = NEXTOP((*_PREG), osc); \ @@ -888,20 +888,20 @@ d0 = *pt0; #define UNIFY_FLOAT_UFLOAT_NONVAR_D0ISFUNCTOR \ - pt1 = (*_PREG)->y_u.od.d; \ + pt1 = (*_PREG)->u.od.d; \ (*_PREG) = NEXTOP((*_PREG), od); #define UNIFY_FLOAT_UFLOAT_NONVAR_END \ GONext(); #define UNIFY_FLOAT_UFLOAT_UNK \ - d1 = AbsAppl((*_PREG)->y_u.od.d); \ + d1 = AbsAppl((*_PREG)->u.od.d); \ (*_PREG) = NEXTOP((*_PREG), od); \ Bind_Global(pt0, d1); \ GONext(); #define UNIFY_FLOAT_WRITE_INSTINIT \ - * (*_SREG)++ = AbsAppl((*_PREG)->y_u.od.d); \ + * (*_SREG)++ = AbsAppl((*_PREG)->u.od.d); \ (*_PREG) = NEXTOP((*_PREG), od); \ GONextW(); @@ -925,7 +925,7 @@ } \ ENDD(d0); \ BEGP(pt1); \ - pt1 = (*_PREG)->y_u.od.d; \ + pt1 = (*_PREG)->u.od.d; \ (*_PREG) = NEXTOP((*_PREG), od); \ if ( \ pt1[1] != pt0[1] \ @@ -939,7 +939,7 @@ \ derefa_body(d0, S_SREG, ulfloat_unk, ulfloat_nonvar); \ BEGD(d1); \ - d1 = AbsAppl((*_PREG)->y_u.od.d); \ + d1 = AbsAppl((*_PREG)->u.od.d); \ (*_PREG) = NEXTOP((*_PREG), od); \ Bind_Global(S_SREG, d1); \ GONEXT(); \ @@ -966,7 +966,7 @@ } \ ENDD(d0); \ BEGP(pt1); \ - pt1 = (*_PREG)->y_u.od.d; \ + pt1 = (*_PREG)->u.od.d; \ (*_PREG) = NEXTOP((*_PREG), od); \ if ( \ pt1[1] != pt0[1] \ @@ -979,7 +979,7 @@ \ derefa_body(d0, S_SREG, ulfloat_unk, ulfloat_nonvar); \ BEGD(d1); \ - d1 = AbsAppl((*_PREG)->y_u.od.d); \ + d1 = AbsAppl((*_PREG)->u.od.d); \ (*_PREG) = NEXTOP((*_PREG), od); \ Bind_Global(S_SREG, d1); \ GONEXT(); \ @@ -989,7 +989,7 @@ #endif /* SIZEOF_DOUBLE == 2*SIZEOF_INT_P */ #define _unify_l_float_write_instinit \ - (*_SREG)[0] = AbsAppl((*_PREG)->y_u.od.d); \ + (*_SREG)[0] = AbsAppl((*_PREG)->u.od.d); \ (*_PREG) = NEXTOP((*_PREG), od); \ GONEXT(); @@ -1004,20 +1004,20 @@ d0 = *pt0; #define UNIFY_LONGINT_D0ISFUNC \ - pt1 = (*_PREG)->y_u.oi.i; \ + pt1 = (*_PREG)->u.oi.i; \ (*_PREG) = NEXTOP((*_PREG), oi); #define UNIFY_LONGINT_EQUALS \ GONext(); #define UNIFY_LONGINT_ULONGINT_UNK \ - d1 = AbsAppl((*_PREG)->y_u.oi.i); \ + d1 = AbsAppl((*_PREG)->u.oi.i); \ (*_PREG) = NEXTOP((*_PREG), oi); \ Bind_Global(pt0, d1); \ GONext(); #define UNIFY_LONGINT_WRITE_INSTINIT \ - * (*_SREG)++ = AbsAppl((*_PREG)->y_u.oi.i); \ + * (*_SREG)++ = AbsAppl((*_PREG)->u.oi.i); \ (*_PREG) = NEXTOP((*_PREG), oi); \ GONextW(); @@ -1033,20 +1033,20 @@ d0 = *pt0; #define UNIFY_L_LONGINT_D0ISFUNC \ - pt1 = (*_PREG)->y_u.oi.i; \ + pt1 = (*_PREG)->u.oi.i; \ (*_PREG) = NEXTOP((*_PREG), oi); #define UNIFY_L_LONGINT_EQUALS \ GONext(); #define UNIFY_L_LONGINT_ULLONGINT_UNK \ - d1 = AbsAppl((*_PREG)->y_u.oi.i); \ + d1 = AbsAppl((*_PREG)->u.oi.i); \ (*_PREG) = NEXTOP((*_PREG), oi); \ Bind_Global(S_SREG, d1); \ GONext(); #define UNIFY_L_LONGINT_WRITE_INSTINIT \ - (*_SREG)[0] = AbsAppl((*_PREG)->y_u.oi.i); \ + (*_SREG)[0] = AbsAppl((*_PREG)->u.oi.i); \ (*_PREG) = NEXTOP((*_PREG), oi); \ GONext(); @@ -1066,7 +1066,7 @@ GONext(); #define UNIFY_BIGINT_UBIGINT_UNK \ - d1 = (*_PREG)->y_u.oN.b; \ + d1 = (*_PREG)->u.oN.b; \ (*_PREG) = NEXTOP((*_PREG), oN); \ Bind_Global(pt0, d1); \ GONext(); @@ -1089,7 +1089,7 @@ GONext(); #define UNIFY_L_BIGINT_ULBIGINT_UNK \ - d1 = (*_PREG)->y_u.oN.b; \ + d1 = (*_PREG)->u.oN.b; \ (*_PREG) = NEXTOP((*_PREG), oN); \ Bind_Global(S_SREG, d1); \ GONext(); \ @@ -1104,12 +1104,12 @@ #define UNIFY_DBTERM_UDBTERM_NONVAR \ BLOCK = (CELL)UNIFY_DBTERM_UDBTERM_NONVAR; \ - d1 = (*_PREG)->y_u.oD.D; \ + d1 = (*_PREG)->u.oD.D; \ (*_PREG) = NEXTOP((*_PREG), oD); \ YAAM_UNIFYBOUND; #define UNIFY_DBTERM_UDBTERM_UNK \ - d1 = (*_PREG)->y_u.oD.D; \ + d1 = (*_PREG)->u.oD.D; \ (*_PREG) = NEXTOP((*_PREG), oD); \ Bind_Global(pt0, d1); \ GONext(); @@ -1123,12 +1123,12 @@ #define UNIFY_L_DBTERM_ULDBTERM_NONVAR \ BLOCK = (CELL)UNIFY_L_DBTERM_ULDBTERM_NONVAR; \ - d1 = (*_PREG)->y_u.oD.D; \ + d1 = (*_PREG)->u.oD.D; \ (*_PREG) = NEXTOP((*_PREG), oD); \ YAAM_UNIFYBOUND; #define UNIFY_L_DBTERM_ULDBTERM_UNK \ - d1 = (*_PREG)->y_u.oD.D; \ + d1 = (*_PREG)->u.oD.D; \ (*_PREG) = NEXTOP((*_PREG), oD); \ Bind_Global(S_SREG, d1); \ GONext(); \ @@ -1241,7 +1241,7 @@ CACHE_S(); \ READ_IN_S(); \ S_SREG = RepAppl(d0); \ - d0 = (CELL) ((*_PREG)->y_u.ofa.f); \ + d0 = (CELL) ((*_PREG)->u.ofa.f); \ if (*S_SREG != d0) { \ FAIL(); \ } \ @@ -1256,9 +1256,9 @@ Bind_Global(pt0, d1); \ pt0 = HR; \ ENDD(d1); \ - d0 = (CELL) ((*_PREG)->y_u.ofa.f); \ + d0 = (CELL) ((*_PREG)->u.ofa.f); \ *pt0++ = d0; \ - HR = pt0 + (*_PREG)->y_u.ofa.a; \ + HR = pt0 + (*_PREG)->u.ofa.a; \ (*_PREG) = NEXTOP((*_PREG), ofa); \ (*_SREG) = pt0; \ GONEXTW(); \ @@ -1274,9 +1274,9 @@ d0 = AbsAppl(HR); \ S_SREG[0] = d0; \ S_SREG = HR; \ - d0 = (CELL) ((*_PREG)->y_u.ofa.f); \ + d0 = (CELL) ((*_PREG)->u.ofa.f); \ *S_SREG++ = d0; \ - HR = S_SREG + (*_PREG)->y_u.ofa.a; \ + HR = S_SREG + (*_PREG)->u.ofa.a; \ (*_PREG) = NEXTOP((*_PREG), ofa); \ WRITEBACK_S(S_SREG); \ ENDCACHE_S(); \ @@ -1294,7 +1294,7 @@ FAIL(); \ } \ (*_SREG) = RepAppl(d0); \ - d0 = (CELL) ((*_PREG)->y_u.ofa.f); \ + d0 = (CELL) ((*_PREG)->u.ofa.f); \ if (*(*_SREG)++ != d0) { \ FAIL(); \ } \ @@ -1307,9 +1307,9 @@ Bind_Global(pt0, d1); \ pt0 = HR; \ ENDD(d1); \ - d0 = (CELL) ((*_PREG)->y_u.ofa.f); \ + d0 = (CELL) ((*_PREG)->u.ofa.f); \ *pt0++ = d0; \ - HR = pt0 + (*_PREG)->y_u.ofa.a; \ + HR = pt0 + (*_PREG)->u.ofa.a; \ (*_PREG) = NEXTOP((*_PREG), ofa); \ (*_SREG) = pt0; \ GONEXTW(); \ @@ -1323,51 +1323,51 @@ READ_IN_S(); \ S_SREG[0] = d0; \ S_SREG = HR; \ - d0 = (CELL) ((*_PREG)->y_u.ofa.f); \ + d0 = (CELL) ((*_PREG)->u.ofa.f); \ *S_SREG++ = d0; \ - HR = S_SREG + (*_PREG)->y_u.ofa.a; \ + HR = S_SREG + (*_PREG)->u.ofa.a; \ (*_PREG) = NEXTOP((*_PREG), ofa); \ WRITEBACK_S(S_SREG); \ ENDCACHE_S(); \ GONEXTW(); #define _save_pair_x_instinit \ - XREG((*_PREG)->y_u.ox.x) = AbsPair((*_SREG)); \ + XREG((*_PREG)->u.ox.x) = AbsPair((*_SREG)); \ (*_PREG) = NEXTOP((*_PREG), ox); \ GONEXT(); #define _save_pair_x_write_instinit \ - XREG((*_PREG)->y_u.ox.x) = AbsPair((*_SREG)); \ + XREG((*_PREG)->u.ox.x) = AbsPair((*_SREG)); \ (*_PREG) = NEXTOP((*_PREG), ox); \ GONEXTW(); #define SAVE_PAIR_Y_INSTINIT \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,AbsPair((*_SREG))); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,AbsPair((*_SREG))); \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONext(); #define SAVE_PAIR_Y_WRITE_INSTINIT \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,AbsPair((*_SREG))); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,AbsPair((*_SREG))); \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONextW(); #define _save_appl_x_instinit \ - XREG((*_PREG)->y_u.ox.x) = AbsAppl((*_SREG) - 1); \ + XREG((*_PREG)->u.ox.x) = AbsAppl((*_SREG) - 1); \ (*_PREG) = NEXTOP((*_PREG), ox); \ GONEXT(); #define _save_appl_x_write_instinit \ - XREG((*_PREG)->y_u.ox.x) = AbsAppl((*_SREG) - 1); \ + XREG((*_PREG)->u.ox.x) = AbsAppl((*_SREG) - 1); \ (*_PREG) = NEXTOP((*_PREG), ox); \ GONEXTW(); #define SAVE_APPL_Y_INSTINIT \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,AbsAppl((*_SREG)-1)); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,AbsAppl((*_SREG)-1)); \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONext(); #define SAVE_APPL_Y_WRITE_INSTINIT \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,AbsAppl((*_SREG)-1)); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,AbsAppl((*_SREG)-1)); \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONextW(); diff --git a/JIT/HPP/singlecode_write.h b/JIT/HPP/singlecode_write.h index 581245174..e53777b44 100644 --- a/JIT/HPP/singlecode_write.h +++ b/JIT/HPP/singlecode_write.h @@ -1,5 +1,5 @@ #define WRITE_X_VAR_INSTINIT \ - XREG((*_PREG)->y_u.x.x) = Unsigned((*_SREG)); \ + XREG((*_PREG)->u.x.x) = Unsigned((*_SREG)); \ (*_PREG) = NEXTOP((*_PREG), x); \ RESET_VARIABLE((*_SREG)); \ (*_SREG)++; \ @@ -13,7 +13,7 @@ #define WRITE_N_VOIDS_INSTINIT \ register CELL d0; \ - d0 = (*_PREG)->y_u.s.s; \ + d0 = (*_PREG)->u.s.s; \ (*_PREG) = NEXTOP((*_PREG), s); \ for (; d0 > 0; d0--) { \ RESET_VARIABLE((*_SREG)); \ @@ -22,7 +22,7 @@ GONext(); #define _write_y_var_instinit \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.y.y,Unsigned((*_SREG))); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.y.y,Unsigned((*_SREG))); \ (*_PREG) = NEXTOP((*_PREG), y); \ RESET_VARIABLE((*_SREG)); \ (*_SREG)++; \ @@ -30,7 +30,7 @@ #define _write_x_val_instinit \ register CELL d0; \ - d0 = XREG((*_PREG)->y_u.x.x); \ + d0 = XREG((*_PREG)->u.x.x); \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), x); \ GONEXT(); @@ -39,7 +39,7 @@ #ifdef FROZEN_STACKS #define _write_x_loc_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.x.x); \ + d0 = XREG((*_PREG)->u.x.x); \ (*_PREG) = NEXTOP((*_PREG), x); \ deref_head(d0, w_x_unk); \ w_x_bound: \ @@ -63,7 +63,7 @@ #else /* FROZEN_STACKS */ #define _write_x_loc_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.x.x); \ + d0 = XREG((*_PREG)->u.x.x); \ (*_PREG) = NEXTOP((*_PREG), x); \ deref_head(d0, w_x_unk); \ w_x_bound: \ @@ -90,7 +90,7 @@ #ifdef FROZEN_STACKS #define _write_x_loc_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.x.x); \ + d0 = XREG((*_PREG)->u.x.x); \ (*_PREG) = NEXTOP((*_PREG), x); \ deref_head(d0, w_x_unk); \ w_x_bound: \ @@ -114,7 +114,7 @@ #else /* FROZEN_STACKS */ #define _write_x_loc_instinit \ BEGD(d0); \ - d0 = XREG((*_PREG)->y_u.x.x); \ + d0 = XREG((*_PREG)->u.x.x); \ (*_PREG) = NEXTOP((*_PREG), x); \ deref_head(d0, w_x_unk); \ w_x_bound: \ @@ -142,9 +142,9 @@ #ifdef YAPOR_SBA #define _write_y_val_instinit \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.y.y]; \ + d0 = YREG[(*_PREG)->u.y.y]; \ if (d0 == 0) \ - *(*_SREG)++ = (CELL)(YREG+(*_PREG)->y_u.y.y); \ + *(*_SREG)++ = (CELL)(YREG+(*_PREG)->u.y.y); \ else \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), y); \ @@ -152,7 +152,7 @@ #else /* YAPOR_SBA */ #define _write_y_val_instinit \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.y.y]; \ + d0 = YREG[(*_PREG)->u.y.y]; \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), y); \ GONEXT(); @@ -163,7 +163,7 @@ #define _write_y_loc_instinit \ BEGD(d0); \ BEGP(pt0); \ - pt0 = YREG+(*_PREG)->y_u.y.y; \ + pt0 = YREG+(*_PREG)->u.y.y; \ d0 = *pt0; \ deref_head(d0, w_y_unk); \ w_y_bound: \ @@ -191,7 +191,7 @@ #define _write_y_loc_instinit \ BEGD(d0); \ BEGP(pt0); \ - pt0 = YREG+(*_PREG)->y_u.y.y; \ + pt0 = YREG+(*_PREG)->u.y.y; \ d0 = *pt0; \ deref_head(d0, w_y_unk); \ w_y_bound: \ @@ -222,7 +222,7 @@ #define _write_y_loc_instinit \ BEGD(d0); \ BEGP(pt0); \ - pt0 = YREG+(*_PREG)->y_u.y.y; \ + pt0 = YREG+(*_PREG)->u.y.y; \ d0 = *pt0; \ deref_head(d0, w_y_unk); \ w_y_bound: \ @@ -249,7 +249,7 @@ #define _write_y_loc_instinit \ BEGD(d0); \ BEGP(pt0); \ - pt0 = YREG+(*_PREG)->y_u.y.y; \ + pt0 = YREG+(*_PREG)->u.y.y; \ d0 = *pt0; \ deref_head(d0, w_y_unk); \ w_y_bound: \ @@ -278,43 +278,43 @@ #define _write_atom_instinit \ register CELL d0; \ - d0 = (*_PREG)->y_u.c.c; \ + d0 = (*_PREG)->u.c.c; \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), c); \ GONEXT(); #define WRITE_BIGINT_INSTINIT \ register CELL d0; \ - d0 = (*_PREG)->y_u.N.b; \ + d0 = (*_PREG)->u.N.b; \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), N); \ GONext(); #define _write_dbterm_instinit \ register CELL d0; \ - d0 = (*_PREG)->y_u.D.D; \ + d0 = (*_PREG)->u.D.D; \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), D); \ GONEXT(); #define _write_float_instinit \ register CELL d0; \ - d0 = AbsAppl((*_PREG)->y_u.d.d); \ + d0 = AbsAppl((*_PREG)->u.d.d); \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), d); \ GONEXT(); #define WRITE_LONGIT_INSTINIT \ register CELL d0; \ - d0 = AbsAppl((*_PREG)->y_u.i.i); \ + d0 = AbsAppl((*_PREG)->u.i.i); \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), i); \ GONext(); #define WRITE_N_ATOMS_INSTINIT \ register CELL d0, d1; \ - d0 = (*_PREG)->y_u.sc.s; \ - d1 = (*_PREG)->y_u.sc.c; \ + d0 = (*_PREG)->u.sc.s; \ + d1 = (*_PREG)->u.sc.c; \ for (; d0 > 0; d0--) { \ *(*_SREG)++ = d1; \ } \ @@ -352,9 +352,9 @@ SP[-1] = Unsigned((*_SREG)); \ SP[-2] = 1; \ SP -= 2; \ - d0 = (CELL) ((*_PREG)->y_u.fa.f); \ - *HR++ = d0; \ - d0 = (*_PREG)->y_u.fa.a; \ + d0 = (CELL) ((*_PREG)->u.fa.f); \ + *H++ = d0; \ + d0 = (*_PREG)->u.fa.a; \ (*_PREG) = NEXTOP((*_PREG), fa); \ (*_SREG) = HR; \ HR += d0; \ @@ -364,10 +364,10 @@ register CELL d0; \ d0 = AbsAppl(HR); \ *(*_SREG) = d0; \ - d0 = (CELL) ((*_PREG)->y_u.fa.f); \ - *HR++ = d0; \ + d0 = (CELL) ((*_PREG)->u.fa.f); \ + *H++ = d0; \ (*_SREG) = HR; \ - d0 = (*_PREG)->y_u.fa.a; \ + d0 = (*_PREG)->u.fa.a; \ (*_PREG) = NEXTOP((*_PREG), fa); \ HR += d0; \ GONEXT(); diff --git a/JIT/HPP/sprint_op.hh b/JIT/HPP/sprint_op.hh new file mode 100644 index 000000000..ce0da6d92 --- /dev/null +++ b/JIT/HPP/sprint_op.hh @@ -0,0 +1,3182 @@ +void sprint_op(char*, char*, op_numbers, char*); + +void +sprint_op(char *out, char* prepend_term, op_numbers op, char* append_term) { + char tmp[1024]; + switch(op){ + case _Ystop : + sprintf(tmp, "_Ystop"); + break; + + case _Nstop : + sprintf(tmp, "_Nstop"); + break; + + case _try_me : + sprintf(tmp, "_try_me"); + break; + + case _retry_me : + sprintf(tmp, "_retry_me"); + break; + + case _trust_me : + sprintf(tmp, "_trust_me"); + break; + + case _enter_profiling : + sprintf(tmp, "_enter_profiling"); + break; + + case _retry_profiled : + sprintf(tmp, "_retry_profiled"); + break; + + case _profiled_retry_me : + sprintf(tmp, "_profiled_retry_me"); + break; + + case _profiled_trust_me : + sprintf(tmp, "_profiled_trust_me"); + break; + + case _profiled_retry_logical : + sprintf(tmp, "_profiled_retry_logical"); + break; + + case _profiled_trust_logical : + sprintf(tmp, "_profiled_trust_logical"); + break; + + case _count_call : + sprintf(tmp, "_count_call"); + break; + + case _count_retry : + sprintf(tmp, "_count_retry"); + break; + + case _count_retry_me : + sprintf(tmp, "_count_retry_me"); + break; + + case _count_trust_me : + sprintf(tmp, "_count_trust_me"); + break; + + case _count_retry_logical : + sprintf(tmp, "_count_retry_logical"); + break; + + case _count_trust_logical : + sprintf(tmp, "_count_trust_logical"); + break; + + case _lock_lu : + sprintf(tmp, "_lock_lu"); + break; + + case _unlock_lu : + sprintf(tmp, "_unlock_lu"); + break; + + case _alloc_for_logical_pred : + sprintf(tmp, "_alloc_for_logical_pred"); + break; + + case _copy_idb_term : + sprintf(tmp, "_copy_idb_term"); + break; + + case _unify_idb_term : + sprintf(tmp, "_unify_idb_term"); + break; + + case _ensure_space : + sprintf(tmp, "_ensure_space"); + break; + + case _spy_or_trymark : + sprintf(tmp, "_spy_or_trymark"); + break; + + case _try_and_mark : + sprintf(tmp, "_try_and_mark"); + break; + + case _count_retry_and_mark : + sprintf(tmp, "_count_retry_and_mark"); + break; + + case _profiled_retry_and_mark : + sprintf(tmp, "_profiled_retry_and_mark"); + break; + + case _retry_and_mark : + sprintf(tmp, "_retry_and_mark"); + break; + + case _trust_fail : + sprintf(tmp, "_trust_fail"); + break; + + case _op_fail : + sprintf(tmp, "_op_fail"); + break; + + case _cut : + sprintf(tmp, "_cut"); + break; + + case _cut_t : + sprintf(tmp, "_cut_t"); + break; + + case _cut_e : + sprintf(tmp, "_cut_e"); + break; + + case _save_b_x : + sprintf(tmp, "_save_b_x"); + break; + + case _save_b_y : + sprintf(tmp, "_save_b_y"); + break; + + case _commit_b_x : + sprintf(tmp, "_commit_b_x"); + break; + + case _commit_b_y : + sprintf(tmp, "_commit_b_y"); + break; + + case _execute : + sprintf(tmp, "_execute"); + break; + + case _dexecute : + sprintf(tmp, "_dexecute"); + break; + + case _fcall : + sprintf(tmp, "_fcall"); + break; + + case _call : + sprintf(tmp, "_call"); + break; + + case _procceed : + sprintf(tmp, "_procceed"); + break; + + case _allocate : + sprintf(tmp, "_allocate"); + break; + + case _deallocate : + sprintf(tmp, "_deallocate"); + break; + +#ifdef BEAM + case _retry_eam : + sprintf(tmp, "_retry_eam"); + break; + +#endif +#ifdef BEAM + case _run_eam : + sprintf(tmp, "_run_eam"); + break; + +#endif + case _get_x_var : + sprintf(tmp, "_get_x_var"); + break; + + case _get_y_var : + sprintf(tmp, "_get_y_var"); + break; + + case _get_yy_var : + sprintf(tmp, "_get_yy_var"); + break; + + case _get_x_val : + sprintf(tmp, "_get_x_val"); + break; + + case _get_y_val : + sprintf(tmp, "_get_y_val"); + break; + + case _get_atom : + sprintf(tmp, "_get_atom"); + break; + + case _get_2atoms : + sprintf(tmp, "_get_2atoms"); + break; + + case _get_3atoms : + sprintf(tmp, "_get_3atoms"); + break; + + case _get_4atoms : + sprintf(tmp, "_get_4atoms"); + break; + + case _get_5atoms : + sprintf(tmp, "_get_5atoms"); + break; + + case _get_6atoms : + sprintf(tmp, "_get_6atoms"); + break; + + case _get_list : + sprintf(tmp, "_get_list"); + break; + + case _get_struct : + sprintf(tmp, "_get_struct"); + break; + + case _get_float : + sprintf(tmp, "_get_float"); + break; + + case _get_longint : + sprintf(tmp, "_get_longint"); + break; + + case _get_bigint : + sprintf(tmp, "_get_bigint"); + break; + + case _get_dbterm : + sprintf(tmp, "_get_dbterm"); + break; + + case _glist_valx : + sprintf(tmp, "_glist_valx"); + break; + + case _glist_valy : + sprintf(tmp, "_glist_valy"); + break; + + case _gl_void_varx : + sprintf(tmp, "_gl_void_varx"); + break; + + case _gl_void_vary : + sprintf(tmp, "_gl_void_vary"); + break; + + case _gl_void_valx : + sprintf(tmp, "_gl_void_valx"); + break; + + case _gl_void_valy : + sprintf(tmp, "_gl_void_valy"); + break; + + case _unify_x_var : + sprintf(tmp, "_unify_x_var"); + break; + + case _unify_x_var_write : + sprintf(tmp, "_unify_x_var_write"); + break; + + case _unify_l_x_var : + sprintf(tmp, "_unify_l_x_var"); + break; + + case _unify_l_x_var_write : + sprintf(tmp, "_unify_l_x_var_write"); + break; + + case _unify_x_var2 : + sprintf(tmp, "_unify_x_var2"); + break; + + case _unify_x_var2_write : + sprintf(tmp, "_unify_x_var2_write"); + break; + + case _unify_l_x_var2 : + sprintf(tmp, "_unify_l_x_var2"); + break; + + case _unify_l_x_var2_write : + sprintf(tmp, "_unify_l_x_var2_write"); + break; + + case _unify_y_var : + sprintf(tmp, "_unify_y_var"); + break; + + case _unify_y_var_write : + sprintf(tmp, "_unify_y_var_write"); + break; + + case _unify_l_y_var : + sprintf(tmp, "_unify_l_y_var"); + break; + + case _unify_l_y_var_write : + sprintf(tmp, "_unify_l_y_var_write"); + break; + + case _unify_x_val : + sprintf(tmp, "_unify_x_val"); + break; + + case _unify_x_val_write : + sprintf(tmp, "_unify_x_val_write"); + break; + + case _unify_l_x_val : + sprintf(tmp, "_unify_l_x_val"); + break; + + case _unify_l_x_val_write : + sprintf(tmp, "_uify_l_x_val_write"); + break; + + case _unify_y_val : + sprintf(tmp, "_unify_y_val"); + break; + + case _unify_y_val_write : + sprintf(tmp, "_unify_y_val_write"); + break; + + case _unify_l_y_val : + sprintf(tmp, "_unify_l_y_val"); + break; + + case _unify_l_y_val_write : + sprintf(tmp, "_unify_l_y_val_write"); + break; + + case _unify_x_loc : + sprintf(tmp, "_unify_x_loc"); + break; + + case _unify_x_loc_write : + sprintf(tmp, "_unify_x_loc_write"); + break; + + case _unify_l_x_loc : + sprintf(tmp, "_unify_l_x_loc"); + break; + + case _unify_l_x_loc_write : + sprintf(tmp, "_unify_l_x_loc_write"); + break; + + case _unify_y_loc : + sprintf(tmp, "_unify_y_loc"); + break; + + case _unify_y_loc_write : + sprintf(tmp, "_unify_y_loc_write"); + break; + + case _unify_l_y_loc : + sprintf(tmp, "_unify_l_y_loc"); + break; + + case _unify_l_y_loc_write : + sprintf(tmp, "_unify_l_y_loc_write"); + break; + + case _unify_void : + sprintf(tmp, "_unify_void"); + break; + + case _unify_void_write : + sprintf(tmp, "_unify_void_write"); + break; + + case _unify_l_void : + sprintf(tmp, "_unify_l_void"); + break; + + case _unify_l_void_write : + sprintf(tmp, "_unify_l_void_write"); + break; + + case _unify_n_voids : + sprintf(tmp, "_unify_n_voids"); + break; + + case _unify_n_voids_write : + sprintf(tmp, "_unify_n_voids_write"); + break; + + case _unify_l_n_voids : + sprintf(tmp, "_unify_l_n_voids"); + break; + + case _unify_l_n_voids_write : + sprintf(tmp, "_unify_l_n_voids_write"); + break; + + case _unify_atom : + sprintf(tmp, "_unify_atom"); + break; + + case _unify_atom_write : + sprintf(tmp, "_unify_atom_write"); + break; + + case _unify_l_atom : + sprintf(tmp, "_unify_l_atom"); + break; + + case _unify_l_atom_write : + sprintf(tmp, "_unify_l_atom_write"); + break; + + case _unify_n_atoms : + sprintf(tmp, "_unify_n_atoms"); + break; + + case _unify_n_atoms_write : + sprintf(tmp, "_unify_n_atoms_write"); + break; + + case _unify_float : + sprintf(tmp, "_unify_float"); + break; + + case _unify_float_write : + sprintf(tmp, "_unify_float_write"); + break; + + case _unify_l_float : + sprintf(tmp, "_unify_l_float"); + break; + + case _unify_l_float_write : + sprintf(tmp, "_unify_l_float_write"); + break; + + case _unify_longint : + sprintf(tmp, "_unify_longint"); + break; + + case _unify_longint_write : + sprintf(tmp, "_unify_longint_write"); + break; + + case _unify_l_longint : + sprintf(tmp, "_unify_l_longint"); + break; + + case _unify_l_longint_write : + sprintf(tmp, "_unify_l_longint_write"); + break; + + case _unify_bigint : + sprintf(tmp, "_unify_bigint"); + break; + + case _unify_l_bigint : + sprintf(tmp, "_unify_l_bigint"); + break; + + case _unify_dbterm : + sprintf(tmp, "_unify_dbterm"); + break; + + case _unify_l_dbterm : + sprintf(tmp, "_unify_l_dbterm"); + break; + + case _unify_list : + sprintf(tmp, "_unify_list"); + break; + + case _unify_list_write : + sprintf(tmp, "_unify_list_write"); + break; + + case _unify_l_list : + sprintf(tmp, "_unify_l_list"); + break; + + case _unify_l_list_write : + sprintf(tmp, "_unify_l_list_write"); + break; + + case _unify_struct : + sprintf(tmp, "_unify_struct"); + break; + + case _unify_struct_write : + sprintf(tmp, "_unify_struct_write"); + break; + + case _unify_l_struc : + sprintf(tmp, "_unify_l_struc"); + break; + + case _unify_l_struc_write : + sprintf(tmp, "_unify_l_struc_write"); + break; + + case _put_x_var : + sprintf(tmp, "_put_x_var"); + break; + + case _put_y_var : + sprintf(tmp, "_put_y_var"); + break; + + case _put_x_val : + sprintf(tmp, "_put_x_val"); + break; + + case _put_xx_val : + sprintf(tmp, "_put_xx_val"); + break; + + case _put_y_val : + sprintf(tmp, "_put_y_val"); + break; + + case _put_y_vals : + sprintf(tmp, "_put_y_vals"); + break; + + case _put_unsafe : + sprintf(tmp, "_put_unsafe"); + break; + + case _put_atom : + sprintf(tmp, "_put_atom"); + break; + + case _put_dbterm : + sprintf(tmp, "_put_dbterm"); + break; + + case _put_bigint : + sprintf(tmp, "_put_bigint"); + break; + + case _put_float : + sprintf(tmp, "_put_float"); + break; + + case _put_longint : + sprintf(tmp, "_put_longint"); + break; + + case _put_list : + sprintf(tmp, "_put_list"); + break; + + case _put_struct : + sprintf(tmp, "_put_struct"); + break; + + case _write_x_var : + sprintf(tmp, "_write_x_var"); + break; + + case _write_void : + sprintf(tmp, "_write_void"); + break; + + case _write_n_voids : + sprintf(tmp, "_write_n_voids"); + break; + + case _write_y_var : + sprintf(tmp, "_write_y_var"); + break; + + case _write_x_val : + sprintf(tmp, "_write_x_val"); + break; + + case _write_x_loc : + sprintf(tmp, "_write_x_loc"); + break; + + case _write_y_val : + sprintf(tmp, "_write_y_val"); + break; + + case _write_y_loc : + sprintf(tmp, "_write_y_loc"); + break; + + case _write_atom : + sprintf(tmp, "_write_atom"); + break; + + case _write_bigint : + sprintf(tmp, "_write_bigint"); + break; + + case _write_dbterm : + sprintf(tmp, "_write_dbterm"); + break; + + case _write_float : + sprintf(tmp, "_write_float"); + break; + + case _write_longint : + sprintf(tmp, "_write_longint"); + break; + + case _write_n_atoms : + sprintf(tmp, "_write_n_atoms"); + break; + + case _write_list : + sprintf(tmp, "_write_list"); + break; + + case _write_l_list : + sprintf(tmp, "_write_l_list"); + break; + + case _write_struct : + sprintf(tmp, "_write_struct"); + break; + + case _write_l_struc : + sprintf(tmp, "_write_l_struc"); + break; + + case _save_pair_x : + sprintf(tmp, "_save_pair_x"); + break; + + case _save_pair_x_write : + sprintf(tmp, "_save_pair_x_write"); + break; + + case _save_pair_y : + sprintf(tmp, "_save_pair_y"); + break; + + case _save_pair_y_write : + sprintf(tmp, "_save_pair_y_write"); + break; + + case _save_appl_x : + sprintf(tmp, "_save_appl_x"); + break; + + case _save_appl_x_write : + sprintf(tmp, "_save_appl_x_write"); + break; + + case _save_appl_y : + sprintf(tmp, "_save_appl_y"); + break; + + case _save_appl_y_write : + sprintf(tmp, "_save_appl_y_write"); + break; + + case _jump : + sprintf(tmp, "_jump"); + break; + + case _move_back : + sprintf(tmp, "_move_back"); + break; + + case _skip : + sprintf(tmp, "_skip"); + break; + + case _either : + sprintf(tmp, "_either"); + break; + + case _or_else : + sprintf(tmp, "_or_else"); + break; + + case _pop_n : + sprintf(tmp, "_pop_n"); + break; + + case _pop : + sprintf(tmp, "_pop"); + break; + + case _call_cpred : + sprintf(tmp, "_call_cpred"); + break; + + case _execute_cpred : + sprintf(tmp, "_execute_cpred"); + break; + + case _call_usercpred : + sprintf(tmp, "_call_usercpred"); + break; + + case _call_c_wfail : + sprintf(tmp, "_call_x_wfail"); + break; + + case _try_c : + sprintf(tmp, "_try_c"); + break; + + case _retry_c : + sprintf(tmp, "_retry_c"); + break; + +#ifdef CUT_C + case _cut_c : + sprintf(tmp, "_cut_c"); + break; + +#endif + case _try_userc : + sprintf(tmp, "_try_userc"); + break; + + case _retry_userc : + sprintf(tmp, "_retry_userc"); + break; + +#ifdef CUT_C + case _cut_userc : + sprintf(tmp, "_cut_userc"); + break; + +#endif + case _lock_pred : + sprintf(tmp, "_lock_pred"); + break; + + case _index_pred : + sprintf(tmp, "_index_pred"); + break; + +#ifdef THREADS + case _thread_local : + sprintf(tmp, "_thread_local"); + break; + +#endif + case _expand_index : + sprintf(tmp, "_expand_index"); + break; + + case _expand_clauses : + sprintf(tmp, "_expand_clauses"); + break; + + case _undef_p : + sprintf(tmp, "_undef_p"); + break; + + case _spy_pred : + sprintf(tmp, "_spy_pred"); + break; + + case _try_clause : + sprintf(tmp, "_try_clause"); + break; + + case _try_clause2 : + sprintf(tmp, "_try_clause2"); + break; + + case _try_clause3 : + sprintf(tmp, "_try_clause3"); + break; + + case _try_clause4 : + sprintf(tmp, "_try_clause4"); + break; + + case _retry : + sprintf(tmp, "_retry"); + break; + + case _retry2 : + sprintf(tmp, "_retry2"); + break; + + case _retry3 : + sprintf(tmp, "_retry3"); + break; + + case _retry4 : + sprintf(tmp, "_retry4"); + break; + + case _trust : + sprintf(tmp, "_trust"); + break; + + case _try_in : + sprintf(tmp, "_try_in"); + break; + + case _enter_lu_pred : + sprintf(tmp, "_enter_lu_pred"); + break; + + case _try_logical : + sprintf(tmp, "_try_logical"); + break; + + case _retry_logical : + sprintf(tmp, "_retry_logical"); + break; + + case _trust_logical : + sprintf(tmp, "_trust_logical"); + break; + + case _user_switch : + sprintf(tmp, "_user_switch"); + break; + + case _switch_on_type : + sprintf(tmp, "_switch_on_type"); + break; + + case _switch_list_nl : + sprintf(tmp, "_switch_list_nl"); + break; + + case _switch_on_arg_type : + sprintf(tmp, "_switch_on_arg_type"); + break; + + case _switch_on_sub_arg_type : + sprintf(tmp, "_switch_on_sub_arg_type"); + break; + + case _jump_if_var : + sprintf(tmp, "_jump_if_var"); + break; + + case _jump_if_nonvar : + sprintf(tmp, "_jump_if_nonvar"); + break; + + case _if_not_then : + sprintf(tmp, "_if_not_then"); + break; + + case _switch_on_func : + sprintf(tmp, "_switch_on_func"); + break; + + case _switch_on_cons : + sprintf(tmp, "_switch_on_cons"); + break; + + case _go_on_func : + sprintf(tmp, "_go_on_func"); + break; + + case _go_on_cons : + sprintf(tmp, "_go_on_cons"); + break; + + case _if_func : + sprintf(tmp, "_if_func"); + break; + + case _if_cons : + sprintf(tmp, "_if_cons"); + break; + + case _index_dbref : + sprintf(tmp, "_index_dbref"); + break; + + case _index_blob : + sprintf(tmp, "_index_blob"); + break; + + case _index_long : + sprintf(tmp, "_index_long"); + break; + +#ifdef YAP_JIT + case _jit_handler : + sprintf(tmp, "_jit_handler"); + break; +#endif /*YAP_JIT*/ + + case _p_atom_x : + sprintf(tmp, "_p_atom_x"); + break; + + case _p_atom_y : + sprintf(tmp, "_p_atom_y"); + break; + + case _p_atomic_x : + sprintf(tmp, "_p_atomic_x"); + break; + + case _p_atomic_y : + sprintf(tmp, "_p_atomic_y"); + break; + + case _p_integer_x : + sprintf(tmp, "_p_integer_x"); + break; + + case _p_integer_y : + sprintf(tmp, "_p_integer_y"); + break; + + case _p_nonvar_x : + sprintf(tmp, "_p_nonvar_x"); + break; + + case _p_nonvar_y : + sprintf(tmp, "_p_nonvar_y"); + break; + + case _p_number_x : + sprintf(tmp, "_p_number_x"); + break; + + case _p_number_y : + sprintf(tmp, "_p_number_y"); + break; + + case _p_var_x : + sprintf(tmp, "_p_var_x"); + break; + + case _p_var_y : + sprintf(tmp, "_p_var_y"); + break; + + case _p_db_ref_x : + sprintf(tmp, "_p_db_ref_x"); + break; + + case _p_db_ref_y : + sprintf(tmp, "_p_db_ref_y"); + break; + + case _p_primitive_x : + sprintf(tmp, "_p_primitive_x"); + break; + + case _p_primitive_y : + sprintf(tmp, "_p_primitive_y"); + break; + + case _p_compound_x : + sprintf(tmp, "_p_compound_x"); + break; + + case _p_compound_y : + sprintf(tmp, "_p_compound_y"); + break; + + case _p_float_x : + sprintf(tmp, "_p_float_x"); + break; + + case _p_float_y : + sprintf(tmp, "_p_float_y"); + break; + + case _p_plus_vv : + sprintf(tmp, "_p_plus_vv"); + break; + + case _p_plus_vc : + sprintf(tmp, "_p_plus_vc"); + break; + + case _p_plus_y_vv : + sprintf(tmp, "_p_plus_y_vv"); + break; + + case _p_plus_y_vc : + sprintf(tmp, "_p_plus_y_vc"); + break; + + case _p_minus_vv : + sprintf(tmp, "_p_minus_vv"); + break; + + case _p_minus_cv : + sprintf(tmp, "_p_minus_cv"); + break; + + case _p_minus_y_vv : + sprintf(tmp, "_p_minus_y_vv"); + break; + + case _p_minus_y_cv : + sprintf(tmp, "_p_minus_y_cv"); + break; + + case _p_times_vv : + sprintf(tmp, "_p_times_vv"); + break; + + case _p_times_vc : + sprintf(tmp, "_p_times_vc"); + break; + + case _p_times_y_vv : + sprintf(tmp, "_p_times_y_vv"); + break; + + case _p_times_y_vc : + sprintf(tmp, "_p_times_y_vc"); + break; + + case _p_div_vv : + sprintf(tmp, "_p_div_vv"); + break; + + case _p_div_vc : + sprintf(tmp, "_p_div_vc"); + break; + + case _p_div_cv : + sprintf(tmp, "_p_div_cv"); + break; + + case _p_div_y_vv : + sprintf(tmp, "_p_div_y_vv"); + break; + + case _p_div_y_vc : + sprintf(tmp, "_p_div_y_vc"); + break; + + case _p_div_y_cv : + sprintf(tmp, "_p_div_y_cv"); + break; + + case _p_and_vv : + sprintf(tmp, "_p_and_vv"); + break; + + case _p_and_vc : + sprintf(tmp, "_p_and_vc"); + break; + + case _p_and_y_vv : + sprintf(tmp, "_p_and_y_vv"); + break; + + case _p_and_y_vc : + sprintf(tmp, "_p_and_y_vc"); + break; + + case _p_or_vv : + sprintf(tmp, "_p_or_vv"); + break; + + case _p_or_vc : + sprintf(tmp, "_p_or_vc"); + break; + + case _p_or_y_vv : + sprintf(tmp, "_p_or_y_vv"); + break; + + case _p_or_y_vc : + sprintf(tmp, "_p_or_y_vc"); + break; + + case _p_sll_vv : + sprintf(tmp, "_p_sll_vv"); + break; + + case _p_sll_vc : + sprintf(tmp, "_p_sll_vc"); + break; + + case _p_sll_cv : + sprintf(tmp, "_p_sll_cv"); + break; + + case _p_sll_y_vv : + sprintf(tmp, "_p_sll_y_vv"); + break; + + case _p_sll_y_vc : + sprintf(tmp, "_p_sll_y_vc"); + break; + + case _p_sll_y_cv : + sprintf(tmp, "_p_sll_y_cv"); + break; + + case _p_slr_vv : + sprintf(tmp, "_p_slr_vv"); + break; + + case _p_slr_vc : + sprintf(tmp, "_p_slr_vc"); + break; + + case _p_slr_cv : + sprintf(tmp, "_p_slr_cv"); + break; + + case _p_slr_y_vv : + sprintf(tmp, "_p_slr_y_vv"); + break; + + case _p_slr_y_vc : + sprintf(tmp, "_p_slr_y_vc"); + break; + + case _p_slr_y_cv : + sprintf(tmp, "_p_slr_y_cv"); + break; + + case _call_bfunc_xx : + sprintf(tmp, "_call_bfunc_xx"); + break; + + case _call_bfunc_yx : + sprintf(tmp, "_call_bfunc_yx"); + break; + + case _call_bfunc_xy : + sprintf(tmp, "_call_bfunc_xy"); + break; + + case _call_bfunc_yy : + sprintf(tmp, "_call_bfunc_yy"); + break; + + case _p_equal : + sprintf(tmp, "_p_equal"); + break; + + case _p_dif : + sprintf(tmp, "_p_dif"); + break; + + case _p_eq : + sprintf(tmp, "_p_eq"); + break; + + case _p_arg_vv : + sprintf(tmp, "_p_arg_vv"); + break; + + case _p_arg_cv : + sprintf(tmp, "_p_arg_cv"); + break; + + case _p_arg_y_vv : + sprintf(tmp, "_p_arg_y_vv"); + break; + + case _p_arg_y_cv : + sprintf(tmp, "_p_arg_y_cv"); + break; + + case _p_func2s_vv : + sprintf(tmp, "_p_func2s_vv"); + break; + + case _p_func2s_cv : + sprintf(tmp, "_p_func2s_cv"); + break; + + case _p_func2s_vc : + sprintf(tmp, "_p_func2s_vc"); + break; + + case _p_func2s_y_vv : + sprintf(tmp, "_p_func2s_y_vv"); + break; + + case _p_func2s_y_cv : + sprintf(tmp, "_p_func2s_y_cv"); + break; + + case _p_func2s_y_vc : + sprintf(tmp, "_p_func2s_y_vc"); + break; + + case _p_func2f_xx : + sprintf(tmp, "_p_func2f_xx"); + break; + + case _p_func2f_xy : + sprintf(tmp, "_p_func2f_xy"); + break; + + case _p_func2f_yx : + sprintf(tmp, "_p_func2f_yx"); + break; + + case _p_func2f_yy : + sprintf(tmp, "_p_func2f_yy"); + break; + + case _p_functor : + sprintf(tmp, "_p_functor"); + break; + + case _p_execute2 : + sprintf(tmp, "_p_execute2"); + break; + + case _p_execute : + sprintf(tmp, "_p_execute"); + break; + + case _p_execute_tail : + sprintf(tmp, "_p_execute_tail"); + break; + +#ifdef YAPOR + case _getwork_first_time : + sprintf(tmp, "_getwork_first_time"); + break; + + case _getwork : + sprintf(tmp, "_getwork"); + break; + + case _getwork_seq : + sprintf(tmp, "_getwork_seq"); + break; + + case _sync : + sprintf(tmp, "_sync"); + break; + +#endif +#ifdef TABLING +#ifdef TABLING_INNER_CUTS + case _clause_with_cut : + sprintf(tmp, "_clause_with_cut"); + break; + +#endif + case _table_load_answer : + sprintf(tmp, "_table_load_answer"); + break; + + case _table_try_answer : + sprintf(tmp, "_table_try_answer"); + break; + + case _table_try_single : + sprintf(tmp, "_table_try_single"); + break; + + case _table_try_me : + sprintf(tmp, "_table_try_me"); + break; + + case _table_try : + sprintf(tmp, "_table_try"); + break; + + case _table_retry_me : + sprintf(tmp, "_table_retry_me"); + break; + + case _table_retry : + sprintf(tmp, "_table_retry"); + break; + + case _table_trust_me : + sprintf(tmp, "_table_trust_me"); + break; + + case _table_trust : + sprintf(tmp, "_table_trust"); + break; + + case _table_new_answer : + sprintf(tmp, "_table_new_answer"); + break; + + case _table_answer_resolution : + sprintf(tmp, "_table_answer_resolution"); + break; + + case _table_completion : + sprintf(tmp, "_table_completion"); + break; + +#ifdef THREADS_CONSUMER_SHARING + case _table_answer_resolution_completion: + sprintf(tmp, "_table_answer_resolution_completion"); + break; + +#endif + case _trie_do_var : + sprintf(tmp, "_trie_do_var"); + break; + + case _trie_trust_var : + sprintf(tmp, "_trie_trust_var"); + break; + + case _trie_try_var : + sprintf(tmp, "_trie_try_var"); + break; + + case _trie_retry_var : + sprintf(tmp, "_trie_retry_var"); + break; + + case _trie_do_var_in_pair : + sprintf(tmp, "_trie_do_var_in_pair"); + break; + + case _trie_trust_var_in_pair : + sprintf(tmp, "_trie_trust_var_in_pair"); + break; + + case _trie_try_var_in_pair : + sprintf(tmp, "_trie_try_var_in_pair"); + break; + + case _trie_retry_var_in_pair : + sprintf(tmp, "_trie_retry_var_in_pair"); + break; + + case _trie_do_val : + sprintf(tmp, "_trie_do_val"); + break; + + case _trie_trust_val : + sprintf(tmp, "_trie_trust_val"); + break; + + case _trie_try_val : + sprintf(tmp, "_trie_try_val"); + break; + + case _trie_retry_val : + sprintf(tmp, "_trie_retry_val"); + break; + + case _trie_do_val_in_pair : + sprintf(tmp, "_trie_do_val_in_pair"); + break; + + case _trie_trust_val_in_pair : + sprintf(tmp, "_trie_trust_val_in_pair"); + break; + + case _trie_try_val_in_pair : + sprintf(tmp, "_trie_try_val_in_pair"); + break; + + case _trie_retry_val_in_pair : + sprintf(tmp, "_trie_retry_val_in_pair"); + break; + + case _trie_do_atom : + sprintf(tmp, "_trie_do_atom"); + break; + + case _trie_trust_atom : + sprintf(tmp, "_trie_trust_atom"); + break; + + case _trie_try_atom : + sprintf(tmp, "_trie_try_atom"); + break; + + case _trie_retry_atom : + sprintf(tmp, "_trie_retry_atom"); + break; + + case _trie_do_atom_in_pair : + sprintf(tmp, "_trie_do_atom_in_pair"); + break; + + case _trie_trust_atom_in_pair : + sprintf(tmp, "_trie_trust_atom_in_pair"); + break; + + case _trie_try_atom_in_pair : + sprintf(tmp, "_trie_try_atom_in_pair"); + break; + + case _trie_retry_atom_in_pair : + sprintf(tmp, "_trie_retry_atom_in_pair"); + break; + + case _trie_do_null : + sprintf(tmp, "_trie_do_null"); + break; + + case _trie_trust_null : + sprintf(tmp, "_trie_trust_null"); + break; + + case _trie_try_null : + sprintf(tmp, "_trie_try_null"); + break; + + case _trie_retry_null : + sprintf(tmp, "_trie_retry_null"); + break; + + case _trie_do_null_in_pair : + sprintf(tmp, "_trie_do_null_in_pair"); + break; + + case _trie_trust_null_in_pair : + sprintf(tmp, "_trie_trust_null_in_pair"); + break; + + case _trie_try_null_in_pair : + sprintf(tmp, "_tri_try_null_in_paire"); + break; + + case _trie_retry_null_in_pair : + sprintf(tmp, "_trie_retry_null_in_pair"); + break; + + case _trie_do_pair : + sprintf(tmp, "_trie_do_pair"); + break; + + case _trie_trust_pair : + sprintf(tmp, "_trie_trust_pair"); + break; + + case _trie_try_pair : + sprintf(tmp, "_trie_try_pair"); + break; + + case _trie_retry_pair : + sprintf(tmp, "_trie_retry_pair"); + break; + + case _trie_do_appl : + sprintf(tmp, "_trie_do_appl"); + break; + + case _trie_trust_appl : + sprintf(tmp, "_trie_trust_appl"); + break; + + case _trie_try_appl : + sprintf(tmp, "_trie_try_appl"); + break; + + case _trie_retry_appl : + sprintf(tmp, "_trie_retry_appl"); + break; + + case _trie_do_appl_in_pair : + sprintf(tmp, "_trie_do_appl_in_pair"); + break; + + case _trie_trust_appl_in_pair : + sprintf(tmp, "_trie_trust_appl_in_pair"); + break; + + case _trie_try_appl_in_pair : + sprintf(tmp, "_trie_trty_appkl_in_pair"); + break; + + case _trie_retry_appl_in_pair : + sprintf(tmp, "_trie_retry_appl_in_pair"); + break; + + case _trie_do_extension : + sprintf(tmp, "_trie_do_extension"); + break; + + case _trie_trust_extension : + sprintf(tmp, "_trie_trust_extension"); + break; + + case _trie_try_extension : + sprintf(tmp, "_trie_try_extension"); + break; + + case _trie_retry_extension : + sprintf(tmp, "_trie_retry_extension"); + break; + + case _trie_do_double : + sprintf(tmp, "_trie_do_double"); + break; + + case _trie_trust_double : + sprintf(tmp, "_trie_trust_double"); + break; + + case _trie_try_double : + sprintf(tmp, "_trie_try_double"); + break; + + case _trie_retry_double : + sprintf(tmp, "_trie_retry_double"); + break; + + case _trie_do_longint : + sprintf(tmp, "_trie_do_longint"); + break; + + case _trie_trust_longint : + sprintf(tmp, "_trie_trust_longint"); + break; + + case _trie_try_longint : + sprintf(tmp, "_trie_try_longint"); + break; + + case _trie_retry_longint : + sprintf(tmp, "_trie_retry_longint"); + break; + + case _trie_do_gterm : + sprintf(tmp, "_trie_do_gterm"); + break; + + case _trie_trust_gterm : + sprintf(tmp, "_trie_trust_gterm"); + break; + + case _trie_try_gterm : + sprintf(tmp, "_trie_try_gterm"); + break; + + case _trie_retry_gterm : + sprintf(tmp, "_trie_retry_gterm"); + break; + +#endif + /* this instruction is hardwired */ +#ifdef YAPOR + case _or_last : + sprintf(tmp, "_or_last"); + break; + +#else + case _or_last : + sprintf(tmp, "_or_last"); + break; + +#endif + +#ifdef YAP_JIT + case _traced_Ystop : + sprintf(tmp, "_traced_Ystop"); + break; + + case _traced_Nstop : + sprintf(tmp, "_traced_Nstop"); + break; + + case _traced_try_me : + sprintf(tmp, "_traced_try_me"); + break; + + case _traced_retry_me : + sprintf(tmp, "_traced_retry_me"); + break; + + case _traced_trust_me : + sprintf(tmp, "_traced_trust_me"); + break; + + case _traced_enter_profiling : + sprintf(tmp, "_traced_enter_profiling"); + break; + + case _traced_retry_profiled : + sprintf(tmp, "_traced_retry_profiled"); + break; + + case _traced_profiled_retry_me : + sprintf(tmp, "_traced_profiled_retry_me"); + break; + + case _traced_profiled_trust_me : + sprintf(tmp, "_traced_profiled_trust_me"); + break; + + case _traced_profiled_retry_logical : + sprintf(tmp, "_traced_profiled_retry_logical"); + break; + + case _traced_profiled_trust_logical : + sprintf(tmp, "_traced_profiled_trust_logical"); + break; + + case _traced_count_call : + sprintf(tmp, "_traced_count_call"); + break; + + case _traced_count_retry : + sprintf(tmp, "_traced_count_retry"); + break; + + case _traced_count_retry_me : + sprintf(tmp, "_traced_count_retry_me"); + break; + + case _traced_count_trust_me : + sprintf(tmp, "_traced_count_trust_me"); + break; + + case _traced_count_retry_logical : + sprintf(tmp, "_traced_count_retry_logical"); + break; + + case _traced_count_trust_logical : + sprintf(tmp, "_traced_count_trust_logical"); + break; + + case _traced_lock_lu : + sprintf(tmp, "_traced_lock_lu"); + break; + + case _traced_unlock_lu : + sprintf(tmp, "_traced_unlock_lu"); + break; + + case _traced_alloc_for_logical_pred : + sprintf(tmp, "_traced_alloc_for_logical_pred"); + break; + + case _traced_copy_idb_term : + sprintf(tmp, "_traced_copy_idb_term"); + break; + + case _traced_unify_idb_term : + sprintf(tmp, "_traced_unify_idb_term"); + break; + + case _traced_ensure_space : + sprintf(tmp, "_traced_ensure_space"); + break; + + case _traced_spy_or_trymark : + sprintf(tmp, "_traced_spy_or_trymark"); + break; + + case _traced_try_and_mark : + sprintf(tmp, "_traced_try_and_mark"); + break; + + case _traced_count_retry_and_mark : + sprintf(tmp, "_traced_count_retry_and_mark"); + break; + + case _traced_profiled_retry_and_mark : + sprintf(tmp, "_traced_profiled_retry_and_mark"); + break; + + case _traced_retry_and_mark : + sprintf(tmp, "_traced_retry_and_mark"); + break; + + case _traced_trust_fail : + sprintf(tmp, "_traced_trust_fail"); + break; + + case _traced_op_fail : + sprintf(tmp, "_traced_op_fail"); + break; + + case _traced_cut : + sprintf(tmp, "_traced_cut"); + break; + + case _traced_cut_t : + sprintf(tmp, "_traced_cut_t"); + break; + + case _traced_cut_e : + sprintf(tmp, "_traced_cut_e"); + break; + + case _traced_save_b_x : + sprintf(tmp, "_traced_save_b_x"); + break; + + case _traced_save_b_y : + sprintf(tmp, "_traced_save_b_y"); + break; + + case _traced_commit_b_x : + sprintf(tmp, "_traced_commit_b_x"); + break; + + case _traced_commit_b_y : + sprintf(tmp, "_traced_commit_b_y"); + break; + + case _traced_execute : + sprintf(tmp, "_traced_execute"); + break; + + case _traced_dexecute : + sprintf(tmp, "_traced_dexecute"); + break; + + case _traced_fcall : + sprintf(tmp, "_traced_fcall"); + break; + + case _traced_call : + sprintf(tmp, "_traced_call"); + break; + + case _traced_procceed : + sprintf(tmp, "_traced_procceed"); + break; + + case _traced_allocate : + sprintf(tmp, "_traced_allocate"); + break; + + case _traced_deallocate : + sprintf(tmp, "_traced_deallocate"); + break; + +#ifdef BEAM + case _traced_retry_eam : + sprintf(tmp, "_traced_retry_eam"); + break; + +#endif +#ifdef BEAM + case _traced_run_eam : + sprintf(tmp, "_traced_run_eam"); + break; + +#endif + case _traced_get_x_var : + sprintf(tmp, "_traced_get_x_var"); + break; + + case _traced_get_y_var : + sprintf(tmp, "_traced_get_y_var"); + break; + + case _traced_get_yy_var : + sprintf(tmp, "_traced_get_yy_var"); + break; + + case _traced_get_x_val : + sprintf(tmp, "_traced_get_x_val"); + break; + + case _traced_get_y_val : + sprintf(tmp, "_traced_get_y_val"); + break; + + case _traced_get_atom : + sprintf(tmp, "_traced_get_atom"); + break; + + case _traced_get_2atoms : + sprintf(tmp, "_traced_get_2atoms"); + break; + + case _traced_get_3atoms : + sprintf(tmp, "_traced_get_3atoms"); + break; + + case _traced_get_4atoms : + sprintf(tmp, "_traced_get_4atoms"); + break; + + case _traced_get_5atoms : + sprintf(tmp, "_traced_get_5atoms"); + break; + + case _traced_get_6atoms : + sprintf(tmp, "_traced_get_6atoms"); + break; + + case _traced_get_list : + sprintf(tmp, "_traced_get_list"); + break; + + case _traced_get_struct : + sprintf(tmp, "_traced_get_struct"); + break; + + case _traced_get_float : + sprintf(tmp, "_traced_get_float"); + break; + + case _traced_get_longint : + sprintf(tmp, "_traced_get_longint"); + break; + + case _traced_get_bigint : + sprintf(tmp, "_traced_get_bigint"); + break; + + case _traced_get_dbterm : + sprintf(tmp, "_traced_get_dbterm"); + break; + + case _traced_glist_valx : + sprintf(tmp, "_traced_glist_valx"); + break; + + case _traced_glist_valy : + sprintf(tmp, "_traced_glist_valy"); + break; + + case _traced_gl_void_varx : + sprintf(tmp, "_traced_gl_void_varx"); + break; + + case _traced_gl_void_vary : + sprintf(tmp, "_traced_gl_void_vary"); + break; + + case _traced_gl_void_valx : + sprintf(tmp, "_traced_gl_void_valx"); + break; + + case _traced_gl_void_valy : + sprintf(tmp, "_traced_gl_void_valy"); + break; + + case _traced_unify_x_var : + sprintf(tmp, "_traced_unify_x_var"); + break; + + case _traced_unify_x_var_write : + sprintf(tmp, "_traced_unify_x_var_write"); + break; + + case _traced_unify_l_x_var : + sprintf(tmp, "_traced_unify_l_x_var"); + break; + + case _traced_unify_l_x_var_write : + sprintf(tmp, "_traced_unify_l_x_var_write"); + break; + + case _traced_unify_x_var2 : + sprintf(tmp, "_traced_unify_x_var2"); + break; + + case _traced_unify_x_var2_write : + sprintf(tmp, "_traced_unify_x_var2_write"); + break; + + case _traced_unify_l_x_var2 : + sprintf(tmp, "_traced_unify_l_x_var2"); + break; + + case _traced_unify_l_x_var2_write : + sprintf(tmp, "_traced_unify_l_x_var2_write"); + break; + + case _traced_unify_y_var : + sprintf(tmp, "_traced_unify_y_var"); + break; + + case _traced_unify_y_var_write : + sprintf(tmp, "_traced_unify_y_var_write"); + break; + + case _traced_unify_l_y_var : + sprintf(tmp, "_traced_unify_l_y_var"); + break; + + case _traced_unify_l_y_var_write : + sprintf(tmp, "_traced_unify_l_y_var_write"); + break; + + case _traced_unify_x_val : + sprintf(tmp, "_traced_unify_x_val"); + break; + + case _traced_unify_x_val_write : + sprintf(tmp, "_traced_unify_x_val_write"); + break; + + case _traced_unify_l_x_val : + sprintf(tmp, "_traced_unify_l_x_val"); + break; + + case _traced_unify_l_x_val_write : + sprintf(tmp, "_traced_uify_l_x_val_write"); + break; + + case _traced_unify_y_val : + sprintf(tmp, "_traced_unify_y_val"); + break; + + case _traced_unify_y_val_write : + sprintf(tmp, "_traced_unify_y_val_write"); + break; + + case _traced_unify_l_y_val : + sprintf(tmp, "_traced_unify_l_y_val"); + break; + + case _traced_unify_l_y_val_write : + sprintf(tmp, "_traced_unify_l_y_val_write"); + break; + + case _traced_unify_x_loc : + sprintf(tmp, "_traced_unify_x_loc"); + break; + + case _traced_unify_x_loc_write : + sprintf(tmp, "_traced_unify_x_loc_write"); + break; + + case _traced_unify_l_x_loc : + sprintf(tmp, "_traced_unify_l_x_loc"); + break; + + case _traced_unify_l_x_loc_write : + sprintf(tmp, "_traced_unify_l_x_loc_write"); + break; + + case _traced_unify_y_loc : + sprintf(tmp, "_traced_unify_y_loc"); + break; + + case _traced_unify_y_loc_write : + sprintf(tmp, "_traced_unify_y_loc_write"); + break; + + case _traced_unify_l_y_loc : + sprintf(tmp, "_traced_unify_l_y_loc"); + break; + + case _traced_unify_l_y_loc_write : + sprintf(tmp, "_traced_unify_l_y_loc_write"); + break; + + case _traced_unify_void : + sprintf(tmp, "_traced_unify_void"); + break; + + case _traced_unify_void_write : + sprintf(tmp, "_traced_unify_void_write"); + break; + + case _traced_unify_l_void : + sprintf(tmp, "_traced_unify_l_void"); + break; + + case _traced_unify_l_void_write : + sprintf(tmp, "_traced_unify_l_void_write"); + break; + + case _traced_unify_n_voids : + sprintf(tmp, "_traced_unify_n_voids"); + break; + + case _traced_unify_n_voids_write : + sprintf(tmp, "_traced_unify_n_voids_write"); + break; + + case _traced_unify_l_n_voids : + sprintf(tmp, "_traced_unify_l_n_voids"); + break; + + case _traced_unify_l_n_voids_write : + sprintf(tmp, "_traced_unify_l_n_voids_write"); + break; + + case _traced_unify_atom : + sprintf(tmp, "_traced_unify_atom"); + break; + + case _traced_unify_atom_write : + sprintf(tmp, "_traced_unify_atom_write"); + break; + + case _traced_unify_l_atom : + sprintf(tmp, "_traced_unify_l_atom"); + break; + + case _traced_unify_l_atom_write : + sprintf(tmp, "_traced_unify_l_atom_write"); + break; + + case _traced_unify_n_atoms : + sprintf(tmp, "_traced_unify_n_atoms"); + break; + + case _traced_unify_n_atoms_write : + sprintf(tmp, "_traced_unify_n_atoms_write"); + break; + + case _traced_unify_float : + sprintf(tmp, "_traced_unify_float"); + break; + + case _traced_unify_float_write : + sprintf(tmp, "_traced_unify_float_write"); + break; + + case _traced_unify_l_float : + sprintf(tmp, "_traced_unify_l_float"); + break; + + case _traced_unify_l_float_write : + sprintf(tmp, "_traced_unify_l_float_write"); + break; + + case _traced_unify_longint : + sprintf(tmp, "_traced_unify_longint"); + break; + + case _traced_unify_longint_write : + sprintf(tmp, "_traced_unify_longint_write"); + break; + + case _traced_unify_l_longint : + sprintf(tmp, "_traced_unify_l_longint"); + break; + + case _traced_unify_l_longint_write : + sprintf(tmp, "_traced_unify_l_longint_write"); + break; + + case _traced_unify_bigint : + sprintf(tmp, "_traced_unify_bigint"); + break; + + case _traced_unify_l_bigint : + sprintf(tmp, "_traced_unify_l_bigint"); + break; + + case _traced_unify_dbterm : + sprintf(tmp, "_traced_unify_dbterm"); + break; + + case _traced_unify_l_dbterm : + sprintf(tmp, "_traced_unify_l_dbterm"); + break; + + case _traced_unify_list : + sprintf(tmp, "_traced_unify_list"); + break; + + case _traced_unify_list_write : + sprintf(tmp, "_traced_unify_list_write"); + break; + + case _traced_unify_l_list : + sprintf(tmp, "_traced_unify_l_list"); + break; + + case _traced_unify_l_list_write : + sprintf(tmp, "_traced_unify_l_list_write"); + break; + + case _traced_unify_struct : + sprintf(tmp, "_traced_unify_struct"); + break; + + case _traced_unify_struct_write : + sprintf(tmp, "_traced_unify_struct_write"); + break; + + case _traced_unify_l_struc : + sprintf(tmp, "_traced_unify_l_struc"); + break; + + case _traced_unify_l_struc_write : + sprintf(tmp, "_traced_unify_l_struc_write"); + break; + + case _traced_put_x_var : + sprintf(tmp, "_traced_put_x_var"); + break; + + case _traced_put_y_var : + sprintf(tmp, "_traced_put_y_var"); + break; + + case _traced_put_x_val : + sprintf(tmp, "_traced_put_x_val"); + break; + + case _traced_put_xx_val : + sprintf(tmp, "_traced_put_xx_val"); + break; + + case _traced_put_y_val : + sprintf(tmp, "_traced_put_y_val"); + break; + + case _traced_put_y_vals : + sprintf(tmp, "_traced_put_y_vals"); + break; + + case _traced_put_unsafe : + sprintf(tmp, "_traced_put_unsafe"); + break; + + case _traced_put_atom : + sprintf(tmp, "_traced_put_atom"); + break; + + case _traced_put_dbterm : + sprintf(tmp, "_traced_put_dbterm"); + break; + + case _traced_put_bigint : + sprintf(tmp, "_traced_put_bigint"); + break; + + case _traced_put_float : + sprintf(tmp, "_traced_put_float"); + break; + + case _traced_put_longint : + sprintf(tmp, "_traced_put_longint"); + break; + + case _traced_put_list : + sprintf(tmp, "_traced_put_list"); + break; + + case _traced_put_struct : + sprintf(tmp, "_traced_put_struct"); + break; + + case _traced_write_x_var : + sprintf(tmp, "_traced_write_x_var"); + break; + + case _traced_write_void : + sprintf(tmp, "_traced_write_void"); + break; + + case _traced_write_n_voids : + sprintf(tmp, "_traced_write_n_voids"); + break; + + case _traced_write_y_var : + sprintf(tmp, "_traced_write_y_var"); + break; + + case _traced_write_x_val : + sprintf(tmp, "_traced_write_x_val"); + break; + + case _traced_write_x_loc : + sprintf(tmp, "_traced_write_x_loc"); + break; + + case _traced_write_y_val : + sprintf(tmp, "_traced_write_y_val"); + break; + + case _traced_write_y_loc : + sprintf(tmp, "_traced_write_y_loc"); + break; + + case _traced_write_atom : + sprintf(tmp, "_traced_write_atom"); + break; + + case _traced_write_bigint : + sprintf(tmp, "_traced_write_bigint"); + break; + + case _traced_write_dbterm : + sprintf(tmp, "_traced_write_dbterm"); + break; + + case _traced_write_float : + sprintf(tmp, "_traced_write_float"); + break; + + case _traced_write_longint : + sprintf(tmp, "_traced_write_longint"); + break; + + case _traced_write_n_atoms : + sprintf(tmp, "_traced_write_n_atoms"); + break; + + case _traced_write_list : + sprintf(tmp, "_traced_write_list"); + break; + + case _traced_write_l_list : + sprintf(tmp, "_traced_write_l_list"); + break; + + case _traced_write_struct : + sprintf(tmp, "_traced_write_struct"); + break; + + case _traced_write_l_struc : + sprintf(tmp, "_traced_write_l_struc"); + break; + + case _traced_save_pair_x : + sprintf(tmp, "_traced_save_pair_x"); + break; + + case _traced_save_pair_x_write : + sprintf(tmp, "_traced_save_pair_x_write"); + break; + + case _traced_save_pair_y : + sprintf(tmp, "_traced_save_pair_y"); + break; + + case _traced_save_pair_y_write : + sprintf(tmp, "_traced_save_pair_y_write"); + break; + + case _traced_save_appl_x : + sprintf(tmp, "_traced_save_appl_x"); + break; + + case _traced_save_appl_x_write : + sprintf(tmp, "_traced_save_appl_x_write"); + break; + + case _traced_save_appl_y : + sprintf(tmp, "_traced_save_appl_y"); + break; + + case _traced_save_appl_y_write : + sprintf(tmp, "_traced_save_appl_y_write"); + break; + + case _traced_jump : + sprintf(tmp, "_traced_jump"); + break; + + case _traced_move_back : + sprintf(tmp, "_traced_move_back"); + break; + + case _traced_skip : + sprintf(tmp, "_traced_skip"); + break; + + case _traced_either : + sprintf(tmp, "_traced_either"); + break; + + case _traced_or_else : + sprintf(tmp, "_traced_or_else"); + break; + + case _traced_pop_n : + sprintf(tmp, "_traced_pop_n"); + break; + + case _traced_pop : + sprintf(tmp, "_traced_pop"); + break; + + case _traced_call_cpred : + sprintf(tmp, "_traced_call_cpred"); + break; + + case _traced_execute_cpred : + sprintf(tmp, "_traced_execute_cpred"); + break; + + case _traced_call_usercpred : + sprintf(tmp, "_traced_call_usercpred"); + break; + + case _traced_call_c_wfail : + sprintf(tmp, "_traced_call_x_wfail"); + break; + + case _traced_try_c : + sprintf(tmp, "_traced_try_c"); + break; + + case _traced_retry_c : + sprintf(tmp, "_traced_retry_c"); + break; + +#ifdef CUT_C + case _traced_cut_c : + sprintf(tmp, "_traced_cut_c"); + break; + +#endif + case _traced_try_userc : + sprintf(tmp, "_traced_try_userc"); + break; + + case _traced_retry_userc : + sprintf(tmp, "_traced_retry_userc"); + break; + +#ifdef CUT_C + case _traced_cut_userc : + sprintf(tmp, "_traced_cut_userc"); + break; + +#endif + case _traced_lock_pred : + sprintf(tmp, "_traced_lock_pred"); + break; + + case _traced_index_pred : + sprintf(tmp, "_traced_index_pred"); + break; + +#ifdef THREADS + case _traced_thread_local : + sprintf(tmp, "_traced_thread_local"); + break; + +#endif + case _traced_expand_index : + sprintf(tmp, "_traced_expand_index"); + break; + + case _traced_expand_clauses : + sprintf(tmp, "_traced_expand_clauses"); + break; + + case _traced_undef_p : + sprintf(tmp, "_traced_undef_p"); + break; + + case _traced_spy_pred : + sprintf(tmp, "_traced_spy_pred"); + break; + + case _traced_try_clause : + sprintf(tmp, "_traced_try_clause"); + break; + + case _traced_try_clause2 : + sprintf(tmp, "_traced_try_clause2"); + break; + + case _traced_try_clause3 : + sprintf(tmp, "_traced_try_clause3"); + break; + + case _traced_try_clause4 : + sprintf(tmp, "_traced_try_clause4"); + break; + + case _traced_retry : + sprintf(tmp, "_traced_retry"); + break; + + case _traced_retry2 : + sprintf(tmp, "_traced_retry2"); + break; + + case _traced_retry3 : + sprintf(tmp, "_traced_retry3"); + break; + + case _traced_retry4 : + sprintf(tmp, "_traced_retry4"); + break; + + case _traced_trust : + sprintf(tmp, "_traced_trust"); + break; + + case _traced_try_in : + sprintf(tmp, "_traced_try_in"); + break; + + case _traced_enter_lu_pred : + sprintf(tmp, "_traced_enter_lu_pred"); + break; + + case _traced_try_logical : + sprintf(tmp, "_traced_try_logical"); + break; + + case _traced_retry_logical : + sprintf(tmp, "_traced_retry_logical"); + break; + + case _traced_trust_logical : + sprintf(tmp, "_traced_trust_logical"); + break; + + case _traced_user_switch : + sprintf(tmp, "_traced_user_switch"); + break; + + case _traced_switch_on_type : + sprintf(tmp, "_traced_switch_on_type"); + break; + + case _traced_switch_list_nl : + sprintf(tmp, "_traced_switch_list_nl"); + break; + + case _traced_switch_on_arg_type : + sprintf(tmp, "_traced_switch_on_arg_type"); + break; + + case _traced_switch_on_sub_arg_type : + sprintf(tmp, "_traced_switch_on_sub_arg_type"); + break; + + case _traced_jump_if_var : + sprintf(tmp, "_traced_jump_if_var"); + break; + + case _traced_jump_if_nonvar : + sprintf(tmp, "_traced_jump_if_nonvar"); + break; + + case _traced_if_not_then : + sprintf(tmp, "_traced_if_not_then"); + break; + + case _traced_switch_on_func : + sprintf(tmp, "_traced_switch_on_func"); + break; + + case _traced_switch_on_cons : + sprintf(tmp, "_traced_switch_on_cons"); + break; + + case _traced_go_on_func : + sprintf(tmp, "_traced_go_on_func"); + break; + + case _traced_go_on_cons : + sprintf(tmp, "_traced_go_on_cons"); + break; + + case _traced_if_func : + sprintf(tmp, "_traced_if_func"); + break; + + case _traced_if_cons : + sprintf(tmp, "_traced_if_cons"); + break; + + case _traced_index_dbref : + sprintf(tmp, "_traced_index_dbref"); + break; + + case _traced_index_blob : + sprintf(tmp, "_traced_index_blob"); + break; + + case _traced_index_long : + sprintf(tmp, "_traced_index_long"); + break; + + case _traced_jit_handler : + sprintf(tmp, "_traced_jit_handler"); + break; + + case _traced_p_atom_x : + sprintf(tmp, "_traced_p_atom_x"); + break; + + case _traced_p_atom_y : + sprintf(tmp, "_traced_p_atom_y"); + break; + + case _traced_p_atomic_x : + sprintf(tmp, "_traced_p_atomic_x"); + break; + + case _traced_p_atomic_y : + sprintf(tmp, "_traced_p_atomic_y"); + break; + + case _traced_p_integer_x : + sprintf(tmp, "_traced_p_integer_x"); + break; + + case _traced_p_integer_y : + sprintf(tmp, "_traced_p_integer_y"); + break; + + case _traced_p_nonvar_x : + sprintf(tmp, "_traced_p_nonvar_x"); + break; + + case _traced_p_nonvar_y : + sprintf(tmp, "_traced_p_nonvar_y"); + break; + + case _traced_p_number_x : + sprintf(tmp, "_traced_p_number_x"); + break; + + case _traced_p_number_y : + sprintf(tmp, "_traced_p_number_y"); + break; + + case _traced_p_var_x : + sprintf(tmp, "_traced_p_var_x"); + break; + + case _traced_p_var_y : + sprintf(tmp, "_traced_p_var_y"); + break; + + case _traced_p_db_ref_x : + sprintf(tmp, "_traced_p_db_ref_x"); + break; + + case _traced_p_db_ref_y : + sprintf(tmp, "_traced_p_db_ref_y"); + break; + + case _traced_p_primitive_x : + sprintf(tmp, "_traced_p_primitive_x"); + break; + + case _traced_p_primitive_y : + sprintf(tmp, "_traced_p_primitive_y"); + break; + + case _traced_p_compound_x : + sprintf(tmp, "_traced_p_compound_x"); + break; + + case _traced_p_compound_y : + sprintf(tmp, "_traced_p_compound_y"); + break; + + case _traced_p_float_x : + sprintf(tmp, "_traced_p_float_x"); + break; + + case _traced_p_float_y : + sprintf(tmp, "_traced_p_float_y"); + break; + + case _traced_p_plus_vv : + sprintf(tmp, "_traced_p_plus_vv"); + break; + + case _traced_p_plus_vc : + sprintf(tmp, "_traced_p_plus_vc"); + break; + + case _traced_p_plus_y_vv : + sprintf(tmp, "_traced_p_plus_y_vv"); + break; + + case _traced_p_plus_y_vc : + sprintf(tmp, "_traced_p_plus_y_vc"); + break; + + case _traced_p_minus_vv : + sprintf(tmp, "_traced_p_minus_vv"); + break; + + case _traced_p_minus_cv : + sprintf(tmp, "_traced_p_minus_cv"); + break; + + case _traced_p_minus_y_vv : + sprintf(tmp, "_traced_p_minus_y_vv"); + break; + + case _traced_p_minus_y_cv : + sprintf(tmp, "_traced_p_minus_y_cv"); + break; + + case _traced_p_times_vv : + sprintf(tmp, "_traced_p_times_vv"); + break; + + case _traced_p_times_vc : + sprintf(tmp, "_traced_p_times_vc"); + break; + + case _traced_p_times_y_vv : + sprintf(tmp, "_traced_p_times_y_vv"); + break; + + case _traced_p_times_y_vc : + sprintf(tmp, "_traced_p_times_y_vc"); + break; + + case _traced_p_div_vv : + sprintf(tmp, "_traced_p_div_vv"); + break; + + case _traced_p_div_vc : + sprintf(tmp, "_traced_p_div_vc"); + break; + + case _traced_p_div_cv : + sprintf(tmp, "_traced_p_div_cv"); + break; + + case _traced_p_div_y_vv : + sprintf(tmp, "_traced_p_div_y_vv"); + break; + + case _traced_p_div_y_vc : + sprintf(tmp, "_traced_p_div_y_vc"); + break; + + case _traced_p_div_y_cv : + sprintf(tmp, "_traced_p_div_y_cv"); + break; + + case _traced_p_and_vv : + sprintf(tmp, "_traced_p_and_vv"); + break; + + case _traced_p_and_vc : + sprintf(tmp, "_traced_p_and_vc"); + break; + + case _traced_p_and_y_vv : + sprintf(tmp, "_traced_p_and_y_vv"); + break; + + case _traced_p_and_y_vc : + sprintf(tmp, "_traced_p_and_y_vc"); + break; + + case _traced_p_or_vv : + sprintf(tmp, "_traced_p_or_vv"); + break; + + case _traced_p_or_vc : + sprintf(tmp, "_traced_p_or_vc"); + break; + + case _traced_p_or_y_vv : + sprintf(tmp, "_traced_p_or_y_vv"); + break; + + case _traced_p_or_y_vc : + sprintf(tmp, "_traced_p_or_y_vc"); + break; + + case _traced_p_sll_vv : + sprintf(tmp, "_traced_p_sll_vv"); + break; + + case _traced_p_sll_vc : + sprintf(tmp, "_traced_p_sll_vc"); + break; + + case _traced_p_sll_cv : + sprintf(tmp, "_traced_p_sll_cv"); + break; + + case _traced_p_sll_y_vv : + sprintf(tmp, "_traced_p_sll_y_vv"); + break; + + case _traced_p_sll_y_vc : + sprintf(tmp, "_traced_p_sll_y_vc"); + break; + + case _traced_p_sll_y_cv : + sprintf(tmp, "_traced_p_sll_y_cv"); + break; + + case _traced_p_slr_vv : + sprintf(tmp, "_traced_p_slr_vv"); + break; + + case _traced_p_slr_vc : + sprintf(tmp, "_traced_p_slr_vc"); + break; + + case _traced_p_slr_cv : + sprintf(tmp, "_traced_p_slr_cv"); + break; + + case _traced_p_slr_y_vv : + sprintf(tmp, "_traced_p_slr_y_vv"); + break; + + case _traced_p_slr_y_vc : + sprintf(tmp, "_traced_p_slr_y_vc"); + break; + + case _traced_p_slr_y_cv : + sprintf(tmp, "_traced_p_slr_y_cv"); + break; + + case _traced_call_bfunc_xx : + sprintf(tmp, "_traced_call_bfunc_xx"); + break; + + case _traced_call_bfunc_yx : + sprintf(tmp, "_traced_call_bfunc_yx"); + break; + + case _traced_call_bfunc_xy : + sprintf(tmp, "_traced_call_bfunc_xy"); + break; + + case _traced_call_bfunc_yy : + sprintf(tmp, "_traced_call_bfunc_yy"); + break; + + case _traced_p_equal : + sprintf(tmp, "_traced_p_equal"); + break; + + case _traced_p_dif : + sprintf(tmp, "_traced_p_dif"); + break; + + case _traced_p_eq : + sprintf(tmp, "_traced_p_eq"); + break; + + case _traced_p_arg_vv : + sprintf(tmp, "_traced_p_arg_vv"); + break; + + case _traced_p_arg_cv : + sprintf(tmp, "_traced_p_arg_cv"); + break; + + case _traced_p_arg_y_vv : + sprintf(tmp, "_traced_p_arg_y_vv"); + break; + + case _traced_p_arg_y_cv : + sprintf(tmp, "_traced_p_arg_y_cv"); + break; + + case _traced_p_func2s_vv : + sprintf(tmp, "_traced_p_func2s_vv"); + break; + + case _traced_p_func2s_cv : + sprintf(tmp, "_traced_p_func2s_cv"); + break; + + case _traced_p_func2s_vc : + sprintf(tmp, "_traced_p_func2s_vc"); + break; + + case _traced_p_func2s_y_vv : + sprintf(tmp, "_traced_p_func2s_y_vv"); + break; + + case _traced_p_func2s_y_cv : + sprintf(tmp, "_traced_p_func2s_y_cv"); + break; + + case _traced_p_func2s_y_vc : + sprintf(tmp, "_traced_p_func2s_y_vc"); + break; + + case _traced_p_func2f_xx : + sprintf(tmp, "_traced_p_func2f_xx"); + break; + + case _traced_p_func2f_xy : + sprintf(tmp, "_traced_p_func2f_xy"); + break; + + case _traced_p_func2f_yx : + sprintf(tmp, "_traced_p_func2f_yx"); + break; + + case _traced_p_func2f_yy : + sprintf(tmp, "_traced_p_func2f_yy"); + break; + + case _traced_p_functor : + sprintf(tmp, "_traced_p_functor"); + break; + + case _traced_p_execute2 : + sprintf(tmp, "_traced_p_execute2"); + break; + + case _traced_p_execute : + sprintf(tmp, "_traced_p_execute"); + break; + + case _traced_p_execute_tail : + sprintf(tmp, "_traced_p_execute_tail"); + break; + +#ifdef YAPOR + case _traced_getwork_first_time : + sprintf(tmp, "_traced_getwork_first_time"); + break; + + case _traced_getwork : + sprintf(tmp, "_traced_getwork"); + break; + + case _traced_getwork_seq : + sprintf(tmp, "_traced_getwork_seq"); + break; + + case _traced_sync : + sprintf(tmp, "_traced_sync"); + break; + +#endif +#ifdef TABLING +#ifdef TABLING_INNER_CUTS + case _traced_clause_with_cut : + sprintf(tmp, "_traced_clause_with_cut"); + break; + +#endif + case _traced_table_load_answer : + sprintf(tmp, "_traced_table_load_answer"); + break; + + case _traced_table_try_answer : + sprintf(tmp, "_traced_table_try_answer"); + break; + + case _traced_table_try_single : + sprintf(tmp, "_traced_table_try_single"); + break; + + case _traced_table_try_me : + sprintf(tmp, "_traced_table_try_me"); + break; + + case _traced_table_try : + sprintf(tmp, "_traced_table_try"); + break; + + case _traced_table_retry_me : + sprintf(tmp, "_traced_table_retry_me"); + break; + + case _traced_table_retry : + sprintf(tmp, "_traced_table_retry"); + break; + + case _traced_table_trust_me : + sprintf(tmp, "_traced_table_trust_me"); + break; + + case _traced_table_trust : + sprintf(tmp, "_traced_table_trust"); + break; + + case _traced_table_new_answer : + sprintf(tmp, "_traced_table_new_answer"); + break; + + case _traced_table_answer_resolution : + sprintf(tmp, "_traced_table_answer_resolution"); + break; + + case _traced_table_completion : + sprintf(tmp, "_traced_table_completion"); + break; + +#ifdef THREADS_CONSUMER_SHARING + case _traced_table_answer_resolution_completion: + sprintf(tmp, "_traced_table_answer_resolution_completion"); + break; + +#endif + case _traced_trie_do_var : + sprintf(tmp, "_traced_trie_do_var"); + break; + + case _traced_trie_trust_var : + sprintf(tmp, "_traced_trie_trust_var"); + break; + + case _traced_trie_try_var : + sprintf(tmp, "_traced_trie_try_var"); + break; + + case _traced_trie_retry_var : + sprintf(tmp, "_traced_trie_retry_var"); + break; + + case _traced_trie_do_var_in_pair : + sprintf(tmp, "_traced_trie_do_var_in_pair"); + break; + + case _traced_trie_trust_var_in_pair : + sprintf(tmp, "_traced_trie_trust_var_in_pair"); + break; + + case _traced_trie_try_var_in_pair : + sprintf(tmp, "_traced_trie_try_var_in_pair"); + break; + + case _traced_trie_retry_var_in_pair : + sprintf(tmp, "_traced_trie_retry_var_in_pair"); + break; + + case _traced_trie_do_val : + sprintf(tmp, "_traced_trie_do_val"); + break; + + case _traced_trie_trust_val : + sprintf(tmp, "_traced_trie_trust_val"); + break; + + case _traced_trie_try_val : + sprintf(tmp, "_traced_trie_try_val"); + break; + + case _traced_trie_retry_val : + sprintf(tmp, "_traced_trie_retry_val"); + break; + + case _traced_trie_do_val_in_pair : + sprintf(tmp, "_traced_trie_do_val_in_pair"); + break; + + case _traced_trie_trust_val_in_pair : + sprintf(tmp, "_traced_trie_trust_val_in_pair"); + break; + + case _traced_trie_try_val_in_pair : + sprintf(tmp, "_traced_trie_try_val_in_pair"); + break; + + case _traced_trie_retry_val_in_pair : + sprintf(tmp, "_traced_trie_retry_val_in_pair"); + break; + + case _traced_trie_do_atom : + sprintf(tmp, "_traced_trie_do_atom"); + break; + + case _traced_trie_trust_atom : + sprintf(tmp, "_traced_trie_trust_atom"); + break; + + case _traced_trie_try_atom : + sprintf(tmp, "_traced_trie_try_atom"); + break; + + case _traced_trie_retry_atom : + sprintf(tmp, "_traced_trie_retry_atom"); + break; + + case _traced_trie_do_atom_in_pair : + sprintf(tmp, "_traced_trie_do_atom_in_pair"); + break; + + case _traced_trie_trust_atom_in_pair : + sprintf(tmp, "_traced_trie_trust_atom_in_pair"); + break; + + case _traced_trie_try_atom_in_pair : + sprintf(tmp, "_traced_trie_try_atom_in_pair"); + break; + + case _traced_trie_retry_atom_in_pair : + sprintf(tmp, "_traced_trie_retry_atom_in_pair"); + break; + + case _traced_trie_do_null : + sprintf(tmp, "_traced_trie_do_null"); + break; + + case _traced_trie_trust_null : + sprintf(tmp, "_traced_trie_trust_null"); + break; + + case _traced_trie_try_null : + sprintf(tmp, "_traced_trie_try_null"); + break; + + case _traced_trie_retry_null : + sprintf(tmp, "_traced_trie_retry_null"); + break; + + case _traced_trie_do_null_in_pair : + sprintf(tmp, "_traced_trie_do_null_in_pair"); + break; + + case _traced_trie_trust_null_in_pair : + sprintf(tmp, "_traced_trie_trust_null_in_pair"); + break; + + case _traced_trie_try_null_in_pair : + sprintf(tmp, "_traced_tri_try_null_in_paire"); + break; + + case _traced_trie_retry_null_in_pair : + sprintf(tmp, "_traced_trie_retry_null_in_pair"); + break; + + case _traced_trie_do_pair : + sprintf(tmp, "_traced_trie_do_pair"); + break; + + case _traced_trie_trust_pair : + sprintf(tmp, "_traced_trie_trust_pair"); + break; + + case _traced_trie_try_pair : + sprintf(tmp, "_traced_trie_try_pair"); + break; + + case _traced_trie_retry_pair : + sprintf(tmp, "_traced_trie_retry_pair"); + break; + + case _traced_trie_do_appl : + sprintf(tmp, "_traced_trie_do_appl"); + break; + + case _traced_trie_trust_appl : + sprintf(tmp, "_traced_trie_trust_appl"); + break; + + case _traced_trie_try_appl : + sprintf(tmp, "_traced_trie_try_appl"); + break; + + case _traced_trie_retry_appl : + sprintf(tmp, "_traced_trie_retry_appl"); + break; + + case _traced_trie_do_appl_in_pair : + sprintf(tmp, "_traced_trie_do_appl_in_pair"); + break; + + case _traced_trie_trust_appl_in_pair : + sprintf(tmp, "_traced_trie_trust_appl_in_pair"); + break; + + case _traced_trie_try_appl_in_pair : + sprintf(tmp, "_traced_trie_trty_appkl_in_pair"); + break; + + case _traced_trie_retry_appl_in_pair : + sprintf(tmp, "_traced_trie_retry_appl_in_pair"); + break; + + case _traced_trie_do_extension : + sprintf(tmp, "_traced_trie_do_extension"); + break; + + case _traced_trie_trust_extension : + sprintf(tmp, "_traced_trie_trust_extension"); + break; + + case _traced_trie_try_extension : + sprintf(tmp, "_traced_trie_try_extension"); + break; + + case _traced_trie_retry_extension : + sprintf(tmp, "_traced_trie_retry_extension"); + break; + + case _traced_trie_do_double : + sprintf(tmp, "_traced_trie_do_double"); + break; + + case _traced_trie_trust_double : + sprintf(tmp, "_traced_trie_trust_double"); + break; + + case _traced_trie_try_double : + sprintf(tmp, "_traced_trie_try_double"); + break; + + case _traced_trie_retry_double : + sprintf(tmp, "_traced_trie_retry_double"); + break; + + case _traced_trie_do_longint : + sprintf(tmp, "_traced_trie_do_longint"); + break; + + case _traced_trie_trust_longint : + sprintf(tmp, "_traced_trie_trust_longint"); + break; + + case _traced_trie_try_longint : + sprintf(tmp, "_traced_trie_try_longint"); + break; + + case _traced_trie_retry_longint : + sprintf(tmp, "_traced_trie_retry_longint"); + break; + + case _traced_trie_do_gterm : + sprintf(tmp, "_traced_trie_do_gterm"); + break; + + case _traced_trie_trust_gterm : + sprintf(tmp, "_traced_trie_trust_gterm"); + break; + + case _traced_trie_try_gterm : + sprintf(tmp, "_traced_trie_try_gterm"); + break; + + case _traced_trie_retry_gterm : + sprintf(tmp, "_traced_trie_retry_gterm"); + break; + +#endif + /* this instruction is hardwired */ +#ifdef YAPOR + case _traced_or_last : + sprintf(tmp, "_traced_or_last"); + break; + +#else + case _traced_or_last : + sprintf(tmp, "_traced_or_last"); + break; + +#endif + +#endif /* YAP_JIT */ + + } + strcpy(out, prepend_term); + strcat(out, tmp); + strcat(out, append_term); + } diff --git a/JIT/HPP/traced_absmi_insts.i b/JIT/HPP/traced_absmi_insts.i index 0fede65f3..533bd2b0e 100644 --- a/JIT/HPP/traced_absmi_insts.i +++ b/JIT/HPP/traced_absmi_insts.i @@ -23,9 +23,9 @@ * new register to point at YREG =*/ CACHE_Y(YREG); /* store arguments for procedure */ - store_at_least_one_arg(PREG->y_u.Otapl.s); + store_at_least_one_arg(PREG->u.Otapl.s); /* store abstract machine registers */ - store_yaam_regs(PREG->y_u.Otapl.d, 0); + store_yaam_regs(PREG->u.Otapl.d, 0); /* On a try_me, set cut to point at previous choicepoint, * that is, to the B before the cut. */ @@ -49,8 +49,8 @@ CACHE_Y(B); /* After retry, cut should be pointing at the parent * choicepoint for the current B */ - restore_yaam_regs(PREG->y_u.Otapl.d); - restore_at_least_one_arg(PREG->y_u.Otapl.s); + restore_yaam_regs(PREG->u.Otapl.d); + restore_at_least_one_arg(PREG->u.Otapl.s); #ifdef FROZEN_STACKS EMIT_SIMPLE_BLOCK_TEST(RETRY_ME_FROZEN); S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); @@ -74,7 +74,7 @@ #ifdef YAPOR if (SCH_top_shared_cp(B)) { SCH_last_alternative(PREG, B_YREG); - restore_at_least_one_arg(PREG->y_u.Otapl.s); + restore_at_least_one_arg(PREG->u.Otapl.s); #ifdef FROZEN_STACKS S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); #endif /* FROZEN_STACKS */ @@ -84,7 +84,7 @@ #endif /* YAPOR */ { pop_yaam_regs(); - pop_at_least_one_arg(PREG->y_u.Otapl.s); + pop_at_least_one_arg(PREG->u.Otapl.s); /* After trust, cut should be pointing at the new top * choicepoint */ #ifdef FROZEN_STACKS @@ -106,9 +106,9 @@ /* profiled_enter_me Pred */ Op(traced_enter_profiling, p); EMIT_ENTRY_BLOCK(PREG,ENTER_PROFILING_INSTINIT); - LOCK(PREG->y_u.p.p->StatisticsForPred.lock); - PREG->y_u.p.p->StatisticsForPred.NOfEntries++; - UNLOCK(PREG->y_u.p.p->StatisticsForPred.lock); + LOCK(PREG->u.p.p->StatisticsForPred.lock); + PREG->u.p.p->StatisticsForPred.NOfEntries++; + UNLOCK(PREG->u.p.p->StatisticsForPred.lock); PREG = NEXTOP(PREG, p); GONext(); ENDOp(); @@ -116,9 +116,9 @@ /* profiled_retry Label,NArgs */ Op(traced_retry_profiled, p); EMIT_ENTRY_BLOCK(PREG,RETRY_PROFILED_INSTINIT); - LOCK(PREG->y_u.p.p->StatisticsForPred.lock); - PREG->y_u.p.p->StatisticsForPred.NOfRetries++; - UNLOCK(PREG->y_u.p.p->StatisticsForPred.lock); + LOCK(PREG->u.p.p->StatisticsForPred.lock); + PREG->u.p.p->StatisticsForPred.NOfRetries++; + UNLOCK(PREG->u.p.p->StatisticsForPred.lock); PREG = NEXTOP(PREG, p); GONext(); ENDOp(); @@ -129,11 +129,11 @@ CACHE_Y(B); /* After retry, cut should be pointing at the parent * choicepoint for the current B */ - LOCK(PREG->y_u.Otapl.p->StatisticsForPred.lock); - PREG->y_u.Otapl.p->StatisticsForPred.NOfRetries++; - UNLOCK(PREG->y_u.Otapl.p->StatisticsForPred.lock); - restore_yaam_regs(PREG->y_u.Otapl.d); - restore_args(PREG->y_u.Otapl.s); + LOCK(PREG->u.Otapl.p->StatisticsForPred.lock); + PREG->u.Otapl.p->StatisticsForPred.NOfRetries++; + UNLOCK(PREG->u.Otapl.p->StatisticsForPred.lock); + restore_yaam_regs(PREG->u.Otapl.d); + restore_args(PREG->u.Otapl.s); #ifdef FROZEN_STACKS EMIT_SIMPLE_BLOCK(PROFILED_RETRY_ME_FROZEN); S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); @@ -157,7 +157,7 @@ #ifdef YAPOR if (SCH_top_shared_cp(B)) { SCH_last_alternative(PREG, B_YREG); - restore_args(PREG->y_u.Otapl.s); + restore_args(PREG->u.Otapl.s); #ifdef FROZEN_STACKS S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); #endif /* FROZEN_STACKS */ @@ -167,7 +167,7 @@ #endif /* YAPOR */ { pop_yaam_regs(); - pop_args(PREG->y_u.Otapl.s); + pop_args(PREG->u.Otapl.s); /* After trust, cut should be pointing at the new top * choicepoint */ #ifdef FROZEN_STACKS @@ -178,9 +178,9 @@ EMIT_SIMPLE_BLOCK(PROFILED_TRUST_ME_END); SET_BB(B_YREG); ENDCACHE_Y(); - LOCK(PREG->y_u.Otapl.p->StatisticsForPred.lock); - PREG->y_u.Otapl.p->StatisticsForPred.NOfRetries++; - UNLOCK(PREG->y_u.Otapl.p->StatisticsForPred.lock); + LOCK(PREG->u.Otapl.p->StatisticsForPred.lock); + PREG->u.Otapl.p->StatisticsForPred.NOfRetries++; + UNLOCK(PREG->u.Otapl.p->StatisticsForPred.lock); PREG = NEXTOP(PREG, Otapl); GONext(); ENDOp(); @@ -192,23 +192,23 @@ UInt timestamp; CACHE_Y(B); - timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[PREG->y_u.OtaLl.s]); - if (!VALID_TIMESTAMP(timestamp, PREG->y_u.OtaLl.d)) { + timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[PREG->u.OtaLl.s]); + if (!VALID_TIMESTAMP(timestamp, PREG->u.OtaLl.d)) { /* jump to next instruction */ - PREG=PREG->y_u.OtaLl.n; + PREG=PREG->u.OtaLl.n; JMPNext(); } - restore_yaam_regs(PREG->y_u.OtaLl.n); - restore_args(PREG->y_u.OtaLl.s); - LOCK(PREG->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); - PREG->y_u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; - UNLOCK(PREG->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); + restore_yaam_regs(PREG->u.OtaLl.n); + restore_args(PREG->u.OtaLl.s); + LOCK(PREG->u.OtaLl.d->ClPred->StatisticsForPred.lock); + PREG->u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; + UNLOCK(PREG->u.OtaLl.d->ClPred->StatisticsForPred.lock); #ifdef THREADS EMIT_SIMPLE_BLOCK(PROFILED_RETRY_LOGICAL_THREADS); - PP = PREG->y_u.OtaLl.d->ClPred; + PP = PREG->u.OtaLl.d->ClPred; #endif EMIT_SIMPLE_BLOCK(PROFILED_RETRY_LOGICAL_POST_THREADS); - PREG = PREG->y_u.OtaLl.d->ClCode; + PREG = PREG->u.OtaLl.d->ClCode; #ifdef FROZEN_STACKS EMIT_SIMPLE_BLOCK(PROFILED_RETRY_LOGICAL_FROZEN); S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); @@ -229,9 +229,9 @@ EMIT_SIMPLE_BLOCK(PROFILED_TRUST_LOGICAL_END); CACHE_Y(B); { - LogUpdIndex *cl = PREG->y_u.OtILl.block; + LogUpdIndex *cl = PREG->u.OtILl.block; PredEntry *ap = cl->ClPred; - LogUpdClause *lcl = PREG->y_u.OtILl.d; + LogUpdClause *lcl = PREG->u.OtILl.d; UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); if (!VALID_TIMESTAMP(timestamp, lcl)) { @@ -243,7 +243,7 @@ UNLOCK(ap->StatisticsForPred.lock); PREG = lcl->ClCode; } - /* HEY, leave indexing block alone!! */ + /* HREY, leave indexing block alone!! */ /* check if we are the ones using this code */ #if MULTIPLE_STACKS PELOCK(1, ap); @@ -343,9 +343,9 @@ /* count_enter_me Label,NArgs */ Op(traced_count_call, p); EMIT_ENTRY_BLOCK(PREG,COUNT_CALL_INSTINIT); - LOCK(PREG->y_u.p.p->StatisticsForPred.lock); - PREG->y_u.p.p->StatisticsForPred.NOfEntries++; - UNLOCK(PREG->y_u.p.p->StatisticsForPred.lock); + LOCK(PREG->u.p.p->StatisticsForPred.lock); + PREG->u.p.p->StatisticsForPred.NOfEntries++; + UNLOCK(PREG->u.p.p->StatisticsForPred.lock); LOCAL_ReductionsCounter--; EMIT_SIMPLE_BLOCK(COUNT_CALL_MIDDLE); if (LOCAL_ReductionsCounter == 0 && LOCAL_ReductionsCounterOn) { @@ -369,9 +369,9 @@ /* count_retry Label,NArgs */ Op(traced_count_retry, p); EMIT_ENTRY_BLOCK(PREG,COUNT_RETRY_INSTINIT); - LOCK(PREG->y_u.p.p->StatisticsForPred.lock); - PREG->y_u.p.p->StatisticsForPred.NOfRetries++; - UNLOCK(PREG->y_u.p.p->StatisticsForPred.lock); + LOCK(PREG->u.p.p->StatisticsForPred.lock); + PREG->u.p.p->StatisticsForPred.NOfRetries++; + UNLOCK(PREG->u.p.p->StatisticsForPred.lock); LOCAL_RetriesCounter--; EMIT_SIMPLE_BLOCK(COUNT_RETRY_MIDDLE); if (LOCAL_RetriesCounter == 0 && LOCAL_RetriesCounterOn) { @@ -399,8 +399,8 @@ Op(traced_count_retry_me, Otapl); EMIT_ENTRY_BLOCK(PREG,COUNT_RETRY_ME_INSTINIT); CACHE_Y(B); - restore_yaam_regs(PREG->y_u.Otapl.d); - restore_args(PREG->y_u.Otapl.s); + restore_yaam_regs(PREG->u.Otapl.d); + restore_args(PREG->u.Otapl.s); /* After retry, cut should be pointing at the parent * choicepoint for the current B */ EMIT_SIMPLE_BLOCK(COUNT_RETRY_ME_MIDDLE); @@ -412,9 +412,9 @@ #endif /* FROZEN_STACKS */ SET_BB(B_YREG); ENDCACHE_Y(); - LOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); - ((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.NOfRetries++; - UNLOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); + LOCK(((PredEntry *)(PREG->u.Otapl.p))->StatisticsForPred.lock); + ((PredEntry *)(PREG->u.Otapl.p))->StatisticsForPred.NOfRetries++; + UNLOCK(((PredEntry *)(PREG->u.Otapl.p))->StatisticsForPred.lock); LOCAL_RetriesCounter--; if (LOCAL_RetriesCounter == 0 && LOCAL_RetriesCounterOn) { saveregs(); @@ -442,7 +442,7 @@ #ifdef YAPOR if (SCH_top_shared_cp(B)) { SCH_last_alternative(PREG, B_YREG); - restore_args(PREG->y_u.Otapl.s); + restore_args(PREG->u.Otapl.s); #ifdef FROZEN_STACKS S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); #endif /* FROZEN_STACKS */ @@ -452,7 +452,7 @@ #endif /* YAPOR */ { pop_yaam_regs(); - pop_args(PREG->y_u.Otapl.s); + pop_args(PREG->u.Otapl.s); /* After trust, cut should be pointing at the new top * choicepoint */ #ifdef FROZEN_STACKS @@ -477,9 +477,9 @@ JMPNext(); } EMIT_SIMPLE_BLOCK(COUNT_TRUST_ME_END); - LOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); - ((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.NOfRetries++; - UNLOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); + LOCK(((PredEntry *)(PREG->u.Otapl.p))->StatisticsForPred.lock); + ((PredEntry *)(PREG->u.Otapl.p))->StatisticsForPred.NOfRetries++; + UNLOCK(((PredEntry *)(PREG->u.Otapl.p))->StatisticsForPred.lock); PREG = NEXTOP(PREG, Otapl); GONext(); ENDOp(); @@ -492,14 +492,14 @@ UInt timestamp; CACHE_Y(B); - timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[PREG->y_u.OtaLl.s]); - if (!VALID_TIMESTAMP(timestamp, PREG->y_u.OtaLl.d)) { + timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[PREG->u.OtaLl.s]); + if (!VALID_TIMESTAMP(timestamp, PREG->u.OtaLl.d)) { /* jump to next instruction */ - PREG=PREG->y_u.OtaLl.n; + PREG=PREG->u.OtaLl.n; JMPNext(); } - restore_yaam_regs(PREG->y_u.OtaLl.n); - restore_args(PREG->y_u.OtaLl.s); + restore_yaam_regs(PREG->u.OtaLl.n); + restore_args(PREG->u.OtaLl.s); LOCAL_RetriesCounter--; if (LOCAL_RetriesCounter == 0) { saveregs(); @@ -514,13 +514,13 @@ setregs(); JMPNext(); } - LOCK(PREG->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); - PREG->y_u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; - UNLOCK(PREG->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); + LOCK(PREG->u.OtaLl.d->ClPred->StatisticsForPred.lock); + PREG->u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; + UNLOCK(PREG->u.OtaLl.d->ClPred->StatisticsForPred.lock); #ifdef THREADS - PP = PREG->y_u.OtaLl.d->ClPred; + PP = PREG->u.OtaLl.d->ClPred; #endif - PREG = PREG->y_u.OtaLl.d->ClCode; + PREG = PREG->u.OtaLl.d->ClCode; #ifdef FROZEN_STACKS S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); set_cut(S_YREG, B->cp_b); @@ -538,9 +538,9 @@ EMIT_SIMPLE_BLOCK(COUNT_TRUST_LOGICAL_END); CACHE_Y(B); { - LogUpdIndex *cl = PREG->y_u.OtILl.block; + LogUpdIndex *cl = PREG->u.OtILl.block; PredEntry *ap = cl->ClPred; - LogUpdClause *lcl = PREG->y_u.OtILl.d; + LogUpdClause *lcl = PREG->u.OtILl.d; UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); if (!VALID_TIMESTAMP(timestamp, lcl)) { @@ -566,7 +566,7 @@ UNLOCK(ap->StatisticsForPred.lock); PREG = lcl->ClCode; } - /* HEY, leave indexing block alone!! */ + /* HREY, leave indexing block alone!! */ /* check if we are the ones using this code */ #if MULTIPLE_STACKS PELOCK(2, ap); @@ -674,7 +674,7 @@ if (PP) { GONext(); } - PP = PREG->y_u.p.p; + PP = PREG->u.p.p; PELOCK(3, PP); #endif PREG = NEXTOP(PREG, p); @@ -706,7 +706,7 @@ #if MULTIPLE_STACKS { EMIT_SIMPLE_BLOCK(ALLOC_FOR_LOGICAL_PRED_MULTIPLE_STACKS); - LogUpdClause *cl = PREG->y_u.L.ClBase; + LogUpdClause *cl = PREG->u.L.ClBase; #if PARALLEL_YAP EMIT_SIMPLE_BLOCK(ALLOC_FOR_LOGICAL_PRED_MULTIPLE_STACKS_PARALLEL); PredEntry *ap = cl->ClPred; @@ -721,7 +721,7 @@ #else { EMIT_SIMPLE_BLOCK(ALLOC_FOR_LOGICAL_PRED_NOMULTIPLE_STACKS_INIT); - LogUpdClause *cl = (LogUpdClause *)PREG->y_u.L.ClBase; + LogUpdClause *cl = (LogUpdClause *)PREG->u.L.ClBase; EMIT_SIMPLE_BLOCK(ALLOC_FOR_LOGICAL_PRED_NOMULTIPLE_STACKS_IF); if (!(cl->ClFlags & InUseMask)) { cl->ClFlags |= InUseMask; @@ -793,10 +793,10 @@ PP = NULL; #else if (!(cl->ClFlags & InUseMask)) { - /* Clause *cl = (Clause *)PREG->y_u.EC.ClBase; + /* Clause *cl = (Clause *)PREG->u.EC.ClBase; - PREG->y_u.EC.ClTrail = TR-(tr_fr_ptr)LOCAL_TrailBase; - PREG->y_u.EC.ClENV = LCL0-YREG;*/ + PREG->u.EC.ClTrail = TR-(tr_fr_ptr)LOCAL_TrailBase; + PREG->u.EC.ClENV = LCL0-YREG;*/ cl->ClFlags |= InUseMask; TRAIL_CLREF(cl); } @@ -847,10 +847,10 @@ PP = NULL; #else if (!(cl->ClFlags & InUseMask)) { - /* Clause *cl = (Clause *)PREG->y_u.EC.ClBase; + /* Clause *cl = (Clause *)PREG->u.EC.ClBase; - PREG->y_u.EC.ClTrail = TR-(tr_fr_ptr)LOCAL_TrailBase; - PREG->y_u.EC.ClENV = LCL0-YREG;*/ + PREG->u.EC.ClTrail = TR-(tr_fr_ptr)LOCAL_TrailBase; + PREG->u.EC.ClENV = LCL0-YREG;*/ cl->ClFlags |= InUseMask; TRAIL_CLREF(cl); } @@ -874,15 +874,15 @@ EMIT_ENTRY_BLOCK(PREG,ENSURE_SPACE_INSTINIT); EMIT_SIMPLE_BLOCK(ENSURE_SPACE_END); { - Int sz = PREG->y_u.Osbpa.i; - UInt arity = PREG->y_u.Osbpa.p->ArityOfPE; + Int sz = PREG->u.Osbpa.i; + UInt arity = PREG->u.Osbpa.p->ArityOfPE; if (Unsigned(HR) + sz > Unsigned(YREG)-CreepFlag) { YENV[E_CP] = (CELL) CPREG; YENV[E_E] = (CELL) ENV; #ifdef DEPTH_LIMIT YENV[E_DEPTH] = DEPTH; #endif /* DEPTH_LIMIT */ - SET_ASP(YREG, PREG->y_u.Osbpa.s); + SET_ASP(YREG, PREG->u.Osbpa.s); PREG = NEXTOP(PREG,Osbpa); saveregs(); if (!Yap_gcl(sz, arity, YENV, PREG)) { @@ -906,9 +906,9 @@ /* spy_or_trymark */ BOp(traced_spy_or_trymark, Otapl); EMIT_ENTRY_BLOCK(PREG,SPY_OR_TRYMARK_INSTINIT); - PELOCK(5, ((PredEntry *)(PREG->y_u.Otapl.p))); - PREG = (yamop *)(&(((PredEntry *)(PREG->y_u.Otapl.p))->OpcodeOfPred)); - UNLOCKPE(11,(PredEntry *)(PREG->y_u.Otapl.p)); + PELOCK(5, ((PredEntry *)(PREG->u.Otapl.p))); + PREG = (yamop *)(&(((PredEntry *)(PREG->u.Otapl.p))->OpcodeOfPred)); + UNLOCKPE(11,(PredEntry *)(PREG->u.Otapl.p)); goto traced_dospy; ENDBOp(); @@ -923,17 +923,17 @@ CUT_wait_leftmost(); #endif /* YAPOR */ EMIT_SIMPLE_BLOCK(TRY_AND_MARK_YAPOR_THREADS_NOYAPOR_IF); - if (PREG->y_u.Otapl.p->PredFlags & LogUpdatePredFlag) { - PELOCK(6,PREG->y_u.Otapl.p); - PP = PREG->y_u.Otapl.p; + if (PREG->u.Otapl.p->PredFlags & LogUpdatePredFlag) { + PELOCK(6,PREG->u.Otapl.p); + PP = PREG->u.Otapl.p; } - if (PREG->y_u.Otapl.p->CodeOfPred != PREG) { + if (PREG->u.Otapl.p->CodeOfPred != PREG) { /* oops, someone changed the procedure under our feet, fortunately this is no big deal because we haven't done anything yet */ PP = NULL; - PREG = PREG->y_u.Otapl.p->CodeOfPred; - UNLOCKPE(12,PREG->y_u.Otapl.p); + PREG = PREG->u.Otapl.p->CodeOfPred; + UNLOCKPE(12,PREG->u.Otapl.p); /* for profiler */ save_pc(); JMPNext(); @@ -941,16 +941,16 @@ #endif EMIT_SIMPLE_BLOCK(TRY_AND_MARK_NOYAPOR_NOTHREADS); CACHE_Y(YREG); - PREG = PREG->y_u.Otapl.d; + PREG = PREG->u.Otapl.d; /* I've got a read lock on the DB, so I don't need to care... niaaahh.... niahhhh... */ LOCK(DynamicLock(PREG)); /* one can now mess around with the predicate */ - UNLOCKPE(13,((PredEntry *)(PREG->y_u.Otapl.p))); + UNLOCKPE(13,((PredEntry *)(PREG->u.Otapl.p))); BEGD(d1); - d1 = PREG->y_u.Otapl.s; + d1 = PREG->u.Otapl.s; store_args(d1); store_yaam_regs(PREG, 0); ENDD(d1); @@ -1002,9 +1002,9 @@ BOp(traced_profiled_retry_and_mark, Otapl); EMIT_ENTRY_BLOCK(PREG,PROFILED_RETRY_AND_MARK_INSTINIT); - LOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); - ((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.NOfRetries++; - UNLOCK(((PredEntry *)(PREG->y_u.Otapl.p))->StatisticsForPred.lock); + LOCK(((PredEntry *)(PREG->u.Otapl.p))->StatisticsForPred.lock); + ((PredEntry *)(PREG->u.Otapl.p))->StatisticsForPred.NOfRetries++; + UNLOCK(((PredEntry *)(PREG->u.Otapl.p))->StatisticsForPred.lock); /* enter a retry dynamic */ ENDBOp(); @@ -1017,13 +1017,13 @@ #endif /* YAPOR */ /* need to make the DB stable until I get the new clause */ EMIT_SIMPLE_BLOCK(RETRY_AND_MARK_POST_YAPOR); - PELOCK(7,PREG->y_u.Otapl.p); + PELOCK(7,PREG->u.Otapl.p); CACHE_Y(B); - PREG = PREG->y_u.Otapl.d; + PREG = PREG->u.Otapl.d; LOCK(DynamicLock(PREG)); - UNLOCK(PREG->y_u.Otapl.p->PELock); + UNLOCK(PREG->u.Otapl.p->PELock); restore_yaam_regs(PREG); - restore_args(PREG->y_u.Otapl.s); + restore_args(PREG->u.Otapl.s); #ifdef FROZEN_STACKS EMIT_SIMPLE_BLOCK(RETRY_AND_MARK_FROZEN); S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); @@ -1213,14 +1213,14 @@ } case _jump: { - ipc = ipc->y_u.l.l; + ipc = ipc->u.l.l; go_on = TRUE; break; } case _retry_c: case _retry_userc: { - low_level_trace(retry_pred, ipc->y_u.OtapFs.p, B->cp_args); + low_level_trace(retry_pred, ipc->u.OtapFs.p, B->cp_args); break; } case _retry_profiled: @@ -1241,7 +1241,7 @@ case _retry: case _trust: { - low_level_trace(retry_pred, ipc->y_u.Otapl.p, B->cp_args); + low_level_trace(retry_pred, ipc->u.Otapl.p, B->cp_args); break; } case _try_logical: @@ -1252,7 +1252,7 @@ case _profiled_trust_logical: case _count_trust_logical: { - low_level_trace(retry_pred, ipc->y_u.OtILl.d->ClPred, B->cp_args); + low_level_trace(retry_pred, ipc->u.OtILl.d->ClPred, B->cp_args); break; } case _Nstop: @@ -1330,7 +1330,7 @@ goto traced_failloop; } else #endif /* FROZEN_STACKS */ - if (IN_BETWEEN(H0,pt1,HR)) { + if (IN_BETWEEN(H0,pt1,H)) { if (IsAttVar(pt1)) { goto traced_failloop; } else if (*pt1 == (CELL)FunctorBigInt) { @@ -1475,7 +1475,7 @@ } #endif EMIT_SIMPLE_BLOCK_TEST(CUT_NOCOROUTINING); - SET_ASP(YREG, PREG->y_u.s.s); + SET_ASP(YREG, PREG->u.s.s); PREG = NEXTOP(NEXTOP(NEXTOP(PREG, s),Osbpp),l); /* assume cut is always in stack */ saveregs(); @@ -1498,7 +1498,7 @@ } #endif EMIT_SIMPLE_BLOCK_TEST(CUT_T_NOCOROUTINING); - SET_ASP(YREG, PREG->y_u.s.s); + SET_ASP(YREG, PREG->u.s.s); /* assume cut is always in stack */ saveregs(); prune((choiceptr)YREG[E_CB]); @@ -1520,7 +1520,7 @@ } #endif EMIT_SIMPLE_BLOCK_TEST(CUT_E_NOCOROUTINING); - SET_ASP(YREG, PREG->y_u.s.s); + SET_ASP(YREG, PREG->u.s.s); PREG = NEXTOP(NEXTOP(NEXTOP(PREG, s),Osbpp),l); saveregs(); prune((choiceptr)SREG[E_CB]); @@ -1532,7 +1532,7 @@ Op(traced_save_b_x, x); EMIT_ENTRY_BLOCK(PREG,SAVE_B_X_INSTINIT); BEGD(d0); - d0 = PREG->y_u.x.x; + d0 = PREG->u.x.x; #if defined(YAPOR_SBA) && defined(FROZEN_STACKS) EMIT_SIMPLE_BLOCK_TEST(SAVE_B_X_YSBA_FROZEN); XREG(d0) = MkIntegerTerm((Int)B); @@ -1551,10 +1551,10 @@ EMIT_ENTRY_BLOCK(PREG,SAVE_B_Y_INSTINIT); #if defined(YAPOR_SBA) EMIT_SIMPLE_BLOCK_TEST(SAVE_B_Y_YSBA); - INITIALIZE_PERMVAR(YREG+PREG->y_u.y.y,MkIntegerTerm((Int)B)); + INITIALIZE_PERMVAR(YREG+PREG->u.y.y,MkIntegerTerm((Int)B)); #else EMIT_SIMPLE_BLOCK_TEST(SAVE_B_Y_NOYSBA); - INITIALIZE_PERMVAR(YREG+PREG->y_u.y.y,MkIntegerTerm(LCL0-(CELL *)(B))); + INITIALIZE_PERMVAR(YREG+PREG->u.y.y,MkIntegerTerm(LCL0-(CELL *)(B))); #endif /* YAPOR_SBA*/ EMIT_SIMPLE_BLOCK_TEST(SAVE_B_Y_END); PREG = NEXTOP(PREG, y); @@ -1572,12 +1572,12 @@ #endif EMIT_SIMPLE_BLOCK_TEST(COMMIT_B_X_DO_COMMIT_B_X); BEGD(d0); - d0 = XREG(PREG->y_u.xps.x); + d0 = XREG(PREG->u.xps.x); profiled_deref_head_TEST(d0, traced_commit_b_x_unk); traced_commit_b_x_nvar: /* skip a void call and a label */ EMIT_SIMPLE_BLOCK_TEST(COMMIT_B_X_COMMIT_B_X_NVAR); - SET_ASP(YREG, PREG->y_u.xps.s); + SET_ASP(YREG, PREG->u.xps.s); PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xps),Osbpp),l); { choiceptr pt0; @@ -1616,11 +1616,11 @@ #endif EMIT_SIMPLE_BLOCK_TEST(COMMIT_B_Y_DO_COMMIT_B_Y); BEGD(d0); - d0 = YREG[PREG->y_u.yps.y]; + d0 = YREG[PREG->u.yps.y]; profiled_deref_head_TEST(d0, traced_commit_b_y_unk); traced_commit_b_y_nvar: EMIT_SIMPLE_BLOCK_TEST(COMMIT_B_Y_COMMIT_B_Y_NVAR); - SET_ASP(YREG, PREG->y_u.yps.s); + SET_ASP(YREG, PREG->u.yps.s); PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yps),Osbpp),l); { choiceptr pt0; @@ -1660,7 +1660,7 @@ EMIT_ENTRY_BLOCK(PREG,EXECUTE_INSTINIT); PredEntry *pt0; CACHE_Y_AS_ENV(YREG); - pt0 = PREG->y_u.pp.p; + pt0 = PREG->u.pp.p; #ifdef LOW_LEVEL_TRACER if (Yap_do_low_level_trace) { EMIT_SIMPLE_BLOCK_TEST(EXECUTE_LOW_LEVEL_TRACER); @@ -1716,8 +1716,8 @@ /*NoStackExecute: CHECK_ALARM(JMPNext()); - SREG = (CELL *) PREG->y_u.pp.p; - PP = PREG->y_u.pp.p0; + SREG = (CELL *) PREG->u.pp.p; + PP = PREG->u.pp.p0; if (LOCAL_ActiveSignals & YAP_CDOVF_SIGNAL) { SET_ASP(YREG, E_CB*sizeof(CELL)); SREG = YENV; @@ -1735,7 +1735,7 @@ #ifdef LOW_LEVEL_TRACER if (Yap_do_low_level_trace) { EMIT_SIMPLE_BLOCK_TEST(DEXECUTE_LOW_LEVEL_TRACER); - low_level_trace(enter_pred,PREG->y_u.pp.p,XREGS+1); + low_level_trace(enter_pred,PREG->u.pp.p,XREGS+1); } #endif /* LOW_LEVEL_TRACER */ EMIT_SIMPLE_BLOCK_TEST(DEXECUTE_POST_LOW_LEVEL_TRACER); @@ -1744,7 +1744,7 @@ PredEntry *pt0; CACHE_A1(); - pt0 = PREG->y_u.pp.p; + pt0 = PREG->u.pp.p; #ifndef NO_CHECKING /* check stacks */ EMIT_SIMPLE_BLOCK_TEST(NoStackDExecute_Exception); @@ -1830,14 +1830,14 @@ #ifdef LOW_LEVEL_TRACER if (Yap_do_low_level_trace) { EMIT_SIMPLE_BLOCK_TEST(CALL_LOW_LEVEL_TRACER); - low_level_trace(enter_pred,PREG->y_u.Osbpp.p,XREGS+1); + low_level_trace(enter_pred,PREG->u.Osbpp.p,XREGS+1); } #endif /* LOW_LEVEL_TRACER */ EMIT_SIMPLE_BLOCK_TEST(CALL_POST_LOW_LEVEL_TRACER); CACHE_Y_AS_ENV(YREG); { PredEntry *pt; - pt = PREG->y_u.Osbpp.p; + pt = PREG->u.Osbpp.p; CACHE_A1(); #ifndef NO_CHECKING EMIT_SIMPLE_BLOCK_TEST(NoStackCall_Exception); @@ -1846,7 +1846,7 @@ EMIT_SIMPLE_BLOCK_TEST(CALL_POST_NO_CHECKING); ENV = ENV_YREG; /* Try to preserve the environment */ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + PREG->y_u.Osbpp.s); + ENV_YREG = (CELL *) (((char *) ENV_YREG) + PREG->u.Osbpp.s); CPREG = NEXTOP(PREG, Osbpp); ALWAYS_LOOKAHEAD(pt->OpcodeOfPred); PREG = pt->CodeOfPred; @@ -2102,8 +2102,8 @@ Op(traced_get_x_var, xx); EMIT_ENTRY_BLOCK(PREG,GET_X_VAR_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.xx.xr); - XREG(PREG->y_u.xx.xl) = d0; + d0 = XREG(PREG->u.xx.xr); + XREG(PREG->u.xx.xl) = d0; PREG = NEXTOP(PREG, xx); ENDD(d0); GONext(); @@ -2113,8 +2113,8 @@ EMIT_ENTRY_BLOCK(PREG,GET_Y_VAR_INSTINIT); BEGD(d0); BEGP(pt0); - pt0 = YREG + PREG->y_u.yx.y; - d0 = XREG(PREG->y_u.yx.x); + pt0 = YREG + PREG->u.yx.y; + d0 = XREG(PREG->u.yx.x); PREG = NEXTOP(PREG, yx); INITIALIZE_PERMVAR(pt0,d0); GONext(); @@ -2127,12 +2127,12 @@ CACHE_Y(YREG); BEGD(d0); BEGP(pt0); - pt0 = S_YREG + PREG->y_u.yyxx.y1; - d0 = XREG(PREG->y_u.yyxx.x1); + pt0 = S_YREG + PREG->u.yyxx.y1; + d0 = XREG(PREG->u.yyxx.x1); BEGD(d1); BEGP(pt1); - pt1 = S_YREG + PREG->y_u.yyx.y2; - d1 = XREG(PREG->y_u.yyxx.x2); + pt1 = S_YREG + PREG->u.yyx.y2; + d1 = XREG(PREG->u.yyxx.x2); PREG = NEXTOP(PREG, yyxx); INITIALIZE_PERMVAR(pt0,d0); INITIALIZE_PERMVAR(pt1,d1); @@ -2151,7 +2151,7 @@ Op(traced_get_x_val, xx); EMIT_ENTRY_BLOCK(PREG,GET_X_VAL_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.xx.xl); + d0 = XREG(PREG->u.xx.xl); profiled_deref_head_TEST(d0, traced_gvalx_unk); /* d0 will keep the first argument */ @@ -2159,7 +2159,7 @@ /* first argument is bound */ EMIT_SIMPLE_BLOCK_TEST(GET_X_VAL_GVALX_NONVAR); BEGD(d1); - d1 = XREG(PREG->y_u.xx.xr); + d1 = XREG(PREG->u.xx.xr); profiled_deref_head_TEST(d1, traced_gvalx_nonvar_unk); traced_gvalx_nonvar_nonvar: @@ -2187,7 +2187,7 @@ /* first argument is unbound and in pt0 and in d0 */ EMIT_SIMPLE_BLOCK_TEST(GET_X_VAL_GVALX_UNK); BEGD(d1); - d1 = XREG(PREG->y_u.xx.xr); + d1 = XREG(PREG->u.xx.xr); profiled_deref_head_TEST(d1, traced_gvalx_var_unk); traced_gvalx_var_nonvar: @@ -2218,7 +2218,7 @@ BEGD(d0); BEGD(d1); BEGP(pt0); - pt0 = YREG + PREG->y_u.yx.y; + pt0 = YREG + PREG->u.yx.y; d0 = *pt0; /* From now on, it's just a copy of the code for get_x_val */ @@ -2227,7 +2227,7 @@ /* first argument is bound */ EMIT_SIMPLE_BLOCK_TEST(GET_Y_VAL_GVALY_NONVAR); - d1 = XREG(PREG->y_u.yx.x); + d1 = XREG(PREG->u.yx.x); profiled_deref_head_TEST(d1, traced_gvaly_nonvar_unk); traced_gvaly_nonvar_nonvar: @@ -2251,7 +2251,7 @@ profiled_derefa_body(d0, pt0, traced_gvaly_unk, traced_gvaly_nonvar); /* first argument is unbound */ EMIT_SIMPLE_BLOCK_TEST(GET_Y_VAL_GVALY_UNK); - d1 = XREG(PREG->y_u.yx.x); + d1 = XREG(PREG->u.yx.x); profiled_deref_head_TEST(d1, traced_gvaly_var_unk); traced_gvaly_var_nonvar: /* first unbound, second bound */ @@ -2278,8 +2278,8 @@ BEGD(d0); BEGD(d1); /* fetch arguments */ - d0 = XREG(PREG->y_u.xc.x); - d1 = PREG->y_u.xc.c; + d0 = XREG(PREG->u.xc.x); + d1 = PREG->u.xc.c; BEGP(pt0); profiled_deref_head_TEST(d0, traced_gatom_unk); @@ -2316,7 +2316,7 @@ profiled_deref_head_TEST(d0, traced_gatom_2unk); /* argument is nonvar */ traced_gatom_2nonvar: - if (d0 == PREG->y_u.cc.c1) { + if (d0 == PREG->u.cc.c1) { goto traced_gatom_2b; } else { @@ -2325,13 +2325,13 @@ profiled_deref_body(d0, pt0, traced_gatom_2unk, traced_gatom_2nonvar); EMIT_SIMPLE_BLOCK_TEST(GET_2ATOMS_GATOM_2UNK); - Bind(pt0, PREG->y_u.cc.c1); + Bind(pt0, PREG->u.cc.c1); ENDP(pt0); traced_gatom_2b: /* fetch arguments */ EMIT_SIMPLE_BLOCK_TEST(GET_2ATOMS_GATOM_2B); d0 = ARG2; - d1 = PREG->y_u.cc.c2; + d1 = PREG->u.cc.c2; BEGP(pt0); profiled_deref_head_TEST(d0, traced_gatom_2bunk); @@ -2368,7 +2368,7 @@ profiled_deref_head_TEST(d0, traced_gatom_3unk); /* argument is nonvar */ traced_gatom_3nonvar: - if (d0 == PREG->y_u.ccc.c1) { + if (d0 == PREG->u.ccc.c1) { goto traced_gatom_3b; } else { @@ -2378,7 +2378,7 @@ profiled_deref_body(d0, pt0, traced_gatom_3unk, traced_gatom_3nonvar); /* argument is a variable */ EMIT_SIMPLE_BLOCK_TEST(GET_3ATOMS_GATOM_3UNK); - Bind(pt0, PREG->y_u.ccc.c1); + Bind(pt0, PREG->u.ccc.c1); ENDP(pt0); traced_gatom_3b: /* fetch arguments */ @@ -2389,7 +2389,7 @@ profiled_deref_head_TEST(d0, traced_gatom_3bunk); /* argument is nonvar */ traced_gatom_3bnonvar: - if (d0 == PREG->y_u.ccc.c2) { + if (d0 == PREG->u.ccc.c2) { goto traced_gatom_3c; } else { @@ -2399,13 +2399,13 @@ profiled_deref_body(d0, pt0, traced_gatom_3bunk, traced_gatom_3bnonvar); /* argument is a variable */ EMIT_SIMPLE_BLOCK_TEST(GET_3ATOMS_GATOM_3BUNK); - Bind(pt0, PREG->y_u.ccc.c2); + Bind(pt0, PREG->u.ccc.c2); ENDP(pt0); traced_gatom_3c: /* fetch arguments */ EMIT_SIMPLE_BLOCK_TEST(GET_3ATOMS_GATOM_3C); d0 = ARG3; - d1 = PREG->y_u.ccc.c3; + d1 = PREG->u.ccc.c3; BEGP(pt0); profiled_deref_head_TEST(d0, traced_gatom_3cunk); @@ -2442,7 +2442,7 @@ profiled_deref_head_TEST(d0, traced_gatom_4unk); /* argument is nonvar */ traced_gatom_4nonvar: - if (d0 == PREG->y_u.cccc.c1) { + if (d0 == PREG->u.cccc.c1) { goto traced_gatom_4b; } else { @@ -2452,7 +2452,7 @@ profiled_deref_body(d0, pt0, traced_gatom_4unk, traced_gatom_4nonvar); /* argument is a variable */ EMIT_SIMPLE_BLOCK_TEST(GET_4ATOMS_GATOM_4UNK); - Bind(pt0, PREG->y_u.cccc.c1); + Bind(pt0, PREG->u.cccc.c1); ENDP(pt0); traced_gatom_4b: /* fetch arguments */ @@ -2463,7 +2463,7 @@ profiled_deref_head_TEST(d0, traced_gatom_4bunk); /* argument is nonvar */ traced_gatom_4bnonvar: - if (d0 == PREG->y_u.cccc.c2) { + if (d0 == PREG->u.cccc.c2) { goto traced_gatom_4c; } else { @@ -2473,7 +2473,7 @@ profiled_deref_body(d0, pt0, traced_gatom_4bunk, traced_gatom_4bnonvar); /* argument is a variable */ EMIT_SIMPLE_BLOCK_TEST(GET_4ATOMS_GATOM_4BUNK); - Bind(pt0, PREG->y_u.cccc.c2); + Bind(pt0, PREG->u.cccc.c2); ENDP(pt0); traced_gatom_4c: /* fetch arguments */ @@ -2484,7 +2484,7 @@ profiled_deref_head_TEST(d0, traced_gatom_4cunk); /* argument is nonvar */ traced_gatom_4cnonvar: - if (d0 == PREG->y_u.cccc.c3) { + if (d0 == PREG->u.cccc.c3) { goto traced_gatom_4d; } else { @@ -2494,13 +2494,13 @@ profiled_deref_body(d0, pt0, traced_gatom_4cunk, traced_gatom_4cnonvar); /* argument is a variable */ EMIT_SIMPLE_BLOCK_TEST(GET_4ATOMS_GATOM_4CUNK); - Bind(pt0, PREG->y_u.cccc.c3); + Bind(pt0, PREG->u.cccc.c3); ENDP(pt0); traced_gatom_4d: /* fetch arguments */ EMIT_SIMPLE_BLOCK_TEST(GET_4ATOMS_GATOM_4D); d0 = ARG4; - d1 = PREG->y_u.cccc.c4; + d1 = PREG->u.cccc.c4; BEGP(pt0); profiled_deref_head_TEST(d0, traced_gatom_4dunk); @@ -2537,7 +2537,7 @@ profiled_deref_head_TEST(d0, traced_gatom_5unk); /* argument is nonvar */ traced_gatom_5nonvar: - if (d0 == PREG->y_u.ccccc.c1) { + if (d0 == PREG->u.ccccc.c1) { goto traced_gatom_5b; } else { @@ -2547,7 +2547,7 @@ profiled_deref_body(d0, pt0, traced_gatom_5unk, traced_gatom_5nonvar); /* argument is a variable */ EMIT_SIMPLE_BLOCK_TEST(GET_5ATOMS_GATOM_5UNK); - Bind(pt0, PREG->y_u.ccccc.c1); + Bind(pt0, PREG->u.ccccc.c1); ENDP(pt0); traced_gatom_5b: /* fetch arguments */ @@ -2558,7 +2558,7 @@ profiled_deref_head_TEST(d0, traced_gatom_5bunk); /* argument is nonvar */ traced_gatom_5bnonvar: - if (d0 == PREG->y_u.ccccc.c2) { + if (d0 == PREG->u.ccccc.c2) { goto traced_gatom_5c; } else { @@ -2568,7 +2568,7 @@ profiled_deref_body(d0, pt0, traced_gatom_5bunk, traced_gatom_5bnonvar); /* argument is a variable */ EMIT_SIMPLE_BLOCK_TEST(GET_5ATOMS_GATOM_5BUNK); - Bind(pt0, PREG->y_u.ccccc.c2); + Bind(pt0, PREG->u.ccccc.c2); ENDP(pt0); traced_gatom_5c: /* fetch arguments */ @@ -2579,7 +2579,7 @@ profiled_deref_head_TEST(d0, traced_gatom_5cunk); /* argument is nonvar */ traced_gatom_5cnonvar: - if (d0 == PREG->y_u.ccccc.c3) { + if (d0 == PREG->u.ccccc.c3) { goto traced_gatom_5d; } else { @@ -2589,7 +2589,7 @@ profiled_deref_body(d0, pt0, traced_gatom_5cunk, traced_gatom_5cnonvar); /* argument is a variable */ EMIT_SIMPLE_BLOCK_TEST(GET_5ATOMS_GATOM_5CUNK); - Bind(pt0, PREG->y_u.ccccc.c3); + Bind(pt0, PREG->u.ccccc.c3); ENDP(pt0); traced_gatom_5d: /* fetch arguments */ @@ -2600,7 +2600,7 @@ profiled_deref_head_TEST(d0, traced_gatom_5dunk); /* argument is nonvar */ traced_gatom_5dnonvar: - if (d0 == PREG->y_u.ccccc.c4) { + if (d0 == PREG->u.ccccc.c4) { goto traced_gatom_5e; } else { @@ -2610,13 +2610,13 @@ profiled_deref_body(d0, pt0, traced_gatom_5dunk, traced_gatom_5dnonvar); /* argument is a variable */ EMIT_SIMPLE_BLOCK_TEST(GET_5ATOMS_GATOM_5DUNK); - Bind(pt0, PREG->y_u.ccccc.c4); + Bind(pt0, PREG->u.ccccc.c4); ENDP(pt0); traced_gatom_5e: /* fetch arguments */ EMIT_SIMPLE_BLOCK_TEST(GET_5ATOMS_GATOM_5E); d0 = ARG5; - d1 = PREG->y_u.ccccc.c5; + d1 = PREG->u.ccccc.c5; BEGP(pt0); profiled_deref_head_TEST(d0, traced_gatom_5eunk); @@ -2653,7 +2653,7 @@ profiled_deref_head_TEST(d0, traced_gatom_6unk); /* argument is nonvar */ traced_gatom_6nonvar: - if (d0 == PREG->y_u.cccccc.c1) { + if (d0 == PREG->u.cccccc.c1) { goto traced_gatom_6b; } else { @@ -2663,7 +2663,7 @@ profiled_deref_body(d0, pt0, traced_gatom_6unk, traced_gatom_6nonvar); /* argument is a variable */ EMIT_SIMPLE_BLOCK_TEST(GET_6ATOMS_GATOM_6UNK); - Bind(pt0, PREG->y_u.cccccc.c1); + Bind(pt0, PREG->u.cccccc.c1); ENDP(pt0); traced_gatom_6b: /* fetch arguments */ @@ -2674,7 +2674,7 @@ profiled_deref_head_TEST(d0, traced_gatom_6bunk); /* argument is nonvar */ traced_gatom_6bnonvar: - if (d0 == PREG->y_u.cccccc.c2) { + if (d0 == PREG->u.cccccc.c2) { goto traced_gatom_6c; } else { @@ -2684,7 +2684,7 @@ profiled_deref_body(d0, pt0, traced_gatom_6bunk, traced_gatom_6bnonvar); /* argument is a variable */ EMIT_SIMPLE_BLOCK_TEST(GET_6ATOMS_GATOM_6BUNK); - Bind(pt0, PREG->y_u.cccccc.c2); + Bind(pt0, PREG->u.cccccc.c2); ENDP(pt0); traced_gatom_6c: /* fetch arguments */ @@ -2695,7 +2695,7 @@ profiled_deref_head_TEST(d0, traced_gatom_6cunk); /* argument is nonvar */ traced_gatom_6cnonvar: - if (d0 == PREG->y_u.cccccc.c3) { + if (d0 == PREG->u.cccccc.c3) { goto traced_gatom_6d; } else { @@ -2705,7 +2705,7 @@ profiled_deref_body(d0, pt0, traced_gatom_6cunk, traced_gatom_6cnonvar); /* argument is a variable */ EMIT_SIMPLE_BLOCK_TEST(GET_6ATOMS_GATOM_6CUNK); - Bind(pt0, PREG->y_u.cccccc.c3); + Bind(pt0, PREG->u.cccccc.c3); ENDP(pt0); traced_gatom_6d: /* fetch arguments */ @@ -2716,7 +2716,7 @@ profiled_deref_head_TEST(d0, traced_gatom_6dunk); /* argument is nonvar */ traced_gatom_6dnonvar: - if (d0 == PREG->y_u.cccccc.c4) { + if (d0 == PREG->u.cccccc.c4) { goto traced_gatom_6e; } else { @@ -2726,7 +2726,7 @@ profiled_deref_body(d0, pt0, traced_gatom_6dunk, traced_gatom_6dnonvar); /* argument is a variable */ EMIT_SIMPLE_BLOCK_TEST(GET_6ATOMS_GATOM_6DUNK); - Bind(pt0, PREG->y_u.cccccc.c4); + Bind(pt0, PREG->u.cccccc.c4); ENDP(pt0); traced_gatom_6e: /* fetch arguments */ @@ -2737,7 +2737,7 @@ profiled_deref_head_TEST(d0, traced_gatom_6eunk); /* argument is nonvar */ traced_gatom_6enonvar: - if (d0 == PREG->y_u.cccccc.c5) { + if (d0 == PREG->u.cccccc.c5) { goto traced_gatom_6f; } else { @@ -2747,13 +2747,13 @@ profiled_deref_body(d0, pt0, traced_gatom_6eunk, traced_gatom_6enonvar); /* argument is a variable */ EMIT_SIMPLE_BLOCK_TEST(GET_6ATOMS_GATOM_6EUNK); - Bind(pt0, PREG->y_u.cccccc.c5); + Bind(pt0, PREG->u.cccccc.c5); ENDP(pt0); traced_gatom_6f: /* fetch arguments */ EMIT_SIMPLE_BLOCK_TEST(GET_6ATOMS_GATOM_6F); d0 = ARG6; - d1 = PREG->y_u.cccccc.c6; + d1 = PREG->u.cccccc.c6; BEGP(pt0); profiled_deref_head_TEST(d0, traced_gatom_6funk); @@ -2785,7 +2785,7 @@ OpRW(traced_get_list, x); EMIT_ENTRY_BLOCK(PREG,GET_LIST_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.x.x); + d0 = XREG(PREG->u.x.x); profiled_deref_head_TEST(d0, traced_glist_unk); traced_glist_nonvar: @@ -2831,7 +2831,7 @@ OpRW(traced_get_struct, xfa); EMIT_ENTRY_BLOCK(PREG,GET_STRUCT_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.xfa.x); + d0 = XREG(PREG->u.xfa.x); profiled_deref_head_TEST(d0, traced_gstruct_unk); traced_gstruct_nonvar: @@ -2844,7 +2844,7 @@ CACHE_S(); S_SREG = RepAppl(d0); /* check functor */ - d0 = (CELL) (PREG->y_u.xfa.f); + d0 = (CELL) (PREG->u.xfa.f); if (*S_SREG != d0) { TRACED_FAIL(); } @@ -2869,9 +2869,9 @@ pt0 = HR; ENDD(d1); /* first, put the functor */ - d0 = (CELL) (PREG->y_u.xfa.f); + d0 = (CELL) (PREG->u.xfa.f); *pt0++ = d0; - HR = pt0 + PREG->y_u.xfa.a; + HR = pt0 + PREG->u.xfa.a; PREG = NEXTOP(PREG, xfa); /* set SREG */ SREG = pt0; @@ -2886,7 +2886,7 @@ Op(traced_get_float, xd); EMIT_ENTRY_BLOCK(PREG,GET_FLOAT_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.xd.x); + d0 = XREG(PREG->u.xd.x); profiled_deref_head_TEST(d0, traced_gfloat_unk); traced_gfloat_nonvar: @@ -2903,7 +2903,7 @@ TRACED_FAIL(); } BEGP(pt1); - pt1 = PREG->y_u.xd.d; + pt1 = PREG->u.xd.d; PREG = NEXTOP(PREG, xd); if ( pt1[1] != pt0[1] @@ -2926,7 +2926,7 @@ EMIT_SIMPLE_BLOCK_TEST(GET_FLOAT_GFLOAT_UNK); START_PREFETCH(xc); BEGD(d1); - d1 = AbsAppl(PREG->y_u.xd.d); + d1 = AbsAppl(PREG->u.xd.d); PREG = NEXTOP(PREG, xd); Bind(pt0, d1); GONext(); @@ -2940,7 +2940,7 @@ Op(traced_get_longint, xi); EMIT_ENTRY_BLOCK(PREG,GET_LONGINT_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.xi.x); + d0 = XREG(PREG->u.xi.x); profiled_deref_head_TEST(d0, traced_glongint_unk); traced_glongint_nonvar: @@ -2956,7 +2956,7 @@ if (*pt0 != (CELL)FunctorLongInt) { TRACED_FAIL(); } - if (PREG->y_u.xi.i[1] != (CELL)pt0[1]) { + if (PREG->u.xi.i[1] != (CELL)pt0[1]) { TRACED_FAIL(); } ENDP(pt0); @@ -2972,7 +2972,7 @@ EMIT_SIMPLE_BLOCK_TEST(GET_LONGINT_GLONGINT_UNK); START_PREFETCH(xi); BEGD(d1); - d1 = AbsAppl(PREG->y_u.xi.i); + d1 = AbsAppl(PREG->u.xi.i); PREG = NEXTOP(PREG, xi); Bind(pt0, d1); GONext(); @@ -2987,7 +2987,7 @@ #ifdef USE_GMP EMIT_ENTRY_BLOCK(PREG,GET_BIGINT_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.xN.x); + d0 = XREG(PREG->u.xN.x); profiled_deref_head_TEST(d0, traced_gbigint_unk); traced_gbigint_nonvar: @@ -3004,7 +3004,7 @@ { TRACED_FAIL(); } - if (Yap_gmp_tcmp_big_big(d0,PREG->y_u.xN.b)) { + if (Yap_gmp_tcmp_big_big(d0,PREG->u.xN.b)) { TRACED_FAIL(); } PREG = NEXTOP(PREG, xN); @@ -3020,7 +3020,7 @@ EMIT_SIMPLE_BLOCK_TEST(GET_BIGINT_GBIGINT_UNK); START_PREFETCH(xN); BEGD(d1); - d1 = PREG->y_u.xN.b; + d1 = PREG->u.xN.b; PREG = NEXTOP(PREG, xN); Bind(pt0, d1); GONext(); @@ -3038,14 +3038,14 @@ Op(traced_get_dbterm, xD); EMIT_ENTRY_BLOCK(PREG,GET_DBTERM_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.xD.x); + d0 = XREG(PREG->u.xD.x); profiled_deref_head_TEST(d0, traced_gdbterm_unk); traced_gdbterm_nonvar: BEGD(d1); /* we have met a preexisting dbterm */ EMIT_MULTIPLE_DESTINY_BLOCK_TEST(GET_DBTERM_GDBTERM_NONVAR); - d1 = PREG->y_u.xD.D; + d1 = PREG->u.xD.D; PREG = NEXTOP(PREG, xD); traced_UnifyBound(d0,d1); ENDD(d1); @@ -3057,7 +3057,7 @@ EMIT_SIMPLE_BLOCK_TEST(GET_DBTERM_GDBTERM_UNK); START_PREFETCH(xD); BEGD(d1); - d1 = PREG->y_u.xD.D; + d1 = PREG->u.xD.D; PREG = NEXTOP(PREG, xD); Bind(pt0, d1); GONext(); @@ -3074,7 +3074,7 @@ OpRW(traced_glist_valx, xx); EMIT_ENTRY_BLOCK(PREG,GLIST_VALX_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.xx.xl); + d0 = XREG(PREG->u.xx.xl); profiled_deref_head_TEST(d0, traced_glist_valx_write); traced_glist_valx_read: BEGP(pt0); @@ -3096,7 +3096,7 @@ /* first argument is bound */ EMIT_SIMPLE_BLOCK_TEST(GLIST_VALX_GLIST_VALX_NONVAR); BEGD(d1); - d1 = XREG(PREG->y_u.xx.xr); + d1 = XREG(PREG->u.xx.xr); profiled_deref_head_TEST(d1, traced_glist_valx_nonvar_unk); traced_glist_valx_nonvar_nonvar: @@ -3123,7 +3123,7 @@ profiled_derefa_body(d0, pt0, traced_glist_valx_unk, traced_glist_valx_nonvar); /* head is unbound, pt0 has the value */ EMIT_SIMPLE_BLOCK_TEST(GLIST_VALX_GLIST_VALX_UNK); - d0 = XREG(PREG->y_u.xx.xr); + d0 = XREG(PREG->u.xx.xr); profiled_deref_head_TEST(d0, traced_glist_valx_var_unk); traced_glist_valx_var_nonvar: @@ -3151,7 +3151,7 @@ /* enter write mode */ S_SREG = HR; BEGD(d1); - d1 = XREG(PREG->y_u.xx.xr); + d1 = XREG(PREG->u.xx.xr); d0 = AbsPair(S_SREG); S_SREG[0] = d1; ENDD(d1); @@ -3171,7 +3171,7 @@ OpRW(traced_glist_valy, yx); EMIT_ENTRY_BLOCK(PREG,GLIST_VALY_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.yx.x); + d0 = XREG(PREG->u.yx.x); profiled_deref_head_TEST(d0, traced_glist_valy_write); traced_glist_valy_read: BEGP(pt0); @@ -3193,7 +3193,7 @@ EMIT_SIMPLE_BLOCK_TEST(GLIST_VALY_GLIST_VALY_NONVAR); BEGD(d1); BEGP(pt1); - pt1 = YREG + PREG->y_u.yx.y; + pt1 = YREG + PREG->u.yx.y; d1 = *pt1; PREG = NEXTOP(PREG, yx); profiled_deref_head_TEST(d1, traced_glist_valy_nonvar_unk); @@ -3218,7 +3218,7 @@ /* first argument is unbound */ EMIT_SIMPLE_BLOCK_TEST(GLIST_VALY_GLIST_VALY_UNK); BEGP(pt1); - pt1 = YREG+PREG->y_u.yx.y; + pt1 = YREG+PREG->u.yx.y; d1 = *pt1; profiled_deref_head_TEST(d1, traced_glist_valy_var_unk); traced_glist_valy_var_nonvar: @@ -3251,7 +3251,7 @@ Bind(pt0, d0); BEGD(d0); /* include XREG on it */ - d0 = YREG[PREG->y_u.yx.y]; + d0 = YREG[PREG->u.yx.y]; pt1[0] = d0; ENDD(d0); HR = pt1 + 2; @@ -3268,7 +3268,7 @@ Op(traced_gl_void_varx, xx); EMIT_ENTRY_BLOCK(PREG,GL_VOID_VARX_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.xx.xl); + d0 = XREG(PREG->u.xx.xl); profiled_deref_head_TEST(d0, traced_glist_void_varx_write); traced_glist_void_varx_read: /* did we find a list? */ @@ -3281,7 +3281,7 @@ BEGP(pt0); pt0 = RepPair(d0); d0 = pt0[1]; - XREG(PREG->y_u.xx.xr) = d0; + XREG(PREG->u.xx.xr) = d0; PREG = NEXTOP(PREG, xx); ALWAYS_GONext(); ENDP(pt0); @@ -3294,7 +3294,7 @@ BEGP(pt1); pt1 = HR; /* include XREG on it */ - XREG(PREG->y_u.xx.xr) = + XREG(PREG->u.xx.xr) = Unsigned(pt1 + 1); RESET_VARIABLE(pt1); RESET_VARIABLE(pt1+1); @@ -3313,7 +3313,7 @@ Op(traced_gl_void_vary, yx); EMIT_ENTRY_BLOCK(PREG,GL_VOID_VARY_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.yx.x); + d0 = XREG(PREG->u.yx.x); profiled_deref_head_TEST(d0, traced_glist_void_vary_write); traced_glist_void_vary_read: /* did we find a list? */ @@ -3326,7 +3326,7 @@ pt0 = RepPair(d0); d0 = pt0[1]; ENDP(pt0); - INITIALIZE_PERMVAR(YREG+PREG->y_u.yx.y,d0); + INITIALIZE_PERMVAR(YREG+PREG->u.yx.y,d0); PREG = NEXTOP(PREG, yx); GONext(); @@ -3337,7 +3337,7 @@ BEGP(pt1); pt1 = HR; /* include XREG on it */ - INITIALIZE_PERMVAR(YREG+PREG->y_u.yx.y,Unsigned(pt1 + 1)); + INITIALIZE_PERMVAR(YREG+PREG->u.yx.y,Unsigned(pt1 + 1)); PREG = NEXTOP(PREG, yx); RESET_VARIABLE(pt1); RESET_VARIABLE(pt1+1); @@ -3356,7 +3356,7 @@ EMIT_ENTRY_BLOCK(PREG,GL_VOID_VALX_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.xx.xl); + d0 = XREG(PREG->u.xx.xl); deref_head(d0, traced_glist_void_valx_write); traced_glist_void_valx_read: BEGP(pt0); @@ -3379,7 +3379,7 @@ EMIT_SIMPLE_BLOCK(GL_VOID_VALX_GLIST_VOID_VALX_NONVAR); //#endif BEGD(d1); - d1 = XREG(PREG->y_u.xx.xr); + d1 = XREG(PREG->u.xx.xr); deref_head(d1, traced_glist_void_valx_nonvar_unk); traced_glist_void_valx_nonvar_nonvar: @@ -3411,7 +3411,7 @@ EMIT_SIMPLE_BLOCK(GL_VOID_VALX_GLIST_VOID_VALX_UNK); ///#endif BEGD(d1); - d1 = XREG(PREG->y_u.xx.xr); + d1 = XREG(PREG->u.xx.xr); deref_head(d1, traced_glist_void_valx_var_unk); traced_glist_void_valx_var_nonvar: @@ -3449,7 +3449,7 @@ pt1 = HR; BEGD(d0); /* include XREG on it */ - d0 = XREG(PREG->y_u.xx.xr); + d0 = XREG(PREG->u.xx.xr); RESET_VARIABLE(pt1); pt1[1] = d0; HR = pt1 + 2; @@ -3467,7 +3467,7 @@ EMIT_ENTRY_BLOCK(PREG,GL_VOID_VALY_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.yx.x); + d0 = XREG(PREG->u.yx.x); deref_head(d0, traced_glist_void_valy_write); traced_glist_void_valy_read: ///#ifdef PROFILED_ABSMI @@ -3493,7 +3493,7 @@ ///#endif BEGD(d1); BEGP(pt1); - pt1 = YREG+PREG->y_u.yx.y; + pt1 = YREG+PREG->u.yx.y; d1 = *pt1; deref_head(d1, traced_glist_void_valy_nonvar_unk); @@ -3525,7 +3525,7 @@ EMIT_SIMPLE_BLOCK(GL_VOID_VALY_GLIST_VOID_VALY_UNK); ///#endif BEGP(pt1); - pt1 = YREG+PREG->y_u.yx.y; + pt1 = YREG+PREG->u.yx.y; d1 = *pt1; deref_head(d1, traced_glist_void_valy_var_unk); @@ -3563,7 +3563,7 @@ S_SREG = HR; /* include XREG on it */ BEGD(d1); - d1 = YREG[PREG->y_u.yx.y]; + d1 = YREG[PREG->u.yx.y]; RESET_VARIABLE(S_SREG); S_SREG[1] = d1; ENDD(d1); @@ -3596,7 +3596,7 @@ EMIT_SIMPLE_BLOCK_TEST(UNIFY_X_VAR_END); WRITEBACK_S(S_SREG+1); ALWAYS_START_PREFETCH(ox); - XREG(PREG->y_u.ox.x) = d0; + XREG(PREG->u.ox.x) = d0; PREG = NEXTOP(PREG, ox); ALWAYS_GONext(); ALWAYS_END_PREFETCH(); @@ -3609,7 +3609,7 @@ CACHE_S(); READ_IN_S(); BEGP(pt0); - pt0 = &XREG(PREG->y_u.ox.x); + pt0 = &XREG(PREG->u.ox.x); PREG = NEXTOP(PREG, ox); RESET_VARIABLE(S_SREG); *pt0 = (CELL) S_SREG; @@ -3625,7 +3625,7 @@ BEGP(pt0); BEGD(d0); d0 = SREG[0]; - pt0 = &XREG(PREG->y_u.ox.x); + pt0 = &XREG(PREG->u.ox.x); PREG = NEXTOP(PREG, ox); #ifdef YAPOR_SBA EMIT_SIMPLE_BLOCK_TEST(UNIFY_L_X_VAR_YAPOR_SBA); @@ -3647,7 +3647,7 @@ CACHE_S(); READ_IN_S(); BEGP(pt0); - pt0 = &XREG(PREG->y_u.ox.x); + pt0 = &XREG(PREG->u.ox.x); PREG = NEXTOP(PREG, ox); RESET_VARIABLE(S_SREG); *pt0 = (CELL)S_SREG; @@ -3663,7 +3663,7 @@ ALWAYS_START_PREFETCH(oxx); READ_IN_S(); BEGP(pt0); - pt0 = &XREG(PREG->y_u.oxx.xr); + pt0 = &XREG(PREG->u.oxx.xr); BEGD(d0); d0 = S_SREG[0]; BEGD(d1); @@ -3679,7 +3679,7 @@ #endif EMIT_SIMPLE_BLOCK_TEST(UNIFY_X_VAR2_END); WRITEBACK_S(S_SREG+2); - XREG(PREG->y_u.oxx.xl) = d0; + XREG(PREG->u.oxx.xl) = d0; PREG = NEXTOP(PREG, oxx); *pt0 = d1; ENDD(d0); @@ -3695,9 +3695,9 @@ CACHE_S(); READ_IN_S(); BEGP(pt0); - pt0 = &XREG(PREG->y_u.oxx.xr); + pt0 = &XREG(PREG->u.oxx.xr); RESET_VARIABLE(S_SREG); - XREG(PREG->y_u.oxx.xl) = (CELL) S_SREG; + XREG(PREG->u.oxx.xl) = (CELL) S_SREG; S_SREG++; PREG = NEXTOP(PREG, oxx); RESET_VARIABLE(S_SREG); @@ -3714,17 +3714,17 @@ CACHE_S(); READ_IN_S(); BEGP(pt0); - pt0 = &XREG(PREG->y_u.oxx.xr); + pt0 = &XREG(PREG->u.oxx.xr); BEGD(d0); d0 = S_SREG[0]; BEGD(d1); d1 = S_SREG[1]; #ifdef YAPOR_SBA if (d0 == 0) - XREG(PREG->y_u.oxx.xl) = (CELL)S_SREG; + XREG(PREG->u.oxx.xl) = (CELL)S_SREG; else #endif - XREG(PREG->y_u.oxx.xl) = d0; + XREG(PREG->u.oxx.xl) = d0; PREG = NEXTOP(PREG, oxx); #ifdef YAPOR_SBA if (d1 == 0) @@ -3745,8 +3745,8 @@ CACHE_S(); READ_IN_S(); BEGP(pt0); - pt0 = &XREG(PREG->y_u.oxx.xr); - XREG(PREG->y_u.oxx.xl) = (CELL) S_SREG; + pt0 = &XREG(PREG->u.oxx.xr); + XREG(PREG->u.oxx.xl) = (CELL) S_SREG; RESET_VARIABLE(S_SREG); S_SREG++; *pt0 = (CELL) S_SREG; @@ -3763,10 +3763,10 @@ d0 = *SREG++; #ifdef YAPOR_SBA if (d0 == 0) { - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,(CELL)(SREG-1)); + INITIALIZE_PERMVAR(YREG+PREG->u.oy.y,(CELL)(SREG-1)); } else #else - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,d0); + INITIALIZE_PERMVAR(YREG+PREG->u.oy.y,d0); #endif /* YAPOR_SBA */ PREG = NEXTOP(PREG, oy); GONext(); @@ -3777,7 +3777,7 @@ EMIT_ENTRY_BLOCK(PREG,UNIFY_Y_VAR_WRITE_INSTINIT); CACHE_S(); READ_IN_S(); - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,(CELL) S_SREG); + INITIALIZE_PERMVAR(YREG+PREG->u.oy.y,(CELL) S_SREG); PREG = NEXTOP(PREG, oy); RESET_VARIABLE(S_SREG); WRITEBACK_S(S_SREG+1); @@ -3791,10 +3791,10 @@ d0 = SREG[0]; #ifdef YAPOR_SBA if (d0 == 0) { - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,(CELL)SREG); + INITIALIZE_PERMVAR(YREG+PREG->u.oy.y,(CELL)SREG); } else #else - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,d0); + INITIALIZE_PERMVAR(YREG+PREG->u.oy.y,d0); #endif /* YAPOR_SBA */ PREG = NEXTOP(PREG, oy); GONext(); @@ -3805,7 +3805,7 @@ EMIT_ENTRY_BLOCK(PREG,UNIFY_L_Y_VAR_WRITE_INSTINIT); CACHE_S(); READ_IN_S(); - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,(CELL) S_SREG); + INITIALIZE_PERMVAR(YREG+PREG->u.oy.y,(CELL) S_SREG); PREG = NEXTOP(PREG, oy); RESET_VARIABLE(S_SREG); ENDCACHE_S(); @@ -3830,7 +3830,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(UNIFY_X_VAL_UVALX_NONVAR); ///#endif - d1 = XREG(PREG->y_u.ox.x); + d1 = XREG(PREG->u.ox.x); deref_head(d1, traced_uvalx_nonvar_unk); traced_uvalx_nonvar_nonvar: @@ -3863,7 +3863,7 @@ EMIT_SIMPLE_BLOCK(UNIFY_X_VAL_UVALX_UNK); ///#endif /* first argument is unbound */ - d1 = XREG(PREG->y_u.ox.x); + d1 = XREG(PREG->u.ox.x); deref_head(d1, traced_uvalx_var_unk); traced_uvalx_var_nonvar: @@ -3895,7 +3895,7 @@ OpW(traced_unify_x_val_write, ox); /* we are in write mode */ EMIT_ENTRY_BLOCK(PREG,UNIFY_X_VAL_WRITE_INSTINIT); - *SREG++ = XREG(PREG->y_u.ox.x); + *SREG++ = XREG(PREG->u.ox.x); PREG = NEXTOP(PREG, ox); GONextW(); ENDOpW(); @@ -3918,7 +3918,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(UNIFY_L_X_VAL_ULVALX_NONVAR); ///#endif - d1 = XREG(PREG->y_u.ox.x); + d1 = XREG(PREG->u.ox.x); deref_head(d1, traced_ulvalx_nonvar_unk); traced_ulvalx_nonvar_nonvar: @@ -3948,7 +3948,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(UNIFY_L_X_VAL_ULVALX_UNK); ///#endif - d1 = XREG(PREG->y_u.ox.x); + d1 = XREG(PREG->u.ox.x); deref_head(d1, traced_ulvalx_var_unk); traced_ulvalx_var_nonvar: @@ -3978,7 +3978,7 @@ Op(traced_unify_l_x_val_write, ox); /* we are in write mode */ EMIT_ENTRY_BLOCK(PREG,UNIFY_L_X_VAL_WRITE_INSTINIT); - SREG[0] = XREG(PREG->y_u.ox.x); + SREG[0] = XREG(PREG->u.ox.x); PREG = NEXTOP(PREG, ox); GONext(); ENDOp(); @@ -4002,7 +4002,7 @@ EMIT_SIMPLE_BLOCK_TEST(UNIFY_Y_VAL_UVALY_NONVAR); ///#endif BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; + pt1 = YREG+PREG->u.oy.y; d1 = *pt1; deref_head(d1, traced_uvaly_nonvar_unk); @@ -4035,7 +4035,7 @@ EMIT_SIMPLE_BLOCK_TEST(UNIFY_Y_VAL_UVALY_UNK); ///#endif BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; + pt1 = YREG+PREG->u.oy.y; d1 = *pt1; deref_head(d1, traced_uvaly_var_unk); @@ -4068,10 +4068,10 @@ EMIT_ENTRY_BLOCK(PREG,UNIFY_Y_VAL_WRITE_INSTINIT); /* we are in write mode */ BEGD(d0); - d0 = YREG[PREG->y_u.oy.y]; + d0 = YREG[PREG->u.oy.y]; #ifdef YAPOR_SBA if (d0 == 0) /* free variable */ - *SREG++ = (CELL)(YREG+PREG->y_u.oy.y); + *SREG++ = (CELL)(YREG+PREG->u.oy.y); else #endif *SREG++ = d0; @@ -4099,7 +4099,7 @@ EMIT_SIMPLE_BLOCK_TEST(UNIFY_L_Y_VAL_ULVALY_NONVAR); ///#endif BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; + pt1 = YREG+PREG->u.oy.y; d1 = *pt1; deref_head(d1, traced_ulvaly_nonvar_unk); @@ -4130,7 +4130,7 @@ EMIT_SIMPLE_BLOCK_TEST(UNIFY_L_Y_VAL_ULVALY_UNK); ///#endif BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; + pt1 = YREG+PREG->u.oy.y; d1 = *pt1; deref_head(d1, traced_ulvaly_var_unk); @@ -4163,10 +4163,10 @@ EMIT_ENTRY_BLOCK(PREG,UNIFY_L_Y_VAL_WRITE_INSTINIT); /* we are in write mode */ BEGD(d0); - d0 = YREG[PREG->y_u.oy.y]; + d0 = YREG[PREG->u.oy.y]; #ifdef YAPOR_SBA if (d0 == 0) /* new variable */ - SREG[0] = (CELL)(YREG+PREG->y_u.oy.y); + SREG[0] = (CELL)(YREG+PREG->u.oy.y); else #endif SREG[0] = d0; @@ -4189,7 +4189,7 @@ traced_uvalx_loc_nonvar: /* first argument is bound */ EMIT_SIMPLE_BLOCK_TEST(UNIFY_X_LOC_UVALX_LOC_NONVAR); - d1 = XREG(PREG->y_u.ox.x); + d1 = XREG(PREG->u.ox.x); profiled_deref_head_TEST(d1, traced_uvalx_loc_nonvar_unk); traced_uvalx_loc_nonvar_nonvar: @@ -4216,7 +4216,7 @@ profiled_derefa_body(d0, pt0, traced_uvalx_loc_unk, traced_uvalx_loc_nonvar); /* first argument is unbound */ EMIT_SIMPLE_BLOCK_TEST(UNIFY_X_LOC_UVALX_LOC_UNK); - d1 = XREG(PREG->y_u.ox.x); + d1 = XREG(PREG->u.ox.x); profiled_deref_head_TEST(d1, traced_uvalx_loc_var_unk); traced_uvalx_loc_var_nonvar: /* first unbound, second bound */ @@ -4246,7 +4246,7 @@ EMIT_ENTRY_BLOCK(PREG,UNIFY_X_LOC_WRITE_INSTINIT); /* we are in write mode */ BEGD(d0); - d0 = XREG(PREG->y_u.ox.x); + d0 = XREG(PREG->u.ox.x); profiled_deref_head_TEST(d0, traced_unify_x_loc_unk); traced_unify_x_loc_nonvar: EMIT_SIMPLE_BLOCK_TEST(UNIFY_X_LOC_WRITE_UNIFY_X_LOC_NONVAR); @@ -4297,7 +4297,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK_TEST(UNIFY_L_X_LOC_ULVALX_LOC_NONVAR); ///#endif - d1 = XREG(PREG->y_u.ox.x); + d1 = XREG(PREG->u.ox.x); deref_head(d1, traced_ulvalx_loc_nonvar_unk); traced_ulvalx_loc_nonvar_nonvar: @@ -4325,7 +4325,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK_TEST(UNIFY_L_X_LOC_ULVALX_LOC_UNK); ///#endif - d1 = XREG(PREG->y_u.ox.x); + d1 = XREG(PREG->u.ox.x); deref_head(d1, traced_ulvalx_loc_var_unk); traced_ulvalx_loc_var_nonvar: @@ -4356,7 +4356,7 @@ EMIT_ENTRY_BLOCK(PREG,UNIFY_L_X_LOC_WRITE_INSTINIT); /* we are in write mode */ BEGD(d0); - d0 = XREG(PREG->y_u.ox.x); + d0 = XREG(PREG->u.ox.x); profiled_deref_head_TEST(d0, traced_ulnify_x_loc_unk); traced_ulnify_x_loc_nonvar: EMIT_SIMPLE_BLOCK_TEST(UNIFY_L_X_LOC_WRITE_ULNIFY_X_LOC_NONVAR); @@ -4402,7 +4402,7 @@ EMIT_SIMPLE_BLOCK_TEST(UNIFY_Y_LOC_UVALY_LOC_NONVAR); ///#endif BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; + pt1 = YREG+PREG->u.oy.y; d1 = *pt1; deref_head(d1, traced_uvaly_loc_nonvar_unk); @@ -4435,7 +4435,7 @@ EMIT_SIMPLE_BLOCK_TEST(UNIFY_Y_LOC_UVALY_LOC_UNK); ///#endif BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; + pt1 = YREG+PREG->u.oy.y; d1 = *pt1; deref_head(d1, traced_uvaly_loc_var_unk); @@ -4471,7 +4471,7 @@ EMIT_ENTRY_BLOCK(PREG,UNIFY_Y_LOC_WRITE_INSTINIT); BEGD(d0); BEGP(pt0); - pt0 = YREG+PREG->y_u.oy.y; + pt0 = YREG+PREG->u.oy.y; d0 = *pt0; profiled_deref_head_TEST(d0, traced_unify_y_loc_unk); traced_unify_y_loc_nonvar: @@ -4521,7 +4521,7 @@ EMIT_SIMPLE_BLOCK_TEST(UNIFY_L_Y_LOC_ULVALY_LOC_NONVAR); ///#endif BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; + pt1 = YREG+PREG->u.oy.y; d1 = *pt1; deref_head(d1, traced_ulvaly_loc_nonvar_unk); @@ -4552,7 +4552,7 @@ EMIT_SIMPLE_BLOCK_TEST(UNIFY_L_Y_LOC_ULVALY_LOC_UNK); ///#endif BEGP(pt1); - pt1 = YREG+PREG->y_u.oy.y; + pt1 = YREG+PREG->u.oy.y; d1 = *pt1; deref_head(d1, traced_ulvaly_loc_var_unk); @@ -4586,7 +4586,7 @@ EMIT_ENTRY_BLOCK(PREG,UNIFY_L_Y_LOC_WRITE_INSTINIT); BEGD(d0); BEGP(pt0); - pt0 = YREG+PREG->y_u.oy.y; + pt0 = YREG+PREG->u.oy.y; d0 = *pt0; profiled_deref_head_TEST(d0, traced_ulunify_y_loc_unk); traced_ulunify_y_loc_nonvar: @@ -4652,7 +4652,7 @@ Op(traced_unify_n_voids, os); EMIT_ENTRY_BLOCK(PREG,UNIFY_N_VOIDS_INSTINIT); - SREG += PREG->y_u.os.s; + SREG += PREG->u.os.s; PREG = NEXTOP(PREG, os); GONext(); ENDOp(); @@ -4661,7 +4661,7 @@ EMIT_ENTRY_BLOCK(PREG,UNIFY_N_VOIDS_WRITE_INSTINIT); BEGD(d0); CACHE_S(); - d0 = PREG->y_u.os.s; + d0 = PREG->u.os.s; READ_IN_S(); PREG = NEXTOP(PREG, os); for (; d0 > 0; d0--) { @@ -4683,7 +4683,7 @@ Op(traced_unify_l_n_voids_write, os); EMIT_ENTRY_BLOCK(PREG,UNIFY_L_N_VOIDS_WRITE_INSTINIT); BEGD(d0); - d0 = PREG->y_u.os.s; + d0 = PREG->u.os.s; PREG = NEXTOP(PREG, os); CACHE_S(); READ_IN_S(); @@ -4705,7 +4705,7 @@ profiled_deref_head_TEST(d0, traced_uatom_unk); traced_uatom_nonvar: EMIT_MULTIPLE_DESTINY_BLOCK_TEST(UNIFY_ATOM_UATOM_NONVAR); - if (d0 != PREG->y_u.oc.c) { + if (d0 != PREG->u.oc.c) { TRACED_FAIL(); } PREG = NEXTOP(PREG, oc); @@ -4713,7 +4713,7 @@ profiled_derefa_body(d0, pt0, traced_uatom_unk, traced_uatom_nonvar); EMIT_SIMPLE_BLOCK_TEST(UNIFY_ATOM_UATOM_UNK); - d0 = PREG->y_u.oc.c; + d0 = PREG->u.oc.c; PREG = NEXTOP(PREG, oc); Bind_Global(pt0, d0); GONext(); @@ -4723,7 +4723,7 @@ OpW(traced_unify_atom_write, oc); EMIT_ENTRY_BLOCK(PREG,UNIFY_ATOM_WRITE_INSTINIT); - * SREG++ = PREG->y_u.oc.c; + * SREG++ = PREG->u.oc.c; PREG = NEXTOP(PREG, oc); GONextW(); ENDOpW(); @@ -4737,7 +4737,7 @@ profiled_deref_head_TEST(d0, traced_ulatom_unk); traced_ulatom_nonvar: EMIT_MULTIPLE_DESTINY_BLOCK_TEST(UNIFY_L_ATOM_ULATOM_NONVAR); - if (d0 != PREG->y_u.oc.c) { + if (d0 != PREG->u.oc.c) { TRACED_FAIL(); } PREG = NEXTOP(PREG, oc); @@ -4745,7 +4745,7 @@ profiled_derefa_body(d0, pt0, traced_ulatom_unk, traced_ulatom_nonvar); EMIT_SIMPLE_BLOCK_TEST(UNIFY_L_ATOM_ULATOM_UNK); - d0 = PREG->y_u.oc.c; + d0 = PREG->u.oc.c; PREG = NEXTOP(PREG, oc); Bind_Global(pt0, d0); GONext(); @@ -4755,7 +4755,7 @@ Op(traced_unify_l_atom_write, oc); EMIT_ENTRY_BLOCK(PREG,UNIFY_L_ATOM_WRITE_INSTINIT); - SREG[0] = PREG->y_u.oc.c; + SREG[0] = PREG->u.oc.c; PREG = NEXTOP(PREG, oc); GONext(); ENDOp(); @@ -4763,10 +4763,10 @@ Op(traced_unify_n_atoms, osc); EMIT_ENTRY_BLOCK(PREG,UNIFY_N_ATOMS_INSTINIT); { - register Int i = PREG->y_u.osc.s; /* not enough registers */ + register Int i = PREG->u.osc.s; /* not enough registers */ BEGD(d1); - d1 = PREG->y_u.osc.c; + d1 = PREG->u.osc.c; for (; i > 0; i--) { BEGD(d0); BEGP(pt0); @@ -4800,8 +4800,8 @@ EMIT_ENTRY_BLOCK(PREG,UNIFY_N_ATOMS_WRITE_INSTINIT); BEGD(d0); BEGD(d1); - d0 = PREG->y_u.osc.s; - d1 = PREG->y_u.osc.c; + d0 = PREG->u.osc.s; + d1 = PREG->u.osc.c; /* write N atoms */ CACHE_S(); READ_IN_S(); @@ -4845,7 +4845,7 @@ EMIT_SIMPLE_BLOCK_TEST(UNIFY_FLOAT_UFLOAT_NONVAR_D0ISFUNCTOR); ///#endif BEGP(pt1); - pt1 = PREG->y_u.od.d; + pt1 = PREG->u.od.d; PREG = NEXTOP(PREG, od); if ( pt1[1] != pt0[1] @@ -4867,7 +4867,7 @@ EMIT_SIMPLE_BLOCK_TEST(UNIFY_FLOAT_UFLOAT_UNK); ///#endif BEGD(d1); - d1 = AbsAppl(PREG->y_u.od.d); + d1 = AbsAppl(PREG->u.od.d); PREG = NEXTOP(PREG, od); Bind_Global(pt0, d1); GONext(); @@ -4878,7 +4878,7 @@ OpW(traced_unify_float_write, od); EMIT_ENTRY_BLOCK(PREG,UNIFY_FLOAT_WRITE_INSTINIT); - * SREG++ = AbsAppl(PREG->y_u.od.d); + * SREG++ = AbsAppl(PREG->u.od.d); PREG = NEXTOP(PREG, od); GONextW(); ENDOpW(); @@ -4911,7 +4911,7 @@ EMIT_SIMPLE_BLOCK_TEST(UNIFY_L_FLOAT_D0ISFUNC); //#endif BEGP(pt1); - pt1 = PREG->y_u.od.d; + pt1 = PREG->u.od.d; PREG = NEXTOP(PREG, od); if ( pt1[1] != pt0[1] @@ -4933,7 +4933,7 @@ EMIT_SIMPLE_BLOCK_TEST(UNIFY_L_FLOAT_ULFLOAT_UNK); ///#endif BEGD(d1); - d1 = AbsAppl(PREG->y_u.od.d); + d1 = AbsAppl(PREG->u.od.d); PREG = NEXTOP(PREG, od); Bind_Global(S_SREG, d1); GONext(); @@ -4944,7 +4944,7 @@ Op(traced_unify_l_float_write, od); EMIT_ENTRY_BLOCK(PREG,UNIFY_L_FLOAT_WRITE_INSTINIT); - SREG[0] = AbsAppl(PREG->y_u.od.d); + SREG[0] = AbsAppl(PREG->u.od.d); PREG = NEXTOP(PREG, od); GONext(); ENDOp(); @@ -4978,7 +4978,7 @@ ///#endif ENDD(d0); BEGP(pt1); - pt1 = PREG->y_u.oi.i; + pt1 = PREG->u.oi.i; PREG = NEXTOP(PREG, oi); if (pt1[1] != pt0[1]) { TRACED_FAIL(); @@ -4995,7 +4995,7 @@ EMIT_SIMPLE_BLOCK_TEST(UNIFY_LONGINT_ULONGINT_UNK); ///#endif BEGD(d1); - d1 = AbsAppl(PREG->y_u.oi.i); + d1 = AbsAppl(PREG->u.oi.i); PREG = NEXTOP(PREG, oi); Bind_Global(pt0, d1); GONext(); @@ -5006,7 +5006,7 @@ OpW(traced_unify_longint_write, oi); EMIT_ENTRY_BLOCK(PREG,UNIFY_LONGINT_WRITE_INSTINIT); - * SREG++ = AbsAppl(PREG->y_u.oi.i); + * SREG++ = AbsAppl(PREG->u.oi.i); PREG = NEXTOP(PREG, oi); GONextW(); ENDOpW(); @@ -5039,7 +5039,7 @@ EMIT_SIMPLE_BLOCK_TEST(UNIFY_L_LONGINT_D0ISFUNC); ///#endif BEGP(pt1); - pt1 = PREG->y_u.oi.i; + pt1 = PREG->u.oi.i; PREG = NEXTOP(PREG, oi); if (pt1[1] != pt0[1]) { TRACED_FAIL(); @@ -5056,7 +5056,7 @@ EMIT_SIMPLE_BLOCK_TEST(UNIFY_L_LONGINT_ULLONGINT_UNK); ///#endif BEGD(d1); - d1 = AbsAppl(PREG->y_u.oi.i); + d1 = AbsAppl(PREG->u.oi.i); PREG = NEXTOP(PREG, oi); Bind_Global(S_SREG, d1); GONext(); @@ -5067,7 +5067,7 @@ Op(traced_unify_l_longint_write, oi); EMIT_ENTRY_BLOCK(PREG,UNIFY_L_LONGINT_WRITE_INSTINIT); - SREG[0] = AbsAppl(PREG->y_u.oi.i); + SREG[0] = AbsAppl(PREG->u.oi.i); PREG = NEXTOP(PREG, oi); GONext(); ENDOp(); @@ -5099,7 +5099,7 @@ TRACED_FAIL(); } ENDD(d1); - if (Yap_gmp_tcmp_big_big(d0,PREG->y_u.oN.b)) { + if (Yap_gmp_tcmp_big_big(d0,PREG->u.oN.b)) { TRACED_FAIL(); } ///#ifdef PROFILED_ABSMI @@ -5114,7 +5114,7 @@ EMIT_SIMPLE_BLOCK_TEST(UNIFY_BIGINT_UBIGINT_UNK); ///#endif BEGD(d1); - d1 = PREG->y_u.oN.b; + d1 = PREG->u.oN.b; PREG = NEXTOP(PREG, oN); Bind_Global(pt0, d1); GONext(); @@ -5152,7 +5152,7 @@ TRACED_FAIL(); } ENDD(d0); - if (Yap_gmp_tcmp_big_big(d0,PREG->y_u.oN.b)) { + if (Yap_gmp_tcmp_big_big(d0,PREG->u.oN.b)) { TRACED_FAIL(); } ///#ifdef PROFILED_ABSMI @@ -5167,7 +5167,7 @@ EMIT_SIMPLE_BLOCK_TEST(UNIFY_L_BIGINT_ULBIGINT_UNK); ///#endif BEGD(d1); - d1 = PREG->y_u.oN.b; + d1 = PREG->u.oN.b; PREG = NEXTOP(PREG, oN); Bind_Global(S_SREG, d1); GONext(); @@ -5194,7 +5194,7 @@ ///#endif BEGD(d1); /* we have met a preexisting dbterm */ - d1 = PREG->y_u.oD.D; + d1 = PREG->u.oD.D; PREG = NEXTOP(PREG, oD); traced_UnifyBound(d0,d1); ENDD(d1); @@ -5204,7 +5204,7 @@ EMIT_SIMPLE_BLOCK_TEST(UNIFY_DBTERM_UDBTERM_UNK); ///#endif BEGD(d1); - d1 = PREG->y_u.oD.D; + d1 = PREG->u.oD.D; PREG = NEXTOP(PREG, oD); Bind_Global(pt0, d1); GONext(); @@ -5228,7 +5228,7 @@ ///#endif BEGD(d1); /* we have met a preexisting dbterm */ - d1 = PREG->y_u.oD.D; + d1 = PREG->u.oD.D; PREG = NEXTOP(PREG, oD); traced_UnifyBound(d0,d1); ENDD(d1); @@ -5238,7 +5238,7 @@ EMIT_SIMPLE_BLOCK_TEST(UNIFY_L_DBTERM_ULDBTERM_UNK); ///#endif BEGD(d1); - d1 = PREG->y_u.oD.D; + d1 = PREG->u.oD.D; PREG = NEXTOP(PREG, oD); Bind_Global(S_SREG, d1); GONext(); @@ -5385,7 +5385,7 @@ /* we continue in read mode */ S_SREG = RepAppl(d0); /* just check functor */ - d0 = (CELL) (PREG->y_u.ofa.f); + d0 = (CELL) (PREG->u.ofa.f); if (*S_SREG != d0) { TRACED_FAIL(); } @@ -5409,9 +5409,9 @@ pt0 = HR; ENDD(d1); /* first, put the functor */ - d0 = (CELL) (PREG->y_u.ofa.f); + d0 = (CELL) (PREG->u.ofa.f); *pt0++ = d0; - HR = pt0 + PREG->y_u.ofa.a; + HR = pt0 + PREG->u.ofa.a; PREG = NEXTOP(PREG, ofa); /* set SREG */ SREG = pt0; @@ -5435,9 +5435,9 @@ d0 = AbsAppl(HR); S_SREG[0] = d0; S_SREG = HR; - d0 = (CELL) (PREG->y_u.ofa.f); + d0 = (CELL) (PREG->u.ofa.f); *S_SREG++ = d0; - HR = S_SREG + PREG->y_u.ofa.a; + HR = S_SREG + PREG->u.ofa.a; PREG = NEXTOP(PREG, ofa); WRITEBACK_S(S_SREG); ENDCACHE_S(); @@ -5462,7 +5462,7 @@ /* we continue in read mode */ SREG = RepAppl(d0); /* just check functor */ - d0 = (CELL) (PREG->y_u.ofa.f); + d0 = (CELL) (PREG->u.ofa.f); if (*SREG++ != d0) { TRACED_FAIL(); } @@ -5484,9 +5484,9 @@ pt0 = HR; ENDD(d1); /* first, put the functor */ - d0 = (CELL) (PREG->y_u.ofa.f); + d0 = (CELL) (PREG->u.ofa.f); *pt0++ = d0; - HR = pt0 + PREG->y_u.ofa.a; + HR = pt0 + PREG->u.ofa.a; PREG = NEXTOP(PREG, ofa); /* set SREG */ SREG = pt0; @@ -5506,9 +5506,9 @@ READ_IN_S(); S_SREG[0] = d0; S_SREG = HR; - d0 = (CELL) (PREG->y_u.ofa.f); + d0 = (CELL) (PREG->u.ofa.f); *S_SREG++ = d0; - HR = S_SREG + PREG->y_u.ofa.a; + HR = S_SREG + PREG->u.ofa.a; PREG = NEXTOP(PREG, ofa); WRITEBACK_S(S_SREG); ENDCACHE_S(); @@ -5525,9 +5525,9 @@ EMIT_ENTRY_BLOCK(PREG,PUT_X_VAR_INSTINIT); BEGP(pt0); pt0 = HR; - XREG(PREG->y_u.xx.xl) = Unsigned(pt0); + XREG(PREG->u.xx.xl) = Unsigned(pt0); HR = pt0 + 1; - XREG(PREG->y_u.xx.xr) = Unsigned(pt0); + XREG(PREG->u.xx.xr) = Unsigned(pt0); PREG = NEXTOP(PREG, xx); RESET_VARIABLE(pt0); ENDP(pt0); @@ -5537,8 +5537,8 @@ Op(traced_put_y_var, yx); EMIT_ENTRY_BLOCK(PREG,PUT_Y_VAR_INSTINIT); BEGP(pt0); - pt0 = YREG + PREG->y_u.yx.y; - XREG(PREG->y_u.yx.x) = (CELL) pt0; + pt0 = YREG + PREG->u.yx.y; + XREG(PREG->u.yx.x) = (CELL) pt0; PREG = NEXTOP(PREG, yx); #if defined(YAPOR_SBA) && defined(FROZEN_STACKS) /* We must initialise a shared variable to point to the SBA */ @@ -5555,8 +5555,8 @@ Op(traced_put_x_val, xx); EMIT_ENTRY_BLOCK(PREG,PUT_X_VAL_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.xx.xl); - XREG(PREG->y_u.xx.xr) = d0; + d0 = XREG(PREG->u.xx.xl); + XREG(PREG->u.xx.xr) = d0; ENDD(d0); PREG = NEXTOP(PREG, xx); GONext(); @@ -5566,10 +5566,10 @@ EMIT_ENTRY_BLOCK(PREG,PUT_XX_VAL_INSTINIT); BEGD(d0); BEGD(d1); - d0 = XREG(PREG->y_u.xxxx.xl1); - d1 = XREG(PREG->y_u.xxxx.xl2); - XREG(PREG->y_u.xxxx.xr1) = d0; - XREG(PREG->y_u.xxxx.xr2) = d1; + d0 = XREG(PREG->u.xxxx.xl1); + d1 = XREG(PREG->u.xxxx.xl2); + XREG(PREG->u.xxxx.xr1) = d0; + XREG(PREG->u.xxxx.xr2) = d1; ENDD(d1); ENDD(d0); PREG = NEXTOP(PREG, xxxx); @@ -5579,13 +5579,13 @@ Op(traced_put_y_val, yx); EMIT_ENTRY_BLOCK(PREG,PUT_Y_VAL_INSTINIT); BEGD(d0); - d0 = YREG[PREG->y_u.yx.y]; + d0 = YREG[PREG->u.yx.y]; #ifdef YAPOR_SBA if (d0 == 0) { /* new variable */ - XREG(PREG->y_u.yx.x) = (CELL)(YREG+PREG->y_u.yx.y); + XREG(PREG->u.yx.x) = (CELL)(YREG+PREG->u.yx.y); } else #endif - XREG(PREG->y_u.yx.x) = d0; + XREG(PREG->u.yx.x) = d0; ENDD(d0); PREG = NEXTOP(PREG, yx); GONext(); @@ -5595,24 +5595,24 @@ EMIT_ENTRY_BLOCK(PREG,PUT_Y_VALS_INSTINIT); ALWAYS_START_PREFETCH(yyxx); BEGD(d0); - d0 = YREG[PREG->y_u.yyxx.y1]; + d0 = YREG[PREG->u.yyxx.y1]; #ifdef YAPOR_SBA if (d0 == 0) /* new variable */ - XREG(PREG->y_u.yyxx.x1) = (CELL)(YREG+PREG->y_u.yyxx.y1); + XREG(PREG->u.yyxx.x1) = (CELL)(YREG+PREG->u.yyxx.y1); else #endif - XREG(PREG->y_u.yyxx.x1) = d0; + XREG(PREG->u.yyxx.x1) = d0; ENDD(d0); /* allow for some prefetching */ PREG = NEXTOP(PREG, yyxx); BEGD(d1); - d1 = YREG[PREVOP(PREG,yyxx)->y_u.yyxx.y2]; + d1 = YREG[PREVOP(PREG,yyxx)->u.yyxx.y2]; #ifdef YAPOR_SBA if (d1 == 0) /* new variable */ - XREG(PREVOP(traced_PREG->y_u.yyxx,yyxx).x2) = (CELL)(YREG+PREG->y_u.yyxx.y2); + XREG(PREVOP(traced_PREG->u.yyxx,yyxx).x2) = (CELL)(YREG+PREG->u.yyxx.y2); else #endif - XREG(PREVOP(PREG,yyxx)->y_u.yyxx.x2) = d1; + XREG(PREVOP(PREG,yyxx)->u.yyxx.x2) = d1; ENDD(d1); ALWAYS_GONext(); ALWAYS_END_PREFETCH(); @@ -5622,12 +5622,12 @@ EMIT_ENTRY_BLOCK(PREG,PUT_UNSAFE_INSTINIT); BEGD(d0); BEGP(pt0); - pt0 = YREG+PREG->y_u.yx.y; + pt0 = YREG+PREG->u.yx.y; d0 = *pt0; profiled_deref_head_TEST(d0, traced_punsafe_unk); traced_punsafe_nonvar: EMIT_SIMPLE_BLOCK_TEST(PUT_UNSAFE_PUNSAFE_NONVAR); - XREG(PREG->y_u.yx.x) = d0; + XREG(PREG->u.yx.x) = d0; PREG = NEXTOP(PREG, yx); GONext(); @@ -5636,16 +5636,16 @@ /* d0 is a variable, check whether we need to globalise it */ if (pt0 <= HR || pt0 >= YREG) { /* variable is safe */ - XREG(PREG->y_u.yx.x) = Unsigned(pt0); + XREG(PREG->u.yx.x) = Unsigned(pt0); PREG = NEXTOP(PREG, yx); GONext(); } else { /* create a new Heap variable and bind our variable to it */ Bind_Local(pt0, Unsigned(HR)); - XREG(PREG->y_u.yx.x) = (CELL) HR; + XREG(PREG->u.yx.x) = (CELL) HR; RESET_VARIABLE(HR); - HR++; + H++; PREG = NEXTOP(PREG, yx); GONext(); } @@ -5656,8 +5656,8 @@ Op(traced_put_atom, xc); EMIT_ENTRY_BLOCK(PREG,PUT_ATOM_INSTINIT); BEGD(d0); - d0 = PREG->y_u.xc.c; - XREG(PREG->y_u.xc.x) = d0; + d0 = PREG->u.xc.c; + XREG(PREG->u.xc.x) = d0; PREG = NEXTOP(PREG, xc); GONext(); ENDD(d0); @@ -5666,8 +5666,8 @@ Op(traced_put_dbterm, xD); EMIT_ENTRY_BLOCK(PREG,PUT_DBTERM_INSTINIT); BEGD(d0); - d0 = PREG->y_u.xD.D; - XREG(PREG->y_u.xD.x) = d0; + d0 = PREG->u.xD.D; + XREG(PREG->u.xD.x) = d0; PREG = NEXTOP(PREG, xD); GONext(); ENDD(d0); @@ -5676,8 +5676,8 @@ Op(traced_put_bigint, xN); EMIT_ENTRY_BLOCK(PREG,PUT_BIGINT_INSTINIT); BEGD(d0); - d0 = PREG->y_u.xN.b; - XREG(PREG->y_u.xN.x) = d0; + d0 = PREG->u.xN.b; + XREG(PREG->u.xN.x) = d0; PREG = NEXTOP(PREG, xN); GONext(); ENDD(d0); @@ -5686,8 +5686,8 @@ Op(traced_put_float, xd); EMIT_ENTRY_BLOCK(PREG,PUT_FLOAT_INSTINIT); BEGD(d0); - d0 = AbsAppl(PREG->y_u.xd.d); - XREG(PREG->y_u.xd.x) = d0; + d0 = AbsAppl(PREG->u.xd.d); + XREG(PREG->u.xd.x) = d0; PREG = NEXTOP(PREG, xd); GONext(); ENDD(d0); @@ -5696,8 +5696,8 @@ Op(traced_put_longint, xi); EMIT_ENTRY_BLOCK(PREG,PUT_LONGINT_INSTINIT); BEGD(d0); - d0 = AbsAppl(PREG->y_u.xi.i); - XREG(PREG->y_u.xi.x) = d0; + d0 = AbsAppl(PREG->u.xi.i); + XREG(PREG->u.xi.x) = d0; PREG = NEXTOP(PREG, xi); GONext(); ENDD(d0); @@ -5711,7 +5711,7 @@ HR += 2; BEGD(d0); d0 = AbsPair(S_SREG); - XREG(PREG->y_u.x.x) = d0; + XREG(PREG->u.x.x) = d0; PREG = NEXTOP(PREG, x); ENDD(d0); WRITEBACK_S(S_SREG); @@ -5723,11 +5723,11 @@ EMIT_ENTRY_BLOCK(PREG,PUT_STRUCT_INSTINIT); BEGD(d0); d0 = AbsAppl(HR); - XREG(PREG->y_u.xfa.x) = d0; - d0 = (CELL) (PREG->y_u.xfa.f); - *HR++ = d0; + XREG(PREG->u.xfa.x) = d0; + d0 = (CELL) (PREG->u.xfa.f); + *H++ = d0; SREG = HR; - HR += PREG->y_u.xfa.a; + HR += PREG->u.xfa.a; ENDD(d0); PREG = NEXTOP(PREG, xfa); GONext(); @@ -5739,7 +5739,7 @@ Op(traced_write_x_var, x); EMIT_ENTRY_BLOCK(PREG,WRITE_X_VAR_INSTINIT); - XREG(PREG->y_u.x.x) = Unsigned(SREG); + XREG(PREG->u.x.x) = Unsigned(SREG); PREG = NEXTOP(PREG, x); RESET_VARIABLE(SREG); SREG++; @@ -5757,7 +5757,7 @@ Op(traced_write_n_voids, s); EMIT_ENTRY_BLOCK(PREG,WRITE_N_VOIDS_INSTINIT); BEGD(d0); - d0 = PREG->y_u.s.s; + d0 = PREG->u.s.s; PREG = NEXTOP(PREG, s); for (; d0 > 0; d0--) { RESET_VARIABLE(SREG); @@ -5769,7 +5769,7 @@ Op(traced_write_y_var, y); EMIT_ENTRY_BLOCK(PREG,WRITE_Y_VAR_INSTINIT); - INITIALIZE_PERMVAR(YREG+PREG->y_u.y.y,Unsigned(SREG)); + INITIALIZE_PERMVAR(YREG+PREG->u.y.y,Unsigned(SREG)); PREG = NEXTOP(PREG, y); RESET_VARIABLE(SREG); SREG++; @@ -5779,7 +5779,7 @@ Op(traced_write_x_val, x); EMIT_ENTRY_BLOCK(PREG,WRITE_X_VAL_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.x.x); + d0 = XREG(PREG->u.x.x); *SREG++ = d0; ENDD(d0); PREG = NEXTOP(PREG, x); @@ -5789,7 +5789,7 @@ Op(traced_write_x_loc, x); EMIT_ENTRY_BLOCK(PREG,WRITE_X_LOC_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.x.x); + d0 = XREG(PREG->u.x.x); PREG = NEXTOP(PREG, x); profiled_deref_head_TEST(d0, traced_w_x_unk); traced_w_x_bound: @@ -5827,10 +5827,10 @@ Op(traced_write_y_val, y); EMIT_ENTRY_BLOCK(PREG,WRITE_Y_VAL_INSTINIT); BEGD(d0); - d0 = YREG[PREG->y_u.y.y]; + d0 = YREG[PREG->u.y.y]; #ifdef YAPOR_SBA if (d0 == 0) /* new variable */ - *SREG++ = (CELL)(YREG+PREG->y_u.y.y); + *SREG++ = (CELL)(YREG+PREG->u.y.y); else #endif *SREG++ = d0; @@ -5843,7 +5843,7 @@ EMIT_ENTRY_BLOCK(PREG,WRITE_Y_LOC_INSTINIT); BEGD(d0); BEGP(pt0); - pt0 = YREG+PREG->y_u.y.y; + pt0 = YREG+PREG->u.y.y; d0 = *pt0; profiled_deref_head_TEST(d0, traced_w_y_unk); traced_w_y_bound: @@ -5882,7 +5882,7 @@ Op(traced_write_atom, c); EMIT_ENTRY_BLOCK(PREG,WRITE_ATOM_INSTINIT); BEGD(d0); - d0 = PREG->y_u.c.c; + d0 = PREG->u.c.c; *SREG++ = d0; ENDD(d0); PREG = NEXTOP(PREG, c); @@ -5892,7 +5892,7 @@ Op(traced_write_bigint, N); EMIT_ENTRY_BLOCK(PREG,WRITE_BIGINT_INSTINIT); BEGD(d0); - d0 = PREG->y_u.N.b; + d0 = PREG->u.N.b; *SREG++ = d0; ENDD(d0); PREG = NEXTOP(PREG, N); @@ -5902,7 +5902,7 @@ Op(traced_write_dbterm, D); EMIT_ENTRY_BLOCK(PREG,WRITE_DBTERM_INSTINIT); BEGD(d0); - d0 = PREG->y_u.D.D; + d0 = PREG->u.D.D; *SREG++ = d0; ENDD(d0); PREG = NEXTOP(PREG, D); @@ -5912,7 +5912,7 @@ Op(traced_write_float, d); EMIT_ENTRY_BLOCK(PREG,WRITE_FLOAT_INSTINIT); BEGD(d0); - d0 = AbsAppl(PREG->y_u.d.d); + d0 = AbsAppl(PREG->u.d.d); *SREG++ = d0; ENDD(d0); PREG = NEXTOP(PREG, d); @@ -5922,7 +5922,7 @@ Op(traced_write_longint, i); EMIT_ENTRY_BLOCK(PREG,WRITE_LONGIT_INSTINIT); BEGD(d0); - d0 = AbsAppl(PREG->y_u.i.i); + d0 = AbsAppl(PREG->u.i.i); *SREG++ = d0; ENDD(d0); PREG = NEXTOP(PREG, i); @@ -5933,8 +5933,8 @@ EMIT_ENTRY_BLOCK(PREG,WRITE_N_ATOMS_INSTINIT); BEGD(d0); BEGD(d1); - d0 = PREG->y_u.sc.s; - d1 = PREG->y_u.sc.c; + d0 = PREG->u.sc.s; + d1 = PREG->u.sc.c; for (; d0 > 0; d0--) { *SREG++ = d1; } @@ -5985,11 +5985,11 @@ SP[-1] = Unsigned(SREG); SP[-2] = 1; /* Put instructions follow the main stream */ SP -= 2; - d0 = (CELL) (PREG->y_u.fa.f); - *HR++ = d0; + d0 = (CELL) (PREG->u.fa.f); + *H++ = d0; ENDD(d0); BEGD(d0); - d0 = PREG->y_u.fa.a; + d0 = PREG->u.fa.a; PREG = NEXTOP(PREG, fa); SREG = HR; HR += d0; @@ -6002,12 +6002,12 @@ BEGD(d0); d0 = AbsAppl(HR); *SREG = d0; - d0 = (CELL) (PREG->y_u.fa.f); - *HR++ = d0; + d0 = (CELL) (PREG->u.fa.f); + *H++ = d0; SREG = HR; ENDD(d0); BEGD(d0); - d0 = PREG->y_u.fa.a; + d0 = PREG->u.fa.a; PREG = NEXTOP(PREG, fa); HR += d0; ENDD(d0); @@ -6024,56 +6024,56 @@ Op(traced_save_pair_x, ox); EMIT_ENTRY_BLOCK(PREG,SAVE_PAIR_X_INSTINIT); - XREG(PREG->y_u.ox.x) = AbsPair(SREG); + XREG(PREG->u.ox.x) = AbsPair(SREG); PREG = NEXTOP(PREG, ox); GONext(); ENDOp(); OpW(traced_save_pair_x_write, ox); EMIT_ENTRY_BLOCK(PREG,SAVE_PAIR_X_WRITE_INSTINIT); - XREG(PREG->y_u.ox.x) = AbsPair(SREG); + XREG(PREG->u.ox.x) = AbsPair(SREG); PREG = NEXTOP(PREG, ox); GONextW(); ENDOpW(); Op(traced_save_pair_y, oy); EMIT_ENTRY_BLOCK(PREG,SAVE_PAIR_Y_INSTINIT); - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,AbsPair(SREG)); + INITIALIZE_PERMVAR(YREG+PREG->u.oy.y,AbsPair(SREG)); PREG = NEXTOP(PREG, oy); GONext(); ENDOp(); OpW(traced_save_pair_y_write, oy); EMIT_ENTRY_BLOCK(PREG,SAVE_PAIR_Y_WRITE_INSTINIT); - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,AbsPair(SREG)); + INITIALIZE_PERMVAR(YREG+PREG->u.oy.y,AbsPair(SREG)); PREG = NEXTOP(PREG, oy); GONextW(); ENDOpW(); Op(traced_save_appl_x, ox); EMIT_ENTRY_BLOCK(PREG,SAVE_APPL_X_INSTINIT); - XREG(PREG->y_u.ox.x) = AbsAppl(SREG - 1); + XREG(PREG->u.ox.x) = AbsAppl(SREG - 1); PREG = NEXTOP(PREG, ox); GONext(); ENDOp(); OpW(traced_save_appl_x_write, ox); EMIT_ENTRY_BLOCK(PREG,SAVE_APPL_X_WRITE_INSTINIT); - XREG(PREG->y_u.ox.x) = AbsAppl(SREG - 1); + XREG(PREG->u.ox.x) = AbsAppl(SREG - 1); PREG = NEXTOP(PREG, ox); GONextW(); ENDOpW(); Op(traced_save_appl_y, oy); EMIT_ENTRY_BLOCK(PREG,SAVE_APPL_Y_INSTINIT); - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,AbsAppl(SREG-1)); + INITIALIZE_PERMVAR(YREG+PREG->u.oy.y,AbsAppl(SREG-1)); PREG = NEXTOP(PREG, oy); GONext(); ENDOp(); OpW(traced_save_appl_y_write, oy); EMIT_ENTRY_BLOCK(PREG,SAVE_APPL_Y_WRITE_INSTINIT); - INITIALIZE_PERMVAR(YREG+PREG->y_u.oy.y,AbsAppl(SREG-1)); + INITIALIZE_PERMVAR(YREG+PREG->u.oy.y,AbsAppl(SREG-1)); PREG = NEXTOP(PREG, oy); GONextW(); ENDOpW(); @@ -6085,7 +6085,7 @@ BOp(traced_jump, l); EMIT_ENTRY_BLOCK(PREG,JUMP_INSTINIT); - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; JMPNext(); ENDBOp(); @@ -6124,7 +6124,7 @@ EMIT_SIMPLE_BLOCK_TEST(EITHER_POST_COROUTINING); BEGD(d0); /* Try to preserve the environment */ - d0 = PREG->y_u.Osblp.s; + d0 = PREG->u.Osblp.s; BEGCHO(pt1); pt1 = (choiceptr) ((char *) YREG + (yslot) d0); EMIT_SIMPLE_BLOCK_TEST(EITHER_FROZEN_YSBA); @@ -6144,7 +6144,7 @@ EMIT_SIMPLE_BLOCK_TEST(EITHER_POST_FROZEN_YSBA); pt1 = (choiceptr)(((CELL *) pt1)-1); *(CELL **) pt1 = YREG; - store_yaam_regs_for_either(PREG->y_u.Osblp.l, PREG); + store_yaam_regs_for_either(PREG->u.Osblp.l, PREG); SREG = (CELL *) (B = pt1); #ifdef YAPOR EMIT_SIMPLE_BLOCK_TEST(EITHER_YAPOR); @@ -6163,7 +6163,7 @@ ///#ifdef PROFILED_ABSMI EMIT_ENTRY_BLOCK(PREG,OR_ELSE_INSTINIT); ///#endif - HR = HBREG = PROTECT_FROZEN_H(B); + HR = HRBREG = PROTECT_FROZEN_H(B); ENV = B->cp_env; B->cp_cp = PREG; #ifdef DEPTH_LIMIT @@ -6181,13 +6181,13 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(OR_ELSE_YAPOR); ///#endif - SCH_new_alternative(PREG, PREG->y_u.Osblp.l); + SCH_new_alternative(PREG, PREG->u.Osblp.l); } else #endif /* YAPOR */ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(OR_ELSE_END); ///#endif - B->cp_ap = PREG->y_u.Osblp.l; + B->cp_ap = PREG->u.Osblp.l; PREG = NEXTOP(PREG, Osblp); YREG = (CELL *) B->cp_a1; GONext(); @@ -6204,7 +6204,7 @@ #ifdef YAPOR if (SCH_top_shared_cp(B)) { EMIT_SIMPLE_BLOCK_TEST(OR_LAST_IFOK_INIT); - HR = HBREG = PROTECT_FROZEN_H(pt0); + H = HRBREG = PROTECT_FROZEN_H(pt0); YREG = (CELL *) pt0->cp_a1; ENV = pt0->cp_env; #ifdef DEPTH_LIMIT @@ -6219,7 +6219,7 @@ { EMIT_SIMPLE_BLOCK_TEST(OR_LAST_NOIF_INIT); B = pt0->cp_b; - HR = PROTECT_FROZEN_H(pt0); + H = PROTECT_FROZEN_H(pt0); YREG = (CELL *) pt0->cp_a1; ENV = pt0->cp_env; #ifdef DEPTH_LIMIT @@ -6251,7 +6251,7 @@ EMIT_ENTRY_BLOCK(PREG,POP_N_INSTINIT); EMIT_MULTIPLE_DESTINY_BLOCK_TEST(POP_N_END); BEGD(d0); - d0 = PREG->y_u.os.s; + d0 = PREG->u.os.s; SP = (CELL *) (((char *) SP) + d0); ENDD(d0); BEGD(d0); @@ -6306,7 +6306,7 @@ EMIT_SIMPLE_BLOCK_TEST(YAAM_CHECK_TRAIL_TR); check_trail(TR); EMIT_SIMPLE_BLOCK_TEST(CALL_CPRED_TEST_STACK); - if (!(PREG->y_u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { + if (!(PREG->u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { CACHE_Y_AS_ENV(YREG); EMIT_SIMPLE_BLOCK_TEST(NoStackCall_Exception); check_stack(NoStackCall, HR); @@ -6326,22 +6326,22 @@ ASP = (CELL *)top_b; #endif /* YAPOR_SBA */ else - ASP = (CELL *)(((char *)YREG) + PREG->y_u.Osbpp.s); + ASP = (CELL *)(((char *)YREG) + PREG->u.Osbpp.s); } #else EMIT_SIMPLE_BLOCK_TEST(CALL_CPRED_NOFROZEN); - SET_ASP(YREG, PREG->y_u.Osbpp.s); + SET_ASP(YREG, PREG->u.Osbpp.s); /* for slots to work */ #endif /* FROZEN_STACKS */ #ifdef LOW_LEVEL_TRACER if (Yap_do_low_level_trace) { EMIT_SIMPLE_BLOCK_TEST(CALL_CPRED_LOW_LEVEL_TRACER); - low_level_trace(enter_pred,PREG->y_u.Osbpp.p,XREGS+1); + low_level_trace(enter_pred,PREG->u.Osbpp.p,XREGS+1); } #endif /* LOW_LEVEL_TRACE */ EMIT_SIMPLE_BLOCK_TEST(CALL_CPRED_POST_LOW_LEVEL_TRACER); BEGD(d0); - CPredicate f = PREG->y_u.Osbpp.p->cs.f_code; + CPredicate f = PREG->u.Osbpp.p->cs.f_code; PREG = NEXTOP(PREG, Osbpp); saveregs(); d0 = (f)(PASS_REGS1); @@ -6395,7 +6395,7 @@ /* for slots to work */ #endif /* FROZEN_STACKS */ EMIT_SIMPLE_BLOCK_TEST(EXECUTE_CPRED_POST_FROZEN); - pt0 = PREG->y_u.pp.p; + pt0 = PREG->u.pp.p; #ifdef LOW_LEVEL_TRACER if (Yap_do_low_level_trace) { EMIT_SIMPLE_BLOCK_TEST(EXECUTE_CPRED_LOW_LEVEL_TRACER); @@ -6442,7 +6442,7 @@ /* now call C-Code */ EMIT_MULTIPLE_DESTINY_BLOCK_TEST(EXECUTE_CPRED_END); { - CPredicate f = PREG->y_u.pp.p->cs.f_code; + CPredicate f = PREG->u.pp.p->cs.f_code; yamop *oldPREG = PREG; saveregs(); d0 = (f)(PASS_REGS1); @@ -6486,7 +6486,7 @@ #ifdef LOW_LEVEL_TRACER if (Yap_do_low_level_trace) { EMIT_SIMPLE_BLOCK_TEST(CALL_USERCPRED_LOW_LEVEL_TRACER); - low_level_trace(enter_pred,PREG->y_u.Osbpp.p,XREGS+1); + low_level_trace(enter_pred,PREG->u.Osbpp.p,XREGS+1); } #endif /* LOW_LEVEL_TRACE */ EMIT_SIMPLE_BLOCK_TEST(CALL_USERCPRED_FROZEN); @@ -6501,10 +6501,10 @@ ASP = (CELL *) top_b; #endif /* YAPOR_SBA */ else - ASP = (CELL *)(((char *)YREG) + PREG->y_u.Osbpp.s); + ASP = (CELL *)(((char *)YREG) + PREG->u.Osbpp.s); } #else - SET_ASP(YREG, PREG->y_u.Osbpp.s); + SET_ASP(YREG, PREG->u.Osbpp.s); /* for slots to work */ #endif /* FROZEN_STACKS */ { @@ -6515,7 +6515,7 @@ Yap_StartSlots( PASS_REGS1 ); LOCAL_PrologMode = UserCCallMode; { - PredEntry *p = PREG->y_u.Osbpp.p; + PredEntry *p = PREG->u.Osbpp.p; PREG = NEXTOP(PREG, Osbpp); savedP = PREG; @@ -6549,7 +6549,7 @@ //printf("call_c_wfail!!\n\n"); #ifdef LOW_LEVEL_TRACER if (Yap_do_low_level_trace) { - low_level_trace(enter_pred,PREG->y_u.slp.p,XREGS+1); + low_level_trace(enter_pred,PREG->u.slp.p,XREGS+1); } #endif /* LOW_LEVEL_TRACE */ #ifdef FROZEN_STACKS @@ -6562,7 +6562,7 @@ #endif /* YAPOR_SBA */ else { BEGD(d0); - d0 = PREG->y_u.slp.s; + d0 = PREG->u.slp.s; ASP = ((CELL *)YREG) + d0; ENDD(d0); } @@ -6572,13 +6572,13 @@ ASP = (CELL *) B; else { BEGD(d0); - d0 = PREG->y_u.slp.s; + d0 = PREG->u.slp.s; ASP = ((CELL *) YREG) + d0; ENDD(d0); } #endif /* FROZEN_STACKS */ { - CPredicate f = PREG->y_u.slp.p->cs.f_code; + CPredicate f = PREG->u.slp.p->cs.f_code; saveregs(); SREG = (CELL *)((f)(PASS_REGS1)); setregs(); @@ -6586,7 +6586,7 @@ if (!SREG) { /* be careful about error handling */ if (PREG != FAILCODE) - PREG = PREG->y_u.slp.l; + PREG = PREG->u.slp.l; } else { PREG = NEXTOP(PREG, slp); } @@ -6604,8 +6604,8 @@ /* Alocate space for the cut_c structure*/ CUT_C_PUSH(NEXTOP(NEXTOP(PREG,OtapFs),OtapFs),S_YREG); #endif - S_YREG = S_YREG - PREG->y_u.OtapFs.extra; - store_args(PREG->y_u.OtapFs.s); + S_YREG = S_YREG - PREG->u.OtapFs.extra; + store_args(PREG->u.OtapFs.s); store_yaam_regs(NEXTOP(PREG, OtapFs), 0); B = B_YREG; #ifdef YAPOR @@ -6617,7 +6617,7 @@ traced_TRYCC: ASP = (CELL *)B; { - CPredicate f = (CPredicate)(PREG->y_u.OtapFs.f); + CPredicate f = (CPredicate)(PREG->u.OtapFs.f); saveregs(); SREG = (CELL *) ((f) (PASS_REGS1)); /* This last instruction changes B B*/ @@ -6663,8 +6663,8 @@ #ifdef DEPTH_LIMIT DEPTH =B->cp_depth; #endif - HBREG = HR; - restore_args(PREG->y_u.OtapFs.s); + HRBREG = HR; + restore_args(PREG->u.OtapFs.s); ENDCACHE_Y(); goto traced_TRYCC; ENDBOp(); @@ -6691,8 +6691,8 @@ /* Alocate space for the cut_c structure*/ CUT_C_PUSH(NEXTOP(NEXTOP(PREG,OtapFs),OtapFs),S_YREG); #endif - S_YREG = S_YREG - PREG->y_u.OtapFs.extra; - store_args(PREG->y_u.OtapFs.s); + S_YREG = S_YREG - PREG->u.OtapFs.extra; + store_args(PREG->u.OtapFs.s); store_yaam_regs(NEXTOP(PREG, OtapFs), 0); B = B_YREG; #ifdef YAPOR @@ -6706,7 +6706,7 @@ Yap_StartSlots( PASS_REGS1 ); saveregs(); save_machine_regs(); - SREG = (CELL *) YAP_ExecuteFirst(PREG->y_u.OtapFs.p, (CPredicate)(PREG->y_u.OtapFs.f)); + SREG = (CELL *) YAP_ExecuteFirst(PREG->u.OtapFs.p, (CPredicate)(PREG->u.OtapFs.f)); EX = 0L; restore_machine_regs(); setregs(); @@ -6740,8 +6740,8 @@ #ifdef DEPTH_LIMIT DEPTH =B->cp_depth; #endif - HBREG = HR; - restore_args(PREG->y_u.OtapFs.s); + HRBREG = HR; + restore_args(PREG->u.OtapFs.s); ENDCACHE_Y(); LOCAL_PrologMode = UserCCallMode; @@ -6750,7 +6750,7 @@ Yap_StartSlots( PASS_REGS1 ); saveregs(); save_machine_regs(); - SREG = (CELL *) YAP_ExecuteNext(PREG->y_u.OtapFs.p, (CPredicate)(PREG->y_u.OtapFs.f)); + SREG = (CELL *) YAP_ExecuteNext(PREG->u.OtapFs.p, (CPredicate)(PREG->u.OtapFs.f)); EX = 0L; restore_machine_regs(); setregs(); @@ -6978,7 +6978,7 @@ ///#ifdef PROFILED_ABSMI EMIT_ENTRY_BLOCK(PREG,EXPAND_CLAUSES_INSTINIT); ///#endif - PredEntry *pe = PREG->y_u.sssllp.p; + PredEntry *pe = PREG->u.sssllp.p; yamop *pt0; /* update ASP before calling IPred */ @@ -7054,7 +7054,7 @@ } else { HR[d0 + 2] = AbsAppl(HR); - *HR = (CELL) pe->FunctorOfPred; + *H = (CELL) pe->FunctorOfPred; HR++; BEGP(pt1); pt1 = XREGS + 1; @@ -7066,7 +7066,7 @@ deref_head(d1, traced_undef_unk); traced_undef_nonvar: /* just copy it to the heap */ - *HR++ = d1; + *H++ = d1; continue; do { @@ -7078,7 +7078,7 @@ if (pt0 <= HR) { /* variable is safe */ - *HR++ = (CELL)pt0; + *H++ = (CELL)pt0; } else { /* bind it, in case it is a local variable */ d1 = Unsigned(HR); @@ -7092,9 +7092,9 @@ ENDP(pt1); } ENDD(d0); - HR[0] = Yap_Module_Name(pe); + H[0] = Yap_Module_Name(pe); ARG1 = (Term) AbsPair(HR); - HR += 2; + H += 2; #ifdef LOW_LEVEL_TRACER if (Yap_do_low_level_trace) { low_level_trace(enter_pred,UndefCode,XREGS+1); @@ -7214,7 +7214,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(SPY_PRED_D0ISNOZERO_INIT); ///#endif - *HR = (CELL) pe->FunctorOfPred; + *H = (CELL) pe->FunctorOfPred; HR[d0 + 2] = AbsAppl(HR); HR++; BEGP(pt1); @@ -7233,7 +7233,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(SPY_PRED_D0ISNOZERO_INSIDEFOR_DOSPY_NONVAR); ///#endif - *HR++ = d1; + *H++ = d1; continue; derefa_body(d1, pt0, traced_dospy_unk, traced_dospy_nonvar); @@ -7242,7 +7242,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(SPY_PRED_D0ISNOZERO_INSIDEFOR_SAFEVAR); ///#endif - *HR++ = (CELL)pt0; + *H++ = (CELL)pt0; } else { /* bind it, in case it is a local variable */ ///#ifdef PROFILED_ABSMI @@ -7262,7 +7262,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(SPY_PRED_POST_IFS); ///#endif - HR[0] = Yap_Module_Name(pe); + H[0] = Yap_Module_Name(pe); } ARG1 = (Term) AbsPair(HR); HR += 2; @@ -7317,9 +7317,9 @@ check_trail(TR); CACHE_Y(YREG); /* Point AP to the code that follows this instruction */ - store_at_least_one_arg(PREG->y_u.Otapl.s); + store_at_least_one_arg(PREG->u.Otapl.s); store_yaam_regs(NEXTOP(PREG, Otapl), 0); - PREG = PREG->y_u.Otapl.d; + PREG = PREG->u.Otapl.d; set_cut(S_YREG, B); B = B_YREG; #ifdef YAPOR @@ -7345,7 +7345,7 @@ B_YREG->cp_a1 = x1; B_YREG->cp_a2 = x2; } - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; set_cut(S_YREG, B); B = B_YREG; #ifdef YAPOR @@ -7369,7 +7369,7 @@ B_YREG->cp_a2 = ARG2; B_YREG->cp_a3 = ARG3; } - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; set_cut(S_YREG, B); B = B_YREG; #ifdef YAPOR @@ -7394,7 +7394,7 @@ B_YREG->cp_a3 = ARG3; B_YREG->cp_a4 = ARG4; } - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; set_cut(S_YREG, B); B = B_YREG; #ifdef YAPOR @@ -7411,7 +7411,7 @@ EMIT_ENTRY_BLOCK(PREG,RETRY_INSTINIT); CACHE_Y(B); restore_yaam_regs(NEXTOP(PREG, Otapl)); - restore_at_least_one_arg(PREG->y_u.Otapl.s); + restore_at_least_one_arg(PREG->u.Otapl.s); #ifdef FROZEN_STACKS EMIT_SIMPLE_BLOCK_TEST(RETRY_FROZEN); S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); @@ -7423,7 +7423,7 @@ EMIT_MULTIPLE_DESTINY_BLOCK_TEST(RETRY_END); SET_BB(B_YREG); ENDCACHE_Y(); - PREG = PREG->y_u.Otapl.d; + PREG = PREG->u.Otapl.d; JMPNext(); ENDBOp(); @@ -7431,7 +7431,7 @@ EMIT_ENTRY_BLOCK(PREG,RETRY2_INSTINIT); CACHE_Y(B); restore_yaam_regs(NEXTOP(PREG, l)); - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; ARG1 = B_YREG->cp_a1; ARG2 = B_YREG->cp_a2; #ifdef FROZEN_STACKS @@ -7452,7 +7452,7 @@ EMIT_ENTRY_BLOCK(PREG,RETRY3_INSTINIT); CACHE_Y(B); restore_yaam_regs(NEXTOP(PREG, l)); - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; ARG1 = B_YREG->cp_a1; ARG2 = B_YREG->cp_a2; ARG3 = B_YREG->cp_a3; @@ -7474,7 +7474,7 @@ EMIT_ENTRY_BLOCK(PREG,RETRY4_INSTINIT); CACHE_Y(B); restore_yaam_regs(NEXTOP(PREG, l)); - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; ARG1 = B_YREG->cp_a1; ARG2 = B_YREG->cp_a2; ARG3 = B_YREG->cp_a3; @@ -7500,7 +7500,7 @@ if (SCH_top_shared_cp(B)) { EMIT_SIMPLE_BLOCK_TEST(TRUST_IFOK_INIT); SCH_last_alternative(PREG, B_YREG); - restore_at_least_one_arg(PREG->y_u.Otapl.s); + restore_at_least_one_arg(PREG->u.Otapl.s); #ifdef FROZEN_STACKS EMIT_SIMPLE_BLOCK_TEST(TRUST_IFOK_FROZEN); S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); @@ -7513,7 +7513,7 @@ { EMIT_SIMPLE_BLOCK_TEST(TRUST_NOIF_INIT); pop_yaam_regs(); - pop_at_least_one_arg(PREG->y_u.Otapl.s); + pop_at_least_one_arg(PREG->u.Otapl.s); #ifdef FROZEN_STACKS EMIT_SIMPLE_BLOCK_TEST(TRUST_NOIF_FROZEN); S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); @@ -7523,7 +7523,7 @@ EMIT_MULTIPLE_DESTINY_BLOCK_TEST(TRUST_END); SET_BB(B_YREG); ENDCACHE_Y(); - PREG = PREG->y_u.Otapl.d; + PREG = PREG->u.Otapl.d; JMPNext(); ENDBOp(); @@ -7531,7 +7531,7 @@ EMIT_ENTRY_BLOCK(PREG,TRY_IN_INSTINIT); EMIT_MULTIPLE_DESTINY_BLOCK_TEST(TRY_IN_END); B->cp_ap = NEXTOP(PREG, l); - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; JMPNext(); ENDBOp(); @@ -7546,7 +7546,7 @@ check_trail(TR); /* mark the indexing code */ { - LogUpdIndex *cl = PREG->y_u.Illss.I; + LogUpdIndex *cl = PREG->u.Illss.I; PredEntry *ap = cl->ClPred; if (ap->LastCallOfPred != LUCALL_EXEC) { @@ -7561,8 +7561,8 @@ /* fprintf(stderr,"R %x--%d--%ul\n",ap,ap->TimeStampOfPred,ap->ArityOfPE);*/ } *--YREG = MkIntegerTerm(ap->TimeStampOfPred); - /* fprintf(stderr,"> %p/%p %d %d\n",cl,ap,ap->TimeStampOfPred,PREG->y_u.Illss.s);*/ - PREG = PREG->y_u.Illss.l1; + /* fprintf(stderr,"> %p/%p %d %d\n",cl,ap,ap->TimeStampOfPred,PREG->u.Illss.s);*/ + PREG = PREG->u.Illss.l1; /* indicate the indexing code is being used */ #if MULTIPLE_STACKS /* just store a reference */ @@ -7585,24 +7585,24 @@ CACHE_Y(YREG); timestamp = IntegerOfTerm(S_YREG[0]); - /* fprintf(stderr,"+ %p/%p %d %d %d--%u\n",PREG,PREG->y_u.OtaLl.d->ClPred,timestamp,PREG->y_u.OtaLl.d->ClPred->TimeStampOfPred,PREG->y_u.OtaLl.d->ClTimeStart,PREG->y_u.OtaLl.d->ClTimeEnd);*/ + /* fprintf(stderr,"+ %p/%p %d %d %d--%u\n",PREG,PREG->u.OtaLl.d->ClPred,timestamp,PREG->u.OtaLl.d->ClPred->TimeStampOfPred,PREG->u.OtaLl.d->ClTimeStart,PREG->u.OtaLl.d->ClTimeEnd);*/ /* Point AP to the code that follows this instruction */ /* always do this, even if we are not going to use it */ - store_args(PREG->y_u.OtaLl.s); - store_yaam_regs(PREG->y_u.OtaLl.n, 0); + store_args(PREG->u.OtaLl.s); + store_yaam_regs(PREG->u.OtaLl.n, 0); set_cut(S_YREG, B); B = B_YREG; #ifdef YAPOR SCH_set_load(B_YREG); #endif /* YAPOR */ #ifdef YAPOR - PP = PREG->y_u.OtaLl.d->ClPred; + PP = PREG->u.OtaLl.d->ClPred; #endif /* YAPOR */ - if (!VALID_TIMESTAMP(timestamp, PREG->y_u.OtaLl.d)) { + if (!VALID_TIMESTAMP(timestamp, PREG->u.OtaLl.d)) { /* jump to next alternative */ - PREG=PREG->y_u.OtaLl.n; + PREG=PREG->u.OtaLl.n; } else { - PREG = PREG->y_u.OtaLl.d->ClCode; + PREG = PREG->u.OtaLl.d->ClCode; } SET_BB(B_YREG); ENDCACHE_Y(); @@ -7618,23 +7618,23 @@ #if defined(YAPOR) || defined(THREADS) if (!PP) { - PP = PREG->y_u.OtaLl.d->ClPred; + PP = PREG->u.OtaLl.d->ClPred; PELOCK(15,PP); } #endif - timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[PREG->y_u.OtaLl.s]); - /* fprintf(stderr,"^ %p/%p %d %d %d--%u\n",PREG,PREG->y_u.OtaLl.d->ClPred,timestamp,PREG->y_u.OtaLl.d->ClPred->TimeStampOfPred,PREG->y_u.OtaLl.d->ClTimeStart,PREG->y_u.OtaLl.d->ClTimeEnd);*/ - if (!VALID_TIMESTAMP(timestamp, PREG->y_u.OtaLl.d)) { + timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[PREG->u.OtaLl.s]); + /* fprintf(stderr,"^ %p/%p %d %d %d--%u\n",PREG,PREG->u.OtaLl.d->ClPred,timestamp,PREG->u.OtaLl.d->ClPred->TimeStampOfPred,PREG->u.OtaLl.d->ClTimeStart,PREG->u.OtaLl.d->ClTimeEnd);*/ + if (!VALID_TIMESTAMP(timestamp, PREG->u.OtaLl.d)) { /* jump to next instruction */ - PREG=PREG->y_u.OtaLl.n; + PREG=PREG->u.OtaLl.n; JMPNext(); } - restore_yaam_regs(PREG->y_u.OtaLl.n); - restore_at_least_one_arg(PREG->y_u.OtaLl.s); + restore_yaam_regs(PREG->u.OtaLl.n); + restore_at_least_one_arg(PREG->u.OtaLl.s); #ifdef THREADS - PP = PREG->y_u.OtaLl.d->ClPred; + PP = PREG->u.OtaLl.d->ClPred; #endif - PREG = PREG->y_u.OtaLl.d->ClCode; + PREG = PREG->u.OtaLl.d->ClCode; #ifdef FROZEN_STACKS S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); set_cut(S_YREG, B->cp_b); @@ -7650,12 +7650,12 @@ BOp(traced_trust_logical, OtILl); CACHE_Y(B); { - LogUpdIndex *cl = PREG->y_u.OtILl.block; + LogUpdIndex *cl = PREG->u.OtILl.block; PredEntry *ap = cl->ClPred; - LogUpdClause *lcl = PREG->y_u.OtILl.d; + LogUpdClause *lcl = PREG->u.OtILl.d; UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); - /* fprintf(stderr,"- %p/%p %d %d %p\n",PREG,ap,timestamp,ap->TimeStampOfPred,PREG->y_u.OtILl.d->ClCode);*/ + /* fprintf(stderr,"- %p/%p %d %d %p\n",PREG,ap,timestamp,ap->TimeStampOfPred,PREG->u.OtILl.d->ClCode);*/ #if defined(YAPOR) || defined(THREADS) if (!PP) { PELOCK(16,ap); @@ -7668,7 +7668,7 @@ } else { PREG = lcl->ClCode; } - /* HEY, leave indexing block alone!! */ + /* HREY, leave indexing block alone!! */ /* check if we are the ones using this code */ #if MULTIPLE_STACKS DEC_CLREF_COUNT(cl); @@ -7772,9 +7772,9 @@ { EMIT_ENTRY_BLOCK(PREG,USER_SWITCH_INSTINIT); EMIT_MULTIPLE_DESTINY_BLOCK_TEST(USER_SWITCH_END); - yamop *new = Yap_udi_search(PREG->y_u.lp.p); + yamop *new = Yap_udi_search(PREG->u.lp.p); if (!new) { - PREG = PREG->y_u.lp.l; + PREG = PREG->u.lp.l; JMPNext(); } PREG = new; @@ -7793,21 +7793,21 @@ if (IsPairTerm(d0)) { /* pair */ SREG = RepPair(d0); - copy_jmp_address(PREG->y_u.llll.l1); - PREG = PREG->y_u.llll.l1; + copy_jmp_address(PREG->u.llll.l1); + PREG = PREG->u.llll.l1; JMPNext(); } else if (!IsApplTerm(d0)) { /* constant */ - copy_jmp_address(PREG->y_u.llll.l2); - PREG = PREG->y_u.llll.l2; + copy_jmp_address(PREG->u.llll.l2); + PREG = PREG->u.llll.l2; I_R = d0; JMPNext(); } else { /* appl */ - copy_jmp_address(PREG->y_u.llll.l3); - PREG = PREG->y_u.llll.l3; + copy_jmp_address(PREG->u.llll.l3); + PREG = PREG->u.llll.l3; SREG = RepAppl(d0); JMPNext(); } @@ -7821,8 +7821,8 @@ } while (Unsigned(pt0) != (d0)); /* variable */ - copy_jmp_address(PREG->y_u.llll.l4); - PREG = PREG->y_u.llll.l4; + copy_jmp_address(PREG->u.llll.l4); + PREG = PREG->u.llll.l4; JMPNext(); ENDP(pt0); ENDD(d0); @@ -7838,7 +7838,7 @@ BOp(traced_switch_list_nl, ollll); EMIT_ENTRY_BLOCK(PREG,SWITCH_LIST_NL_INSTINIT); EMIT_MULTIPLE_DESTINY_BLOCK_TEST(SWITCH_LIST_NL_END); - ALWAYS_LOOKAHEAD(PREG->y_u.ollll.pop); + ALWAYS_LOOKAHEAD(PREG->u.ollll.pop); BEGD(d0); d0 = CACHED_A1(); #if UNIQUE_TAG_FOR_PAIRS @@ -7852,8 +7852,8 @@ if (__builtin_expect(IsPairTerm(d0),1)) { /* pair */ #endif - copy_jmp_address(PREG->y_u.ollll.l1); - PREG = PREG->y_u.ollll.l1; + copy_jmp_address(PREG->u.ollll.l1); + PREG = PREG->u.ollll.l1; SREG = RepPair(d0); ALWAYS_GONext(); } @@ -7862,19 +7862,19 @@ #endif if (d0 == TermNil) { /* empty list */ - PREG = PREG->y_u.ollll.l2; + PREG = PREG->u.ollll.l2; JMPNext(); } else { /* appl or constant */ if (IsApplTerm(d0)) { - copy_jmp_address(PREG->y_u.ollll.l3); - PREG = PREG->y_u.ollll.l3; + copy_jmp_address(PREG->u.ollll.l3); + PREG = PREG->u.ollll.l3; SREG = RepAppl(d0); JMPNext(); } else { - copy_jmp_address(PREG->y_u.ollll.l3); - PREG = PREG->y_u.ollll.l3; + copy_jmp_address(PREG->u.ollll.l3); + PREG = PREG->u.ollll.l3; I_R = d0; JMPNext(); } @@ -7889,8 +7889,8 @@ #endif ENDP(pt0); /* variable */ - copy_jmp_address(PREG->y_u.ollll.l4); - PREG = PREG->y_u.ollll.l4; + copy_jmp_address(PREG->u.ollll.l4); + PREG = PREG->u.ollll.l4; JMPNext(); ENDD(d0); } @@ -7900,28 +7900,28 @@ EMIT_ENTRY_BLOCK(PREG,SWITCH_ON_ARG_TYPE_INSTINIT); EMIT_MULTIPLE_DESTINY_BLOCK_TEST(SWITCH_ON_ARG_TYPE_END); BEGD(d0); - d0 = XREG(PREG->y_u.xllll.x); + d0 = XREG(PREG->u.xllll.x); deref_head(d0, traced_arg_swt_unk); /* nonvar */ traced_arg_swt_nvar: if (IsPairTerm(d0)) { /* pair */ - copy_jmp_address(PREG->y_u.xllll.l1); - PREG = PREG->y_u.xllll.l1; + copy_jmp_address(PREG->u.xllll.l1); + PREG = PREG->u.xllll.l1; SREG = RepPair(d0); JMPNext(); } else if (!IsApplTerm(d0)) { /* constant */ - copy_jmp_address(PREG->y_u.xllll.l2); - PREG = PREG->y_u.xllll.l2; + copy_jmp_address(PREG->u.xllll.l2); + PREG = PREG->u.xllll.l2; I_R = d0; JMPNext(); } else { /* appl */ - copy_jmp_address(PREG->y_u.xllll.l3); - PREG = PREG->y_u.xllll.l3; + copy_jmp_address(PREG->u.xllll.l3); + PREG = PREG->u.xllll.l3; SREG = RepAppl(d0); JMPNext(); } @@ -7929,8 +7929,8 @@ BEGP(pt0); deref_body(d0, pt0, traced_arg_swt_unk, traced_arg_swt_nvar); /* variable */ - copy_jmp_address(PREG->y_u.xllll.l4); - PREG = PREG->y_u.xllll.l4; + copy_jmp_address(PREG->u.xllll.l4); + PREG = PREG->u.xllll.l4; JMPNext(); ENDP(pt0); ENDD(d0); @@ -7940,28 +7940,28 @@ EMIT_ENTRY_BLOCK(PREG,SWITCH_ON_SUB_ARG_TYPE_INSTINIT); EMIT_MULTIPLE_DESTINY_BLOCK_TEST(SWITCH_ON_SUB_ARG_TYPE_END); BEGD(d0); - d0 = SREG[PREG->y_u.sllll.s]; + d0 = SREG[PREG->u.sllll.s]; deref_head(d0, traced_sub_arg_swt_unk); /* nonvar */ traced_sub_arg_swt_nvar: if (IsPairTerm(d0)) { /* pair */ - copy_jmp_address(PREG->y_u.sllll.l1); - PREG = PREG->y_u.sllll.l1; + copy_jmp_address(PREG->u.sllll.l1); + PREG = PREG->u.sllll.l1; SREG = RepPair(d0); JMPNext(); } else if (!IsApplTerm(d0)) { /* constant */ - copy_jmp_address(PREG->y_u.sllll.l2); - PREG = PREG->y_u.sllll.l2; + copy_jmp_address(PREG->u.sllll.l2); + PREG = PREG->u.sllll.l2; I_R = d0; JMPNext(); } else { /* appl */ - copy_jmp_address(PREG->y_u.sllll.l3); - PREG = PREG->y_u.sllll.l3; + copy_jmp_address(PREG->u.sllll.l3); + PREG = PREG->u.sllll.l3; SREG = RepAppl(d0); JMPNext(); } @@ -7975,8 +7975,8 @@ } while (Unsigned(pt0) != (d0)); /* variable */ - copy_jmp_address(PREG->y_u.sllll.l4); - PREG = PREG->y_u.sllll.l4; + copy_jmp_address(PREG->u.sllll.l4); + PREG = PREG->u.sllll.l4; JMPNext(); ENDP(pt0); ENDD(d0); @@ -7996,8 +7996,8 @@ BEGP(pt0); deref_body(d0, pt0, traced_jump_if_unk, traced_jump0_if_nonvar); /* variable */ - copy_jmp_address(PREG->y_u.l.l); - PREG = PREG->y_u.l.l; + copy_jmp_address(PREG->u.l.l); + PREG = PREG->u.l.l; ENDP(pt0); JMPNext(); ENDD(d0); @@ -8007,12 +8007,12 @@ EMIT_ENTRY_BLOCK(PREG,JUMP_IF_NONVAR_INSTINIT); EMIT_MULTIPLE_DESTINY_BLOCK_TEST(JUMP_IF_NONVAR_END); BEGD(d0); - d0 = XREG(PREG->y_u.xll.x); + d0 = XREG(PREG->u.xll.x); deref_head(d0, traced_jump2_if_unk); /* non var */ traced_jump2_if_nonvar: - copy_jmp_address(PREG->y_u.xll.l1); - PREG = PREG->y_u.xll.l1; + copy_jmp_address(PREG->u.xll.l1); + PREG = PREG->u.xll.l1; JMPNext(); BEGP(pt0); @@ -8038,17 +8038,17 @@ deref_head(d0, traced_if_n_unk); traced_if_n_nvar: /* not variable */ - if (d0 == PREG->y_u.clll.c) { + if (d0 == PREG->u.clll.c) { /* equal to test value */ - copy_jmp_address(PREG->y_u.clll.l2); - PREG = PREG->y_u.clll.l2; + copy_jmp_address(PREG->u.clll.l2); + PREG = PREG->u.clll.l2; JMPNext(); } else { /* different from test value */ /* the case to optimise */ - copy_jmp_address(PREG->y_u.clll.l1); - PREG = PREG->y_u.clll.l1; + copy_jmp_address(PREG->u.clll.l1); + PREG = PREG->u.clll.l1; JMPNext(); } @@ -8062,8 +8062,8 @@ ENDP(pt0); /* variable */ - copy_jmp_address(PREG->y_u.clll.l3); - PREG = PREG->y_u.clll.l3; + copy_jmp_address(PREG->u.clll.l3); + PREG = PREG->u.clll.l3; JMPNext(); ENDD(d0); ENDBOp(); @@ -8072,7 +8072,7 @@ * Indexing on ARG1 * \************************************************************************/ -#define HASH_SHIFT 6 +#define HRASH_SHIFT 6 BOp(traced_switch_on_func, sssl); EMIT_ENTRY_BLOCK(PREG,SWITCH_ON_FUNC_INSTINIT); @@ -8084,11 +8084,11 @@ { CELL /* first, calculate the mask */ - Mask = (PREG->y_u.sssl.s - 1) << 1, /* next, calculate the hash function */ - hash = d1 >> (HASH_SHIFT - 1) & Mask; + Mask = (PREG->u.sssl.s - 1) << 1, /* next, calculate the hash function */ + hash = d1 >> (HRASH_SHIFT - 1) & Mask; CELL *base; - base = (CELL *)PREG->y_u.sssl.l; + base = (CELL *)PREG->u.sssl.l; /* PREG now points at the beginning of the hash table */ BEGP(pt0); /* pt0 will always point at the item */ @@ -8133,11 +8133,11 @@ { CELL /* first, calculate the mask */ - Mask = (PREG->y_u.sssl.s - 1) << 1, /* next, calculate the hash function */ - hash = d1 >> (HASH_SHIFT - 1) & Mask; + Mask = (PREG->u.sssl.s - 1) << 1, /* next, calculate the hash function */ + hash = d1 >> (HRASH_SHIFT - 1) & Mask; CELL *base; - base = (CELL *)PREG->y_u.sssl.l; + base = (CELL *)PREG->u.sssl.l; /* PREG now points at the beginning of the hash table */ BEGP(pt0); /* pt0 will always point at the item */ @@ -8177,7 +8177,7 @@ EMIT_MULTIPLE_DESTINY_BLOCK_TEST(GO_ON_FUNC_END); BEGD(d0); { - CELL *pt = (CELL *)(PREG->y_u.sssl.l); + CELL *pt = (CELL *)(PREG->u.sssl.l); d0 = *SREG++; if (d0 == pt[0]) { @@ -8198,7 +8198,7 @@ EMIT_MULTIPLE_DESTINY_BLOCK_TEST(GO_ON_CONS_END); BEGD(d0); { - CELL *pt = (CELL *)(PREG->y_u.sssl.l); + CELL *pt = (CELL *)(PREG->u.sssl.l); d0 = I_R; if (d0 == pt[0]) { @@ -8219,7 +8219,7 @@ EMIT_MULTIPLE_DESTINY_BLOCK_TEST(IF_FUNC_END); BEGD(d1); BEGP(pt0); - pt0 = (CELL *) PREG->y_u.sssl.l; + pt0 = (CELL *) PREG->u.sssl.l; d1 = *SREG++; while (pt0[0] != d1 && pt0[0] != (CELL)NULL ) { pt0 += 2; @@ -8236,7 +8236,7 @@ EMIT_MULTIPLE_DESTINY_BLOCK_TEST(IF_CONS_END); BEGD(d1); BEGP(pt0); - pt0 = (CELL *) PREG->y_u.sssl.l; + pt0 = (CELL *) PREG->u.sssl.l; d1 = I_R; while (pt0[0] != d1 && pt0[0] != 0L ) { pt0 += 2; @@ -8282,16 +8282,16 @@ BOp(traced_jit_handler, jhc); /* Needs to recompile */ - if (PREG->y_u.jhc.jh->jitman.torecomp) { + if (PREG->u.jhc.jh->jitman.torecomp) { /* First: recompile on Smart JIT */ if (ExpEnv.config_struc.execution_mode == SMART_JIT) { - PREG->y_u.jhc.jh->jitman.torecomp = 0; + PREG->u.jhc.jh->jitman.torecomp = 0; recompile((void*)PREG); - if (NativeArea->area.p[PREG->y_u.jhc.jh->caa.naddress]) + if (NativeArea->area.p[PREG->u.jhc.jh->caa.naddress]) goto native_lbl; else { - PREG->y_u.jhc.jh->caa.taddress = -1; - PREG->y_u.jhc.jh->caa.naddress = -1; + PREG->u.jhc.jh->caa.taddress = -1; + PREG->u.jhc.jh->caa.naddress = -1; #if YAP_DBG_PREDS print_main_when_head(PREG, ON_PROFILED_INTERPRETER); #endif @@ -8306,12 +8306,12 @@ if (!ExpEnv.config_struc.posthreads[i]) { yamop* pt = PREG; ExpEnv.config_struc.posthreads[i] = 1; - PREG->y_u.jhc.jh->jitman.used_thread = i; + PREG->u.jhc.jh->jitman.used_thread = i; if(pthread_create(&ExpEnv.config_struc.threaded_compiler_threads[i], NULL, recompile, (void*)pt)) { fprintf(stderr, "Error creating thread\n"); exit(1); } - PREG->y_u.jhc.jh->jitman.torecomp = 0; + PREG->u.jhc.jh->jitman.torecomp = 0; #if YAP_DBG_PREDS print_main_when_head(PREG, ON_PROFILED_INTERPRETER); #endif @@ -8330,14 +8330,14 @@ /* Does not need to recompile */ else { /* Do I have native function to execute? */ - if (PREG->y_u.jhc.jh->caa.naddress != -1 && NativeArea->area.p && NativeArea->area.p[PREG->y_u.jhc.jh->caa.naddress] && NativeArea->area.ok[PREG->y_u.jhc.jh->caa.naddress]) { + if (PREG->u.jhc.jh->caa.naddress != -1 && NativeArea->area.p && NativeArea->area.p[PREG->u.jhc.jh->caa.naddress] && NativeArea->area.ok[PREG->u.jhc.jh->caa.naddress]) { /* Yes, I do */ native_lbl:; void* (*callee)(yamop**,yamop**,CELL**,void*[],void*[]); void* go; - callee = (void*(*)(yamop**,yamop**,CELL**,void*[],void*[]))NativeArea->area.p[PREG->y_u.jhc.jh->caa.naddress]; + callee = (void*(*)(yamop**,yamop**,CELL**,void*[],void*[]))NativeArea->area.p[PREG->u.jhc.jh->caa.naddress]; - HEADPREG = PREG; + HREADPREG = PREG; #if YAP_STAT_PREDS getrusage(RUSAGE_SELF, &rustart); #endif @@ -8352,28 +8352,28 @@ getrusage(RUSAGE_SELF, &ruend); timstart = rustart.ru_utime; timend = ruend.ru_utime; - NativeArea->t_runs[HEADPREG->y_u.jhc.jh->caa.naddress] += (((double)timend.tv_sec - (double)timstart.tv_sec) + ((double)timend.tv_usec - (double)timstart.tv_usec) / 1000000.0); + NativeArea->t_runs[HEADPREG->u.jhc.jh->caa.naddress] += (((double)timend.tv_sec - (double)timstart.tv_sec) + ((double)timend.tv_usec - (double)timstart.tv_usec) / 1000000.0); //fprintf(stdout, "Executou nativo!!\n\n"); #endif /* Do I need to recompile? */ - if (HEADPREG->y_u.jhc.jh->jitman.torecomp) { + if (HREADPREG->u.jhc.jh->jitman.torecomp) { /* Yes. Manage intermediate code so that emitted BBs append to right last block */ - IntermediatecodeArea->area.isactive[HEADPREG->y_u.jhc.jh->caa.taddress] = 1; - BlocksContext* b = IntermediatecodeArea->area.t[HEADPREG->y_u.jhc.jh->caa.taddress]->bc; - set_last_deeply(b, &(IntermediatecodeArea->area.lastblock[HEADPREG->y_u.jhc.jh->caa.taddress])); + IntermediatecodeArea->area.isactive[HEADPREG->u.jhc.jh->caa.taddress] = 1; + BlocksContext* b = IntermediatecodeArea->area.t[HEADPREG->u.jhc.jh->caa.taddress]->bc; + set_last_deeply(b, &(IntermediatecodeArea->area.lastblock[HEADPREG->u.jhc.jh->caa.taddress])); } goto *go; } /* No, I don't. So, Did PREG reach threshold value to become hot? */ - else if (PREG->y_u.jhc.jh->fi.bcst.c == ExpEnv.config_struc.frequency_bound && PREG->y_u.jhc.jh->caa.taddress != -1 && IntermediatecodeArea->area.t && IntermediatecodeArea->area.t[PREG->y_u.jhc.jh->caa.taddress] && IntermediatecodeArea->area.ok[PREG->y_u.jhc.jh->caa.taddress]) { + else if (PREG->u.jhc.jh->fi.bcst.c == ExpEnv.config_struc.frequency_bound && PREG->u.jhc.jh->caa.taddress != -1 && IntermediatecodeArea->area.t && IntermediatecodeArea->area.t[PREG->u.jhc.jh->caa.taddress] && IntermediatecodeArea->area.ok[PREG->u.jhc.jh->caa.taddress]) { /* Yes, it did */ if (ExpEnv.config_struc.useonlypi) { /* Don't compile. Use only profiled insts. This will be executed only if "only_profiled_interpreter" is used */ - IntermediatecodeArea->area.isactive[PREG->y_u.jhc.jh->caa.taddress] = 0; - PREG->y_u.jhc.jh->fi.bcst.c = 2*ExpEnv.config_struc.frequency_bound; + IntermediatecodeArea->area.isactive[PREG->u.jhc.jh->caa.taddress] = 0; + PREG->u.jhc.jh->fi.bcst.c = 2*ExpEnv.config_struc.frequency_bound; #if YAP_DBG_PREDS print_main_when_head(PREG, ON_PROFILED_INTERPRETER); PREG = NEXTOP(PREG, jhc); @@ -8384,8 +8384,8 @@ /* Compile on Smart JIT */ if (ExpEnv.config_struc.execution_mode == SMART_JIT) { compile((void*)PREG); - PREG->y_u.jhc.jh->fi.bcst.c = 2*ExpEnv.config_struc.frequency_bound; - if (PREG->y_u.jhc.jh->caa.naddress != -1 && NativeArea->area.p[PREG->y_u.jhc.jh->caa.naddress]) // success + PREG->u.jhc.jh->fi.bcst.c = 2*ExpEnv.config_struc.frequency_bound; + if (PREG->u.jhc.jh->caa.naddress != -1 && NativeArea->area.p[PREG->u.jhc.jh->caa.naddress]) // success goto native_lbl; else { // fail #if YAP_DBG_PREDS @@ -8404,12 +8404,12 @@ /* I have available thread */ yamop* pt = PREG; ExpEnv.config_struc.posthreads[i] = 1; - PREG->y_u.jhc.jh->jitman.used_thread = i; + PREG->u.jhc.jh->jitman.used_thread = i; if(pthread_create(&ExpEnv.config_struc.threaded_compiler_threads[i], NULL, compile, (void*)pt)) { fprintf(stderr, "Error creating thread\n"); exit(1); } - PREG->y_u.jhc.jh->fi.bcst.c = 2*ExpEnv.config_struc.frequency_bound; + PREG->u.jhc.jh->fi.bcst.c = 2*ExpEnv.config_struc.frequency_bound; #if YAP_DBG_PREDS print_main_when_head(PREG, ON_PROFILED_INTERPRETER); #endif @@ -8428,11 +8428,11 @@ } /* No, I don't have native pointer to execute and PREG did not become hot */ else { - if (!PREG->y_u.jhc.jh->fi.bcst.c) PREG->y_u.jhc.jh->mf.isground = IsGround(PREG); - PREG->y_u.jhc.jh->fi.bcst.c++; + if (!PREG->u.jhc.jh->fi.bcst.c) PREG->u.jhc.jh->mf.isground = IsGround(PREG); + PREG->u.jhc.jh->fi.bcst.c++; /* Did PREG reach threshold value to become critical? */ - if (PREG->y_u.jhc.jh->fi.bcst.c == (COUNT)(ExpEnv.config_struc.frequency_bound*(ExpEnv.config_struc.profiling_startp)) && !PREG->y_u.jhc.jh->mf.isground) { + if (PREG->u.jhc.jh->fi.bcst.c == (COUNT)(ExpEnv.config_struc.frequency_bound*(ExpEnv.config_struc.profiling_startp)) && !PREG->u.jhc.jh->mf.isground) { /* Yes, it did So... */ critical_lbl:; @@ -8448,31 +8448,31 @@ #if YAP_STAT_PREDS IntermediatecodeArea->area.profiling_time = (double*)realloc(IntermediatecodeArea->area.profiling_time, (IntermediatecodeArea->n+1)*sizeof(double)); #endif - PREG->y_u.jhc.jh->caa.taddress = IntermediatecodeArea->n; + PREG->u.jhc.jh->caa.taddress = IntermediatecodeArea->n; IntermediatecodeArea->n += 1; - IntermediatecodeArea->area.isactive[PREG->y_u.jhc.jh->caa.taddress] = 1; - IntermediatecodeArea->area.ok[PREG->y_u.jhc.jh->caa.taddress] = 1; - IntermediatecodeArea->area.t[PREG->y_u.jhc.jh->caa.taddress] = (TraceContext*)malloc(sizeof(TraceContext)); - IntermediatecodeArea->area.t[PREG->y_u.jhc.jh->caa.taddress]->bc = NULL; - IntermediatecodeArea->area.t[PREG->y_u.jhc.jh->caa.taddress]->tracesize = 0; - IntermediatecodeArea->area.t[PREG->y_u.jhc.jh->caa.taddress]->n = 0; - curtrace = &IntermediatecodeArea->area.t[PREG->y_u.jhc.jh->caa.taddress]; + IntermediatecodeArea->area.isactive[PREG->u.jhc.jh->caa.taddress] = 1; + IntermediatecodeArea->area.ok[PREG->u.jhc.jh->caa.taddress] = 1; + IntermediatecodeArea->area.t[PREG->u.jhc.jh->caa.taddress] = (TraceContext*)malloc(sizeof(TraceContext)); + IntermediatecodeArea->area.t[PREG->u.jhc.jh->caa.taddress]->bc = NULL; + IntermediatecodeArea->area.t[PREG->u.jhc.jh->caa.taddress]->tracesize = 0; + IntermediatecodeArea->area.t[PREG->u.jhc.jh->caa.taddress]->n = 0; + curtrace = &IntermediatecodeArea->area.t[PREG->u.jhc.jh->caa.taddress]; headoftrace = PREG; ineedredefinedest = 0; /* Define NATIVE_ME_INSTINIT as simple BB on traces initialized before the latter */ EMIT_HEAD_BLOCK(PREG); - IntermediatecodeArea->area.lastblock[PREG->y_u.jhc.jh->caa.taddress] = (*curtrace)->bc; + IntermediatecodeArea->area.lastblock[PREG->u.jhc.jh->caa.taddress] = (*curtrace)->bc; } } - else if (PREG->y_u.jhc.jh->fi.bcst.c >= (COUNT)(ExpEnv.config_struc.frequency_bound*(ExpEnv.config_struc.profiling_startp)) && PREG->y_u.jhc.jh->fi.bcst.c < ExpEnv.config_struc.frequency_bound && !PREG->y_u.jhc.jh->mf.isground) { + else if (PREG->u.jhc.jh->fi.bcst.c >= (COUNT)(ExpEnv.config_struc.frequency_bound*(ExpEnv.config_struc.profiling_startp)) && PREG->u.jhc.jh->fi.bcst.c < ExpEnv.config_struc.frequency_bound && !PREG->u.jhc.jh->mf.isground) { /* No, PREG is critical but still not hot */ EMIT_ENTRY_BLOCK(PREG,JIT_HANDLER_INSTINIT); { - curtrace = &IntermediatecodeArea->area.t[PREG->y_u.jhc.jh->caa.taddress]; + curtrace = &IntermediatecodeArea->area.t[PREG->u.jhc.jh->caa.taddress]; headoftrace = PREG; ineedredefinedest = 0; EMIT_HEAD_BLOCK(PREG); - IntermediatecodeArea->area.lastblock[PREG->y_u.jhc.jh->caa.taddress] = (*curtrace)->bc; + IntermediatecodeArea->area.lastblock[PREG->u.jhc.jh->caa.taddress] = (*curtrace)->bc; } } else { @@ -8497,7 +8497,7 @@ Op(traced_p_atom_x, xl); EMIT_ENTRY_BLOCK(PREG,P_ATOM_X_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.xl.x); + d0 = XREG(PREG->u.xl.x); profiled_deref_head_TEST(d0, traced_atom_x_unk); traced_atom_x_nvar: if (IsAtomTerm(d0) && !IsBlob(AtomOfTerm(d0))) { @@ -8507,14 +8507,14 @@ } else { EMIT_MULTIPLE_DESTINY_BLOCK_TEST(P_ATOM_X_NOATOM); - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); } BEGP(pt0); profiled_deref_body(d0, pt0, traced_atom_x_unk, traced_atom_x_nvar); EMIT_SIMPLE_BLOCK_TEST(P_ATOM_X_NOATOM); - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); ENDP(pt0); ENDD(d0); @@ -8526,7 +8526,7 @@ ///#endif BEGD(d0); BEGP(pt0); - pt0 = YREG + PREG->y_u.yl.y; + pt0 = YREG + PREG->u.yl.y; d0 = *pt0; deref_head(d0, traced_atom_y_unk); traced_atom_y_nvar: @@ -8541,7 +8541,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_ATOM_Y_NOIF); ///#endif - PREG = PREG->y_u.yl.F; + PREG = PREG->u.yl.F; GONext(); } @@ -8549,7 +8549,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_ATOM_Y_END); //#endif - PREG = PREG->y_u.yl.F; + PREG = PREG->u.yl.F; GONext(); ENDP(pt0); ENDD(d0); @@ -8560,7 +8560,7 @@ EMIT_ENTRY_BLOCK(PREG,P_ATOMIC_X_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.xl.x); + d0 = XREG(PREG->u.xl.x); deref_head(d0, traced_atomic_x_unk); traced_atomic_x_nvar: /* non variable */ @@ -8575,7 +8575,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_ATOMIC_X_VAR); ///#endif - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); } @@ -8584,7 +8584,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_ATOMIC_X_END); //#endif - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); ENDP(pt0); ENDD(d0); @@ -8596,7 +8596,7 @@ ///#endif BEGD(d0); BEGP(pt0); - pt0 = YREG + PREG->y_u.yl.y; + pt0 = YREG + PREG->u.yl.y; d0 = *pt0; deref_head(d0, traced_atomic_y_unk); traced_atomic_y_nvar: @@ -8612,7 +8612,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_ATOMIC_Y_VAR); //#endif - PREG = PREG->y_u.yl.F; + PREG = PREG->u.yl.F; GONext(); } @@ -8620,7 +8620,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_ATOMIC_Y_END); ///#endif - PREG = PREG->y_u.yl.F; + PREG = PREG->u.yl.F; GONext(); ENDP(pt0); ENDD(d0); @@ -8629,7 +8629,7 @@ Op(traced_p_integer_x, xl); EMIT_ENTRY_BLOCK(PREG,P_INTEGER_X_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.xl.x); + d0 = XREG(PREG->u.xl.x); profiled_deref_head_TEST(d0, traced_integer_x_unk); traced_integer_x_nvar: /* non variable */ @@ -8658,7 +8658,7 @@ EMIT_CONDITIONAL_SUCCESS("IsExtensionFunctor(f0)"); EMIT_CONDITIONAL_FAIL("(CELL)f0 == (CELL)FunctorLongInt || (CELL)f0 == (CELL)FunctorBigInt"); EMIT_MULTIPLE_DESTINY_BLOCK_TEST(P_INTEGER_X_INTEGER_X_NVAR_NOOK); - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); } } @@ -8666,13 +8666,13 @@ EMIT_CONDITIONAL_FAIL("IsIntTerm(d0)"); EMIT_CONDITIONAL_FAIL("IsApplTerm(d0)"); EMIT_SIMPLE_BLOCK_TEST(P_INTEGER_X_INTEGER_X_NVAR_NOOK); - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); BEGP(pt0); profiled_deref_body(d0, pt0, traced_integer_x_unk, traced_integer_x_nvar); EMIT_SIMPLE_BLOCK_TEST(P_INTEGER_X_INTEGER_X_UNK); - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); ENDP(pt0); ENDD(d0); @@ -8682,7 +8682,7 @@ EMIT_ENTRY_BLOCK(PREG,P_INTEGER_Y_INSTINIT); BEGD(d0); BEGP(pt0); - pt0 = YREG + PREG->y_u.yl.y; + pt0 = YREG + PREG->u.yl.y; d0 = *pt0; profiled_deref_head_TEST(d0, traced_integer_y_unk); traced_integer_y_nvar: @@ -8714,7 +8714,7 @@ EMIT_CONDITIONAL_SUCCESS("IsExtensionFunctor(f0)"); EMIT_CONDITIONAL_FAIL(FUNCTOR_LARGE_INT); EMIT_MULTIPLE_DESTINY_BLOCK_TEST(P_INTEGER_Y_INTEGER_Y_NVAR_NOOK); - PREG = PREG->y_u.yl.F; + PREG = PREG->u.yl.F; GONext(); } } @@ -8722,12 +8722,12 @@ EMIT_CONDITIONAL_FAIL("IsIntTerm(d0)"); EMIT_CONDITIONAL_FAIL("IsApplTerm(d0)"); EMIT_SIMPLE_BLOCK_TEST(P_INTEGER_Y_INTEGER_Y_NVAR_NOOK); - PREG = PREG->y_u.yl.F; + PREG = PREG->u.yl.F; GONext(); profiled_derefa_body(d0, pt0, traced_integer_y_unk, traced_integer_y_nvar); EMIT_SIMPLE_BLOCK(P_INTEGER_Y_INTEGER_Y_UNK); - PREG = PREG->y_u.yl.F; + PREG = PREG->u.yl.F; GONext(); ENDP(pt0); ENDD(d0); @@ -8736,7 +8736,7 @@ Op(traced_p_nonvar_x, xl); EMIT_ENTRY_BLOCK(PREG,P_NONVAR_X_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.xl.x); + d0 = XREG(PREG->u.xl.x); profiled_deref_head_TEST(d0, traced_nonvar_x_unk); traced_nonvar_x_nvar: EMIT_SIMPLE_BLOCK_TEST(P_NONVAR_X_NONVAR); @@ -8746,7 +8746,7 @@ BEGP(pt0); profiled_deref_body(d0, pt0, traced_nonvar_x_unk, traced_nonvar_x_nvar); EMIT_MULTIPLE_DESTINY_BLOCK_TEST(P_NONVAR_X_NONONVAR); - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); ENDP(pt0); ENDD(d0); @@ -8756,7 +8756,7 @@ EMIT_ENTRY_BLOCK(PREG,P_NONVAR_Y_INSTINIT); BEGD(d0); BEGP(pt0); - pt0 = YREG + PREG->y_u.yl.y; + pt0 = YREG + PREG->u.yl.y; d0 = *pt0; profiled_deref_head_TEST(d0, traced_nonvar_y_unk); traced_nonvar_y_nvar: @@ -8766,7 +8766,7 @@ profiled_derefa_body(d0, pt0, traced_nonvar_y_unk, traced_nonvar_y_nvar); EMIT_MULTIPLE_DESTINY_BLOCK_TEST(P_NONVAR_Y_NONONVAR); - PREG = PREG->y_u.yl.F; + PREG = PREG->u.yl.F; GONext(); ENDP(pt0); ENDD(d0); @@ -8777,7 +8777,7 @@ EMIT_ENTRY_BLOCK(PREG,P_NUMBER_X_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.xl.x); + d0 = XREG(PREG->u.xl.x); deref_head(d0, traced_number_x_unk); traced_number_x_nvar: /* non variable */ @@ -8807,7 +8807,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_NUMBER_X_FUNCTORDEFAULT); ///#endif - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); } } @@ -8815,7 +8815,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_NUMBER_X_POST_IF); ///#endif - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); BEGP(pt0); @@ -8823,7 +8823,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_NUMBER_X_NUMBER_X_UNK); ///#endif - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); ENDP(pt0); ENDD(d0); @@ -8835,7 +8835,7 @@ ///#endif BEGD(d0); BEGP(pt0); - pt0 = YREG + PREG->y_u.yl.y; + pt0 = YREG + PREG->u.yl.y; d0 = *pt0; deref_head(d0, traced_number_y_unk); traced_number_y_nvar: @@ -8866,7 +8866,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_NUMBER_Y_FUNCTORDEFAULT); ///#endif - PREG = PREG->y_u.yl.F; + PREG = PREG->u.yl.F; GONext(); } } @@ -8874,14 +8874,14 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_NUMBER_Y_POST_IF); ///#endif - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); derefa_body(d0, pt0, traced_number_y_unk, traced_number_y_nvar); ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_NUMBER_Y_NUMBER_Y_UNK); ///#endif - PREG = PREG->y_u.yl.F; + PREG = PREG->u.yl.F; GONext(); ENDP(pt0); ENDD(d0); @@ -8890,12 +8890,12 @@ Op(traced_p_var_x, xl); EMIT_ENTRY_BLOCK(PREG,P_VAR_X_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.xl.x); + d0 = XREG(PREG->u.xl.x); profiled_deref_head_TEST(d0, traced_var_x_unk); traced_var_x_nvar: /* non variable */ EMIT_MULTIPLE_DESTINY_BLOCK_TEST(P_VAR_X_NONVAR); - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); BEGP(pt0); @@ -8911,13 +8911,13 @@ EMIT_ENTRY_BLOCK(PREG,P_VAR_Y_INSTINIT); BEGD(d0); BEGP(pt0); - pt0 = YREG + PREG->y_u.yl.y; + pt0 = YREG + PREG->u.yl.y; d0 = *pt0; profiled_deref_head_TEST(d0, traced_var_y_unk); traced_var_y_nvar: /* non variable */ EMIT_MULTIPLE_DESTINY_BLOCK_TEST(P_VAR_Y_NONVAR); - PREG = PREG->y_u.yl.F; + PREG = PREG->u.yl.F; GONext(); profiled_derefa_body(d0, pt0, traced_var_y_unk, traced_var_y_nvar); @@ -8933,7 +8933,7 @@ EMIT_ENTRY_BLOCK(PREG,P_DB_REF_X_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.xl.x); + d0 = XREG(PREG->u.xl.x); deref_head(d0, traced_dbref_x_unk); traced_dbref_x_nvar: /* non variable */ @@ -8950,7 +8950,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_DB_REF_X_NODBREF); ///#endif - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); } @@ -8959,7 +8959,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_DB_REF_X_DBREF_X_UNK); ///#endif - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); ENDP(pt0); ENDD(d0); @@ -8971,7 +8971,7 @@ ///#endif BEGD(d0); BEGP(pt0); - pt0 = YREG + PREG->y_u.yl.y; + pt0 = YREG + PREG->u.yl.y; d0 = *pt0; deref_head(d0, traced_dbref_y_unk); traced_dbref_y_nvar: @@ -8989,7 +8989,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_DB_REF_Y_NODBREF); ///#endif - PREG = PREG->y_u.yl.F; + PREG = PREG->u.yl.F; GONext(); } @@ -8997,7 +8997,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_DB_REF_Y_DBREF_Y_UNK); ///#endif - PREG = PREG->y_u.yl.F; + PREG = PREG->u.yl.F; GONext(); ENDP(pt0); ENDD(d0); @@ -9008,7 +9008,7 @@ EMIT_ENTRY_BLOCK(PREG,P_PRIMITIVE_X_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.xl.x); + d0 = XREG(PREG->u.xl.x); deref_head(d0, traced_primi_x_unk); traced_primi_x_nvar: /* non variable */ @@ -9023,7 +9023,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_PRIMITIVE_X_NOPRIMITIVE); ///#endif - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); } @@ -9032,7 +9032,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_PRIMITIVE_X_PRIMI_X_UNK); ///#endif - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); ENDP(pt0); ENDD(d0); @@ -9044,7 +9044,7 @@ ///#endif BEGD(d0); BEGP(pt0); - pt0 = YREG + PREG->y_u.yl.y; + pt0 = YREG + PREG->u.yl.y; d0 = *pt0; deref_head(d0, traced_primi_y_unk); traced_primi_y_nvar: @@ -9060,7 +9060,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_PRIMITIVE_Y_NOPRIMITIVE); ///#endif - PREG = PREG->y_u.yl.F; + PREG = PREG->u.yl.F; GONext(); } @@ -9068,7 +9068,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_PRIMITIVE_Y_PRIMI_Y_UNK); ///#endif - PREG = PREG->y_u.yl.F; + PREG = PREG->u.yl.F; GONext(); ENDP(pt0); ENDD(d0); @@ -9079,7 +9079,7 @@ EMIT_ENTRY_BLOCK(PREG,P_COMPOUND_X_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.xl.x); + d0 = XREG(PREG->u.xl.x); deref_head(d0, traced_compound_x_unk); traced_compound_x_nvar: /* non variable */ @@ -9095,7 +9095,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_COMPOUND_X_APPL_IFOK); ///#endif - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); } ///#ifdef PROFILED_ABSMI @@ -9108,7 +9108,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_COMPOUND_X_NOAPPL); ///#endif - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); } @@ -9117,7 +9117,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_COMPOUND_X_COMPOUND_X_UNK); ///#endif - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); ENDP(pt0); ENDD(d0); @@ -9129,7 +9129,7 @@ ///#endif BEGD(d0); BEGP(pt0); - pt0 = YREG + PREG->y_u.yl.y; + pt0 = YREG + PREG->u.yl.y; d0 = *pt0; deref_head(d0, traced_compound_y_unk); traced_compound_y_nvar: @@ -9146,7 +9146,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_COMPOUND_Y_APPL_IFOK); ///#endif - PREG = PREG->y_u.yl.F; + PREG = PREG->u.yl.F; GONext(); } ///#ifdef PROFILED_ABSMI @@ -9159,7 +9159,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_COMPOUND_Y_NOAPPL); ///#endif - PREG = PREG->y_u.yl.F; + PREG = PREG->u.yl.F; GONext(); } @@ -9167,7 +9167,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_COMPOUND_Y_COMPOUND_Y_UNK); ///#endif - PREG = PREG->y_u.yl.F; + PREG = PREG->u.yl.F; GONext(); ENDP(pt0); ENDD(d0); @@ -9178,7 +9178,7 @@ EMIT_ENTRY_BLOCK(PREG,P_FLOAT_X_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.xl.x); + d0 = XREG(PREG->u.xl.x); deref_head(d0, traced_float_x_unk); traced_float_x_nvar: /* non variable */ @@ -9192,7 +9192,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FLOAT_X_POST_IF); ///#endif - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); BEGP(pt0); @@ -9200,7 +9200,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FLOAT_X_FLOAT_X_UNK); ///#endif - PREG = PREG->y_u.xl.F; + PREG = PREG->u.xl.F; GONext(); ENDP(pt0); ENDD(d0); @@ -9212,7 +9212,7 @@ ///#endif BEGD(d0); BEGP(pt0); - pt0 = YREG + PREG->y_u.yl.y; + pt0 = YREG + PREG->u.yl.y; d0 = *pt0; deref_head(d0, traced_float_y_unk); traced_float_y_nvar: @@ -9227,14 +9227,14 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FLOAT_Y_POST_IF); ///#endif - PREG = PREG->y_u.yl.F; + PREG = PREG->u.yl.F; GONext(); derefa_body(d0, pt0, traced_float_y_unk, traced_float_y_nvar); ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FLOAT_Y_FLOAT_Y_UNK); ///#endif - PREG = PREG->y_u.yl.F; + PREG = PREG->u.yl.F; GONext(); ENDP(pt0); ENDD(d0); @@ -9244,12 +9244,12 @@ EMIT_ENTRY_BLOCK(PREG,P_PLUS_VV_INSTINIT); BEGD(d0); BEGD(d1); - d0 = XREG(PREG->y_u.xxx.x1); + d0 = XREG(PREG->u.xxx.x1); /* first check pt1 */ profiled_deref_head_TEST(d0, traced_plus_vv_unk); traced_plus_vv_nvar: EMIT_SIMPLE_BLOCK_TEST(P_PLUS_VV_PLUS_VV_NVAR); - d1 = XREG(PREG->y_u.xxx.x2); + d1 = XREG(PREG->u.xxx.x2); /* next check A2 */ profiled_deref_head_TEST(d1, traced_plus_vv_nvar_unk); traced_plus_vv_nvar_nvar: @@ -9272,7 +9272,7 @@ TRACED_FAIL(); } } - XREG(PREG->y_u.xxx.x) = d0; + XREG(PREG->u.xxx.x) = d0; PREG = NEXTOP(PREG, xxx); GONext(); @@ -9300,12 +9300,12 @@ Op(traced_p_plus_vc, xxn); EMIT_ENTRY_BLOCK(PREG,P_PLUS_VC_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); + d0 = XREG(PREG->u.xxn.xi); /* first check pt1 */ profiled_deref_head_TEST(d0, traced_plus_vc_unk); traced_plus_vc_nvar: { - Int d1 = PREG->y_u.xxn.c; + Int d1 = PREG->u.xxn.c; if (IsIntTerm(d0)) { EMIT_CONDITIONAL_SUCCESS("IsIntTerm(d0)"); EMIT_SIMPLE_BLOCK_TEST(P_PLUS_VC_PLUS_VC_NVAR_INT); @@ -9325,7 +9325,7 @@ } } } - XREG(PREG->y_u.xxn.x) = d0; + XREG(PREG->u.xxn.x) = d0; PREG = NEXTOP(PREG, xxn); GONext(); @@ -9333,7 +9333,7 @@ profiled_deref_body(d0, pt0, traced_plus_vc_unk, traced_plus_vc_nvar); EMIT_SIMPLE_BLOCK_TEST(P_PLUS_VC_PLUS_VC_UNK); saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A + " Int_FORMAT, PREG->y_u.xxn.c); + Yap_NilError(INSTANTIATION_ERROR, "X is A + " Int_FORMAT, PREG->u.xxn.c); setregs(); TRACED_FAIL(); ENDP(pt0); @@ -9344,12 +9344,12 @@ EMIT_ENTRY_BLOCK(PREG,P_PLUS_Y_VV_INSTINIT); BEGD(d0); BEGD(d1); - d0 = XREG(PREG->y_u.yxx.x1); + d0 = XREG(PREG->u.yxx.x1); /* first check pt1 */ profiled_deref_head_TEST(d0, traced_plus_y_vv_unk); traced_plus_y_vv_nvar: EMIT_SIMPLE_BLOCK_TEST(P_PLUS_Y_VV_PLUS_Y_VV_NVAR); - d1 = XREG(PREG->y_u.xxx.x2); + d1 = XREG(PREG->u.xxx.x2); /* next check A2 */ profiled_deref_head_TEST(d1, traced_plus_y_vv_nvar_unk); traced_plus_y_vv_nvar_nvar: @@ -9373,7 +9373,7 @@ } } BEGP(pt0); - pt0 = YREG + PREG->y_u.yxx.y; + pt0 = YREG + PREG->u.yxx.y; PREG = NEXTOP(PREG, yxx); INITIALIZE_PERMVAR(pt0,d0); ENDP(pt0); @@ -9402,14 +9402,14 @@ Op(traced_p_plus_y_vc, yxn); BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); + d0 = XREG(PREG->u.yxn.xi); EMIT_ENTRY_BLOCK(PREG,P_PLUS_Y_VC_INSTINIT); /* first check pt1 */ profiled_deref_head_TEST(d0, traced_plus_y_vc_unk); traced_plus_y_vc_nvar: { - Int d1 = PREG->y_u.yxn.c; + Int d1 = PREG->u.yxn.c; if (IsIntTerm(d0)) { EMIT_CONDITIONAL_SUCCESS("IsIntTerm(d0)"); EMIT_SIMPLE_BLOCK_TEST(P_PLUS_Y_VC_PLUS_Y_VC_NVAR_INT); @@ -9430,7 +9430,7 @@ } } BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; + pt0 = YREG + PREG->u.yxn.y; PREG = NEXTOP(PREG, yxn); INITIALIZE_PERMVAR(pt0,d0); ENDP(pt0); @@ -9440,7 +9440,7 @@ profiled_deref_body(d0, pt0, traced_plus_y_vc_unk, traced_plus_y_vc_nvar); EMIT_SIMPLE_BLOCK_TEST(P_PLUS_Y_VC_PLUS_Y_VC_UNK); saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A + " Int_FORMAT, PREG->y_u.yxn.c); + Yap_NilError(INSTANTIATION_ERROR, "X is A + " Int_FORMAT, PREG->u.yxn.c); setregs(); TRACED_FAIL(); ENDP(pt0); @@ -9451,12 +9451,12 @@ EMIT_ENTRY_BLOCK(PREG,P_MINUS_VV_INSTINIT); BEGD(d0); BEGD(d1); - d0 = XREG(PREG->y_u.xxx.x1); + d0 = XREG(PREG->u.xxx.x1); /* first check pt1 */ profiled_deref_head_TEST(d0, traced_minus_vv_unk); traced_minus_vv_nvar: EMIT_SIMPLE_BLOCK_TEST(P_MINUS_VV_MINUS_VV_NVAR); - d1 = XREG(PREG->y_u.xxx.x2); + d1 = XREG(PREG->u.xxx.x2); /* next check A2 */ profiled_deref_head_TEST(d1, traced_minus_vv_nvar_unk); traced_minus_vv_nvar_nvar: @@ -9479,7 +9479,7 @@ TRACED_FAIL(); } } - XREG(PREG->y_u.xxx.x) = d0; + XREG(PREG->u.xxx.x) = d0; PREG = NEXTOP(PREG, xxx); GONext(); @@ -9507,12 +9507,12 @@ Op(traced_p_minus_cv, xxn); EMIT_ENTRY_BLOCK(PREG,P_MINUS_CV_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); + d0 = XREG(PREG->u.xxn.xi); /* first check pt1 */ profiled_deref_head_TEST(d0, traced_minus_cv_unk); traced_minus_cv_nvar: { - Int d1 = PREG->y_u.xxn.c; + Int d1 = PREG->u.xxn.c; if (IsIntTerm(d0)) { EMIT_SIMPLE_BLOCK_TEST(P_MINUS_CV_MINUS_CV_NVAR_INT); d0 = MkIntegerTerm(d1 - IntOfTerm(d0)); @@ -9530,7 +9530,7 @@ } } } - XREG(PREG->y_u.xxn.x) = d0; + XREG(PREG->u.xxn.x) = d0; PREG = NEXTOP(PREG, xxn); GONext(); @@ -9538,7 +9538,7 @@ profiled_deref_body(d0, pt0, traced_minus_cv_unk, traced_minus_cv_nvar); EMIT_SIMPLE_BLOCK_TEST(P_MINUS_CV_MINUS_CV_UNK); saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "-A", PREG->y_u.xxn.c); + Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "-A", PREG->u.xxn.c); setregs(); TRACED_FAIL(); ENDP(pt0); @@ -9551,14 +9551,14 @@ ///#endif BEGD(d0); BEGD(d1); - d0 = XREG(PREG->y_u.yxx.x1); + d0 = XREG(PREG->u.yxx.x1); /* first check pt1 */ deref_head(d0, traced_minus_y_vv_unk); traced_minus_y_vv_nvar: ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_MINUS_Y_VV_MINUS_Y_VV_NVAR); ///#endif - d1 = XREG(PREG->y_u.xxx.x2); + d1 = XREG(PREG->u.xxx.x2); /* next check A2 */ deref_head(d1, traced_minus_y_vv_nvar_unk); traced_minus_y_vv_nvar_nvar: @@ -9590,7 +9590,7 @@ EMIT_SIMPLE_BLOCK(P_MINUS_Y_VV_NVAR_END); ///#endif BEGP(pt0); - pt0 = YREG + PREG->y_u.yxx.y; + pt0 = YREG + PREG->u.yxx.y; PREG = NEXTOP(PREG, yxx); INITIALIZE_PERMVAR(pt0,d0); ENDP(pt0); @@ -9626,7 +9626,7 @@ EMIT_ENTRY_BLOCK(PREG,P_MINUS_Y_CV_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); + d0 = XREG(PREG->u.yxn.xi); /* first check pt1 */ deref_head(d0, traced_minus_y_cv_unk); traced_minus_y_cv_nvar: @@ -9634,7 +9634,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_MINUS_Y_CV_MINUS_Y_CV_NVAR); ///#endif - Int d1 = PREG->y_u.yxn.c; + Int d1 = PREG->u.yxn.c; if (IsIntTerm(d0)) { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_MINUS_Y_CV_INTTERM); @@ -9663,7 +9663,7 @@ EMIT_SIMPLE_BLOCK(P_MINUS_Y_CV_NVAR_END); ///#endif BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; + pt0 = YREG + PREG->u.yxn.y; PREG = NEXTOP(PREG, yxn); INITIALIZE_PERMVAR(pt0,d0); ENDP(pt0); @@ -9675,7 +9675,7 @@ EMIT_SIMPLE_BLOCK(P_MINUS_Y_CV_MINUS_Y_CV_UNK); ///#endif saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "-A", PREG->y_u.yxn.c); + Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "-A", PREG->u.yxn.c); setregs(); TRACED_FAIL(); ENDP(pt0); @@ -9686,12 +9686,12 @@ EMIT_ENTRY_BLOCK(PREG,P_TIMES_VV_INSTINIT); BEGD(d0); BEGD(d1); - d0 = XREG(PREG->y_u.xxx.x1); + d0 = XREG(PREG->u.xxx.x1); /* first check pt1 */ profiled_deref_head_TEST(d0, traced_times_vv_unk); traced_times_vv_nvar: EMIT_SIMPLE_BLOCK_TEST(P_TIMES_VV_TIMES_VV_NVAR); - d1 = XREG(PREG->y_u.xxx.x2); + d1 = XREG(PREG->u.xxx.x2); /* next check A2 */ profiled_deref_head_TEST(d1, traced_times_vv_nvar_unk); traced_times_vv_nvar_nvar: @@ -9714,7 +9714,7 @@ TRACED_FAIL(); } } - XREG(PREG->y_u.xxx.x) = d0; + XREG(PREG->u.xxx.x) = d0; PREG = NEXTOP(PREG, xxx); GONext(); @@ -9742,12 +9742,12 @@ Op(traced_p_times_vc, xxn); EMIT_ENTRY_BLOCK(PREG,P_TIMES_VC_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); + d0 = XREG(PREG->u.xxn.xi); /* first check pt1 */ profiled_deref_head_TEST(d0, traced_times_vc_unk); traced_times_vc_nvar: { - Int d1 = PREG->y_u.xxn.c; + Int d1 = PREG->u.xxn.c; if (IsIntTerm(d0)) { EMIT_CONDITIONAL_SUCCESS("IsIntTerm(d0)"); EMIT_SIMPLE_BLOCK_TEST(P_TIMES_VC_TIMES_VC_NVAR_INT); @@ -9767,7 +9767,7 @@ } } } - XREG(PREG->y_u.xxn.x) = d0; + XREG(PREG->u.xxn.x) = d0; PREG = NEXTOP(PREG, xxn); GONext(); @@ -9775,7 +9775,7 @@ profiled_deref_body(d0, pt0, traced_times_vc_unk, traced_times_vc_nvar); EMIT_SIMPLE_BLOCK_TEST(P_TIMES_VC_TIMES_VC_UNK); saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A* " Int_FORMAT, PREG->y_u.xxn.c); + Yap_NilError(INSTANTIATION_ERROR, "X is A* " Int_FORMAT, PREG->u.xxn.c); setregs(); TRACED_FAIL(); ENDP(pt0); @@ -9788,14 +9788,14 @@ ///#endif BEGD(d0); BEGD(d1); - d0 = XREG(PREG->y_u.yxx.x1); + d0 = XREG(PREG->u.yxx.x1); /* first check pt1 */ deref_head(d0, traced_times_y_vv_unk); traced_times_y_vv_nvar: ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_TIMES_Y_VV_TIMES_Y_VV_NVAR); ///#endif - d1 = XREG(PREG->y_u.xxx.x2); + d1 = XREG(PREG->u.xxx.x2); /* next check A2 */ deref_head(d1, traced_times_y_vv_nvar_unk); traced_times_y_vv_nvar_nvar: @@ -9827,7 +9827,7 @@ EMIT_SIMPLE_BLOCK(P_TIMES_Y_VV_NVAR_END); ///#endif BEGP(pt0); - pt0 = YREG + PREG->y_u.yxx.y; + pt0 = YREG + PREG->u.yxx.y; PREG = NEXTOP(PREG, yxx); INITIALIZE_PERMVAR(pt0,d0); ENDP(pt0); @@ -9861,12 +9861,12 @@ Op(traced_p_times_y_vc, yxn); EMIT_ENTRY_BLOCK(PREG,P_TIMES_Y_VC_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); + d0 = XREG(PREG->u.yxn.xi); /* first check pt1 */ profiled_deref_head_TEST(d0, traced_times_y_vc_unk); traced_times_y_vc_nvar: { - Int d1 = PREG->y_u.yxn.c; + Int d1 = PREG->u.yxn.c; if (IsIntTerm(d0)) { EMIT_SIMPLE_BLOCK_TEST(P_TIMES_Y_VC_TIMES_Y_VC_NVAR_INT); d0 = times_int(IntOfTerm(d0), d1); @@ -9885,7 +9885,7 @@ } } BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; + pt0 = YREG + PREG->u.yxn.y; PREG = NEXTOP(PREG, yxn); INITIALIZE_PERMVAR(pt0,d0); ENDP(pt0); @@ -9897,7 +9897,7 @@ EMIT_SIMPLE_BLOCK_TEST(P_TIMES_Y_VC_TIMES_Y_VC_UNK); ///#endif saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A* " Int_FORMAT, PREG->y_u.yxn.c); + Yap_NilError(INSTANTIATION_ERROR, "X is A* " Int_FORMAT, PREG->u.yxn.c); setregs(); TRACED_FAIL(); ENDP(pt0); @@ -9908,12 +9908,12 @@ EMIT_ENTRY_BLOCK(PREG,P_DIV_VV_INSTINIT); BEGD(d0); BEGD(d1); - d0 = XREG(PREG->y_u.xxx.x1); + d0 = XREG(PREG->u.xxx.x1); /* first check pt1 */ profiled_deref_head_TEST(d0, traced_div_vv_unk); traced_div_vv_nvar: EMIT_SIMPLE_BLOCK_TEST(P_DIV_VV_DIV_VV_NVAR); - d1 = XREG(PREG->y_u.xxx.x2); + d1 = XREG(PREG->u.xxx.x2); /* next check A2 */ profiled_deref_head_TEST(d1, traced_div_vv_nvar_unk); traced_div_vv_nvar_nvar: @@ -9943,7 +9943,7 @@ TRACED_FAIL(); } } - XREG(PREG->y_u.xxx.x) = d0; + XREG(PREG->u.xxx.x) = d0; PREG = NEXTOP(PREG, xxx); GONext(); @@ -9973,7 +9973,7 @@ EMIT_ENTRY_BLOCK(PREG,P_DIV_VC_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); + d0 = XREG(PREG->u.xxn.xi); /* first check pt1 */ deref_head(d0, traced_div_vc_unk); traced_div_vc_nvar: @@ -9981,7 +9981,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_DIV_VC_DIV_VC_NVAR); ///#endif - Int d1 = PREG->y_u.xxn.c; + Int d1 = PREG->u.xxn.c; if (IsIntTerm(d0)) { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_DIV_VC_INTTERM); @@ -10009,7 +10009,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_DIV_VC_NVAR_END); ///#endif - XREG(PREG->y_u.xxn.x) = d0; + XREG(PREG->u.xxn.x) = d0; PREG = NEXTOP(PREG, xxn); GONext(); @@ -10031,7 +10031,7 @@ EMIT_ENTRY_BLOCK(PREG,P_DIV_CV_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); + d0 = XREG(PREG->u.xxn.xi); /* first check pt1 */ deref_head(d0, traced_div_cv_unk); traced_div_cv_nvar: @@ -10039,7 +10039,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_DIV_CV_DIV_CV_NVAR); ///#endif - Int d1 = PREG->y_u.xxn.c; + Int d1 = PREG->u.xxn.c; if (IsIntTerm(d0)) { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_DIV_CV_INTTERM_INIT); @@ -10079,7 +10079,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_DIV_CV_NVAR_END); ///#endif - XREG(PREG->y_u.xxn.x) = d0; + XREG(PREG->u.xxn.x) = d0; PREG = NEXTOP(PREG, xxn); GONext(); @@ -10089,7 +10089,7 @@ EMIT_SIMPLE_BLOCK(P_DIV_CV_DIV_CV_UNK); ///#endif saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "// A", PREG->y_u.xxn.c); + Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "// A", PREG->u.xxn.c); setregs(); TRACED_FAIL(); ENDP(pt0); @@ -10102,14 +10102,14 @@ ///#endif BEGD(d0); BEGD(d1); - d0 = XREG(PREG->y_u.yxx.x1); + d0 = XREG(PREG->u.yxx.x1); /* first check pt1 */ deref_head(d0, traced_div_y_vv_unk); traced_div_y_vv_nvar: ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_DIV_Y_VV_DIV_Y_VV_NVAR); ///#endif - d1 = XREG(PREG->y_u.xxx.x2); + d1 = XREG(PREG->u.xxx.x2); /* next check A2 */ deref_head(d1, traced_div_y_vv_nvar_unk); traced_div_y_vv_nvar_nvar: @@ -10154,7 +10154,7 @@ EMIT_SIMPLE_BLOCK(P_DIV_Y_VV_NVAR_END); ///#endif BEGP(pt0); - pt0 = YREG + PREG->y_u.yxx.y; + pt0 = YREG + PREG->u.yxx.y; PREG = NEXTOP(PREG, yxx); INITIALIZE_PERMVAR(pt0,d0); ENDP(pt0); @@ -10190,7 +10190,7 @@ EMIT_ENTRY_BLOCK(PREG,P_DIV_Y_VC_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); + d0 = XREG(PREG->u.yxn.xi); /* first check pt1 */ deref_head(d0, traced_div_y_vc_unk); traced_div_y_vc_nvar: @@ -10198,7 +10198,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_DIV_Y_VC_DIV_Y_VC_NVAR); ///#endif - Int d1 = PREG->y_u.yxn.c; + Int d1 = PREG->u.yxn.c; if (IsIntTerm(d0)) { //#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_DIV_Y_VC_INTTERM); @@ -10227,7 +10227,7 @@ EMIT_SIMPLE_BLOCK(P_DIV_Y_VC_NVAR_END); ///#endif BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; + pt0 = YREG + PREG->u.yxn.y; PREG = NEXTOP(PREG, yxn); INITIALIZE_PERMVAR(pt0,d0); ENDP(pt0); @@ -10251,7 +10251,7 @@ EMIT_ENTRY_BLOCK(PREG,P_DIV_Y_CV_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); + d0 = XREG(PREG->u.yxn.xi); /* first check pt1 */ deref_head(d0, traced_div_y_cv_unk); traced_div_y_cv_nvar: @@ -10259,7 +10259,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_DIV_Y_CV_DIV_Y_CV_NVAR); ///#endif - Int d1 = PREG->y_u.yxn.c; + Int d1 = PREG->u.yxn.c; if (IsIntTerm(d0)) { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_DIV_Y_CV_INTTERM_INIT); @@ -10301,7 +10301,7 @@ EMIT_SIMPLE_BLOCK(P_DIV_Y_CV_NVAR_END); ///#endif BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; + pt0 = YREG + PREG->u.yxn.y; PREG = NEXTOP(PREG, yxn); INITIALIZE_PERMVAR(pt0,d0); ENDP(pt0); @@ -10313,7 +10313,7 @@ EMIT_SIMPLE_BLOCK(P_DIV_Y_CV_DIV_Y_CV_UNK); ///#endif saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "// A", PREG->y_u.yxn.c); + Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "// A", PREG->u.yxn.c); setregs(); TRACED_FAIL(); ENDP(pt0); @@ -10325,12 +10325,12 @@ EMIT_ENTRY_BLOCK(PREG,P_AND_VV_INSTINIT); BEGD(d0); BEGD(d1); - d0 = XREG(PREG->y_u.xxx.x1); + d0 = XREG(PREG->u.xxx.x1); /* first check pt1 */ profiled_deref_head_TEST(d0, traced_and_vv_unk); traced_and_vv_nvar: EMIT_SIMPLE_BLOCK_TEST(P_AND_VV_AND_VV_NVAR); - d1 = XREG(PREG->y_u.xxx.x2); + d1 = XREG(PREG->u.xxx.x2); /* next check A2 */ profiled_deref_head_TEST(d1, traced_and_vv_nvar_unk); traced_and_vv_nvar_nvar: @@ -10353,7 +10353,7 @@ TRACED_FAIL(); } } - XREG(PREG->y_u.xxx.x) = d0; + XREG(PREG->u.xxx.x) = d0; PREG = NEXTOP(PREG, xxx); GONext(); @@ -10381,12 +10381,12 @@ Op(traced_p_and_vc, xxn); EMIT_ENTRY_BLOCK(PREG,P_AND_VC_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); + d0 = XREG(PREG->u.xxn.xi); /* first check pt1 */ profiled_deref_head_TEST(d0, traced_and_vc_unk); traced_and_vc_nvar: { - Int d1 = PREG->y_u.xxn.c; + Int d1 = PREG->u.xxn.c; if (IsIntTerm(d0)) { EMIT_CONDITIONAL_SUCCESS("IsIntTerm(d0)"); EMIT_SIMPLE_BLOCK_TEST(P_AND_VC_AND_VC_NVAR_INT); @@ -10406,7 +10406,7 @@ } } } - XREG(PREG->y_u.xxn.x) = d0; + XREG(PREG->u.xxn.x) = d0; PREG = NEXTOP(PREG, xxn); GONext(); @@ -10414,7 +10414,7 @@ profiled_deref_body(d0, pt0, traced_and_vc_unk, traced_and_vc_nvar); EMIT_SIMPLE_BLOCK_TEST(P_AND_VC_AND_VC_UNK); saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A /\\ " Int_FORMAT , PREG->y_u.xxn.c); + Yap_NilError(INSTANTIATION_ERROR, "X is A /\\ " Int_FORMAT , PREG->u.xxn.c); setregs(); TRACED_FAIL(); ENDP(pt0); @@ -10427,14 +10427,14 @@ ///#endif BEGD(d0); BEGD(d1); - d0 = XREG(PREG->y_u.yxx.x1); + d0 = XREG(PREG->u.yxx.x1); /* first check pt1 */ deref_head(d0, traced_and_y_vv_unk); traced_and_y_vv_nvar: ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_AND_Y_VV_AND_Y_VV_NVAR); ///#endif - d1 = XREG(PREG->y_u.xxx.x2); + d1 = XREG(PREG->u.xxx.x2); /* next check A2 */ deref_head(d1, traced_and_y_vv_nvar_unk); traced_and_y_vv_nvar_nvar: @@ -10466,7 +10466,7 @@ EMIT_SIMPLE_BLOCK(P_AND_Y_VV_NVAR_END); ///#endif BEGP(pt0); - pt0 = YREG + PREG->y_u.yxx.y; + pt0 = YREG + PREG->u.yxx.y; PREG = NEXTOP(PREG, yxx); INITIALIZE_PERMVAR(pt0,d0); ENDP(pt0); @@ -10502,7 +10502,7 @@ EMIT_ENTRY_BLOCK(PREG,P_AND_Y_VC_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); + d0 = XREG(PREG->u.yxn.xi); /* first check pt1 */ deref_head(d0, traced_and_y_vc_unk); traced_and_y_vc_nvar: @@ -10510,7 +10510,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_AND_Y_VC_AND_Y_VC_NVAR); ///#endif - Int d1 = PREG->y_u.yxn.c; + Int d1 = PREG->u.yxn.c; if (IsIntTerm(d0)) { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_AND_Y_VC_INTTERM); @@ -10539,7 +10539,7 @@ EMIT_SIMPLE_BLOCK(P_AND_Y_VC_NVAR_END); ///#endif BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; + pt0 = YREG + PREG->u.yxn.y; PREG = NEXTOP(PREG, yxn); INITIALIZE_PERMVAR(pt0,d0); ENDP(pt0); @@ -10551,7 +10551,7 @@ EMIT_SIMPLE_BLOCK(P_AND_Y_VC_AND_Y_VC_UNK); ///#endif saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A /\\ " Int_FORMAT , PREG->y_u.yxn.c); + Yap_NilError(INSTANTIATION_ERROR, "X is A /\\ " Int_FORMAT , PREG->u.yxn.c); setregs(); TRACED_FAIL(); ENDP(pt0); @@ -10565,14 +10565,14 @@ ///#endif BEGD(d0); BEGD(d1); - d0 = XREG(PREG->y_u.xxx.x1); + d0 = XREG(PREG->u.xxx.x1); /* first check pt1 */ deref_head(d0, traced_or_vv_unk); traced_or_vv_nvar: ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_OR_VV_OR_VV_NVAR); ///#endif - d1 = XREG(PREG->y_u.xxx.x2); + d1 = XREG(PREG->u.xxx.x2); /* next check A2 */ deref_head(d1, traced_or_vv_nvar_unk); traced_or_vv_nvar_nvar: @@ -10603,7 +10603,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_OR_VV_NVAR_END); ///#endif - XREG(PREG->y_u.xxx.x) = d0; + XREG(PREG->u.xxx.x) = d0; PREG = NEXTOP(PREG, xxx); GONext(); @@ -10637,7 +10637,7 @@ EMIT_ENTRY_BLOCK(PREG,P_OR_VC_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); + d0 = XREG(PREG->u.xxn.xi); /* first check pt1 */ deref_head(d0, traced_or_vc_unk); traced_or_vc_nvar: @@ -10645,7 +10645,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_OR_VC_OR_VC_NVAR); ///#endif - Int d1 = PREG->y_u.xxn.c; + Int d1 = PREG->u.xxn.c; if (IsIntTerm(d0)) { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_OR_VC_INTTERM); @@ -10672,7 +10672,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_OR_VC_NVAR_END); ///#endif - XREG(PREG->y_u.xxn.x) = d0; + XREG(PREG->u.xxn.x) = d0; PREG = NEXTOP(PREG, xxn); GONext(); @@ -10682,7 +10682,7 @@ EMIT_SIMPLE_BLOCK(P_OR_VC_OR_VC_UNK); ///#endif saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A \\/ " Int_FORMAT , PREG->y_u.xxn.c); + Yap_NilError(INSTANTIATION_ERROR, "X is A \\/ " Int_FORMAT , PREG->u.xxn.c); setregs(); TRACED_FAIL(); ENDP(pt0); @@ -10695,14 +10695,14 @@ ///#endif BEGD(d0); BEGD(d1); - d0 = XREG(PREG->y_u.yxx.x1); + d0 = XREG(PREG->u.yxx.x1); /* first check pt1 */ deref_head(d0, traced_or_y_vv_unk); traced_or_y_vv_nvar: ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_OR_Y_VV_OR_Y_VV_NVAR); ///#endif - d1 = XREG(PREG->y_u.xxx.x2); + d1 = XREG(PREG->u.xxx.x2); /* next check A2 */ deref_head(d1, traced_or_y_vv_nvar_unk); traced_or_y_vv_nvar_nvar: @@ -10734,7 +10734,7 @@ EMIT_SIMPLE_BLOCK(P_OR_Y_VV_NVAR_END); ///#endif BEGP(pt0); - pt0 = YREG + PREG->y_u.yxx.y; + pt0 = YREG + PREG->u.yxx.y; PREG = NEXTOP(PREG, yxx); INITIALIZE_PERMVAR(pt0,d0); ENDP(pt0); @@ -10770,7 +10770,7 @@ EMIT_ENTRY_BLOCK(PREG,P_OR_Y_VC_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); + d0 = XREG(PREG->u.yxn.xi); /* first check pt1 */ deref_head(d0, traced_or_y_vc_unk); traced_or_y_vc_nvar: @@ -10778,7 +10778,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_OR_Y_VC_OR_Y_VC_NVAR); ///#endif - Int d1 = PREG->y_u.yxn.c; + Int d1 = PREG->u.yxn.c; if (IsIntTerm(d0)) { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_OR_Y_VC_INTTERM); @@ -10807,7 +10807,7 @@ EMIT_SIMPLE_BLOCK(P_OR_Y_VC_NVAR_END); ///#endif BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; + pt0 = YREG + PREG->u.yxn.y; PREG = NEXTOP(PREG, yxn); INITIALIZE_PERMVAR(pt0,d0); ENDP(pt0); @@ -10819,7 +10819,7 @@ EMIT_SIMPLE_BLOCK(P_OR_Y_VC_OR_Y_VC_UNK); ///#endif saveregs(); - Yap_NilError(INSTANTIATION_ERROR, "X is A \\/ " Int_FORMAT , PREG->y_u.yxn.c); + Yap_NilError(INSTANTIATION_ERROR, "X is A \\/ " Int_FORMAT , PREG->u.yxn.c); setregs(); TRACED_FAIL(); ENDP(pt0); @@ -10832,14 +10832,14 @@ ///#endif BEGD(d0); BEGD(d1); - d0 = XREG(PREG->y_u.xxx.x1); + d0 = XREG(PREG->u.xxx.x1); /* first check pt1 */ deref_head(d0, traced_sll_vv_unk); traced_sll_vv_nvar: ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_SLL_VV_SLL_VV_NVAR); ///#endif - d1 = XREG(PREG->y_u.xxx.x2); + d1 = XREG(PREG->u.xxx.x2); /* next check A2 */ deref_head(d1, traced_sll_vv_nvar_unk); traced_sll_vv_nvar_nvar: @@ -10881,7 +10881,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_SLL_VV_NVAR_END); ///#endif - XREG(PREG->y_u.xxx.x) = d0; + XREG(PREG->u.xxx.x) = d0; PREG = NEXTOP(PREG, xxx); GONext(); @@ -10915,7 +10915,7 @@ EMIT_ENTRY_BLOCK(PREG,P_SLL_VC_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); + d0 = XREG(PREG->u.xxn.xi); /* first check pt1 */ deref_head(d0, traced_sll_vc_unk); traced_sll_vc_nvar: @@ -10923,7 +10923,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_SLL_VC_SLL_VC_NVAR); ///#endif - Int d1 = PREG->y_u.xxn.c; + Int d1 = PREG->u.xxn.c; if (IsIntTerm(d0)) { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_SLL_VC_INTTERM); @@ -10951,7 +10951,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_SLL_VC_NVAR_END); ///#endif - XREG(PREG->y_u.xxn.x) = d0; + XREG(PREG->u.xxn.x) = d0; PREG = NEXTOP(PREG, xxn); GONext(); @@ -10971,12 +10971,12 @@ Op(traced_p_sll_cv, xxn); EMIT_ENTRY_BLOCK(PREG,P_SLL_CV_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); + d0 = XREG(PREG->u.xxn.xi); /* first check pt1 */ profiled_deref_head_TEST(d0, traced_sll_cv_unk); traced_sll_cv_nvar: { - Int d1 = PREG->y_u.xxn.c; + Int d1 = PREG->u.xxn.c; if (IsIntTerm(d0)) { EMIT_CONDITIONAL_SUCCESS("IsIntTerm(d0)"); EMIT_SIMPLE_BLOCK_TEST(P_SLL_CV_SLL_CV_NVAR_INT); @@ -11000,7 +11000,7 @@ setregs(); TRACED_FAIL(); } - XREG(PREG->y_u.xxn.x) = d0; + XREG(PREG->u.xxn.x) = d0; PREG = NEXTOP(PREG, xxn); GONext(); @@ -11021,14 +11021,14 @@ ///#endif BEGD(d0); BEGD(d1); - d0 = XREG(PREG->y_u.yxx.x1); + d0 = XREG(PREG->u.yxx.x1); /* first check pt1 */ deref_head(d0, traced_sll_y_vv_unk); traced_sll_y_vv_nvar: ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_SLL_Y_VV_SLL_Y_VV_NVAR); ///#endif - d1 = XREG(PREG->y_u.xxx.x2); + d1 = XREG(PREG->u.xxx.x2); /* next check A2 */ deref_head(d1, traced_sll_y_vv_nvar_unk); traced_sll_y_vv_nvar_nvar: @@ -11070,7 +11070,7 @@ EMIT_SIMPLE_BLOCK(P_SLL_Y_VV_NVAR_END); ///#endif BEGP(pt0); - pt0 = YREG + PREG->y_u.yxx.y; + pt0 = YREG + PREG->u.yxx.y; PREG = NEXTOP(PREG, yxx); INITIALIZE_PERMVAR(pt0,d0); ENDP(pt0); @@ -11106,7 +11106,7 @@ EMIT_ENTRY_BLOCK(PREG,P_SLL_Y_VC_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); + d0 = XREG(PREG->u.yxn.xi); /* first check pt1 */ deref_head(d0, traced_sll_y_vc_unk); traced_sll_y_vc_nvar: @@ -11114,7 +11114,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_SLL_Y_VC_SLL_Y_VC_NVAR); ///#endif - Int d1 = PREG->y_u.yxn.c; + Int d1 = PREG->u.yxn.c; if (IsIntTerm(d0)) { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_SLL_Y_VC_INTTERM); @@ -11143,7 +11143,7 @@ EMIT_SIMPLE_BLOCK(P_SLL_Y_VC_NVAR_END); ///#endif BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; + pt0 = YREG + PREG->u.yxn.y; PREG = NEXTOP(PREG, yxn); INITIALIZE_PERMVAR(pt0,d0); ENDP(pt0); @@ -11168,7 +11168,7 @@ EMIT_ENTRY_BLOCK(PREG,P_SLL_Y_CV_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); + d0 = XREG(PREG->u.yxn.xi); /* first check pt1 */ deref_head(d0, traced_sll_y_cv_unk); traced_sll_y_cv_nvar: @@ -11176,7 +11176,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_SLL_Y_CV_SLL_Y_CV_NVAR); ///#endif - Int d1 = PREG->y_u.yxn.c; + Int d1 = PREG->u.yxn.c; if (IsIntTerm(d0)) { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_SLL_Y_CV_INTTERM_INIT); @@ -11215,7 +11215,7 @@ EMIT_SIMPLE_BLOCK(P_SLL_Y_CV_NVAR_END); ///#endif BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; + pt0 = YREG + PREG->u.yxn.y; PREG = NEXTOP(PREG, yxn); INITIALIZE_PERMVAR(pt0,d0); ENDP(pt0); @@ -11240,14 +11240,14 @@ ///#endif BEGD(d0); BEGD(d1); - d0 = XREG(PREG->y_u.xxx.x1); + d0 = XREG(PREG->u.xxx.x1); /* first check pt1 */ deref_head(d0, traced_slr_vv_unk); traced_slr_vv_nvar: ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_SLR_VV_SLR_VV_NVAR); ///#endif - d1 = XREG(PREG->y_u.xxx.x2); + d1 = XREG(PREG->u.xxx.x2); /* next check A2 */ deref_head(d1, traced_slr_vv_nvar_unk); traced_slr_vv_nvar_nvar: @@ -11288,7 +11288,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_SLR_VV_NVAR_END); ///#endif - XREG(PREG->y_u.xxx.x) = d0; + XREG(PREG->u.xxx.x) = d0; PREG = NEXTOP(PREG, xxx); GONext(); @@ -11320,12 +11320,12 @@ Op(traced_p_slr_vc, xxn); EMIT_ENTRY_BLOCK(PREG,P_SLR_VC_INSTINIT); BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); + d0 = XREG(PREG->u.xxn.xi); /* first check pt1 */ profiled_deref_head_TEST(d0, traced_slr_vc_unk); traced_slr_vc_nvar: { - Int d1 = PREG->y_u.xxn.c; + Int d1 = PREG->u.xxn.c; if (IsIntTerm(d0)) { EMIT_CONDITIONAL_SUCCESS("IsIntTerm(d0)"); EMIT_SIMPLE_BLOCK_TEST(P_SLR_VC_SLR_VC_NVAR_INT); @@ -11345,7 +11345,7 @@ } } } - XREG(PREG->y_u.xxn.x) = d0; + XREG(PREG->u.xxn.x) = d0; PREG = NEXTOP(PREG, xxn); GONext(); @@ -11365,7 +11365,7 @@ EMIT_ENTRY_BLOCK(PREG,P_SLR_CV_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); + d0 = XREG(PREG->u.xxn.xi); /* first check pt1 */ deref_head(d0, traced_slr_cv_unk); traced_slr_cv_nvar: @@ -11373,7 +11373,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_SLR_CV_SLR_CV_NVAR); ///#endif - Int d1 = PREG->y_u.xxn.c; + Int d1 = PREG->u.xxn.c; if (IsIntTerm(d0)) { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_SLR_CV_INTTERM_INIT); @@ -11411,7 +11411,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_SLR_CV_NVAR_END); ///#endif - XREG(PREG->y_u.xxn.x) = d0; + XREG(PREG->u.xxn.x) = d0; PREG = NEXTOP(PREG, xxn); GONext(); @@ -11434,14 +11434,14 @@ ///#endif BEGD(d0); BEGD(d1); - d0 = XREG(PREG->y_u.yxx.x1); + d0 = XREG(PREG->u.yxx.x1); /* first check pt1 */ deref_head(d0, traced_slr_y_vv_unk); traced_slr_y_vv_nvar: ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_SLR_Y_VV_SLR_Y_VV_NVAR); ///#endif - d1 = XREG(PREG->y_u.xxx.x2); + d1 = XREG(PREG->u.xxx.x2); /* next check A2 */ deref_head(d1, traced_slr_y_vv_nvar_unk); traced_slr_y_vv_nvar_nvar: @@ -11483,7 +11483,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_SLR_Y_VV_NVAR_END); ///#endif - pt0 = YREG + PREG->y_u.yxx.y; + pt0 = YREG + PREG->u.yxx.y; PREG = NEXTOP(PREG, yxx); INITIALIZE_PERMVAR(pt0,d0); ENDP(pt0); @@ -11519,7 +11519,7 @@ EMIT_ENTRY_BLOCK(PREG,P_SLR_Y_VC_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); + d0 = XREG(PREG->u.yxn.xi); /* first check pt1 */ deref_head(d0, traced_slr_y_vc_unk); traced_slr_y_vc_nvar: @@ -11527,7 +11527,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_SLR_Y_VC_SLR_Y_VC_NVAR); ///#endif - Int d1 = PREG->y_u.yxn.c; + Int d1 = PREG->u.yxn.c; if (IsIntTerm(d0)) { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_SLR_Y_VC_INTTERM); @@ -11556,7 +11556,7 @@ EMIT_SIMPLE_BLOCK(P_SLR_Y_VC_NVAR_END); ///#endif BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; + pt0 = YREG + PREG->u.yxn.y; PREG = NEXTOP(PREG, yxn); INITIALIZE_PERMVAR(pt0,d0); ENDP(pt0); @@ -11579,7 +11579,7 @@ EMIT_ENTRY_BLOCK(PREG,P_SLR_Y_CV_INSTINIT); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); + d0 = XREG(PREG->u.yxn.xi); /* first check pt1 */ deref_head(d0, traced_slr_y_cv_unk); traced_slr_y_cv_nvar: @@ -11587,7 +11587,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_SLR_Y_CV_SLR_Y_CV_NVAR); ///#endif - Int d1 = PREG->y_u.yxn.c; + Int d1 = PREG->u.yxn.c; if (IsIntTerm(d0)) { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_SLR_Y_CV_INTTERM_INIT); @@ -11626,7 +11626,7 @@ EMIT_SIMPLE_BLOCK(P_SLR_Y_CV_NVAR_END); ///#endif BEGP(pt0); - pt0 = YREG + PREG->y_u.yxn.y; + pt0 = YREG + PREG->u.yxn.y; PREG = NEXTOP(PREG, yxn); INITIALIZE_PERMVAR(pt0,d0); ENDP(pt0); @@ -11649,10 +11649,10 @@ EMIT_ENTRY_BLOCK(PREG,CALL_BFUNC_XX_INSTINIT); BEGD(d0); BEGD(d1); - d0 = XREG(PREG->y_u.plxxs.x1); + d0 = XREG(PREG->u.plxxs.x1); traced_call_bfunc_xx_nvar: EMIT_SIMPLE_BLOCK_TEST(CALL_BFUNC_XX_CALL_BFUNC_XX_NVAR); - d1 = XREG(PREG->y_u.plxxs.x2); + d1 = XREG(PREG->u.plxxs.x2); traced_call_bfunc_xx2_nvar: profiled_deref_head_TEST(d0, traced_call_bfunc_xx_unk); profiled_deref_head_TEST(d1, traced_call_bfunc_xx2_unk); @@ -11662,7 +11662,7 @@ COUNT flags; Int v = IntOfTerm(d0) - IntOfTerm(d1); - flags = PREG->y_u.plxxs.flags; + flags = PREG->u.plxxs.flags; if (v > 0) { if (flags & GT_OK_IN_CMP) { yamop *nextp = NEXTOP(PREG, plxxs); @@ -11672,7 +11672,7 @@ ALWAYS_END_PREFETCH(); } else { - yamop *nextp = PREG->y_u.plxxs.f; + yamop *nextp = PREG->u.plxxs.f; ALWAYS_LOOKAHEAD(nextp->opc); PREG = nextp; ALWAYS_GONext(); @@ -11688,7 +11688,7 @@ ALWAYS_END_PREFETCH(); } else { - yamop *nextp = PREG->y_u.plxxs.f; + yamop *nextp = PREG->u.plxxs.f; ALWAYS_LOOKAHEAD(nextp->opc); PREG = nextp; ALWAYS_GONext(); @@ -11704,7 +11704,7 @@ ALWAYS_END_PREFETCH(); } else { - yamop *nextp = PREG->y_u.plxxs.f; + yamop *nextp = PREG->u.plxxs.f; ALWAYS_LOOKAHEAD(nextp->opc); PREG = nextp; ALWAYS_GONext(); @@ -11716,7 +11716,7 @@ EMIT_CONDITIONAL_FAIL("IsIntTerm(d0) && IsIntTerm(d1)"); EMIT_MULTIPLE_DESTINY_BLOCK_TEST(CALL_BFUNC_XX_CALL_BFUNC_XX2_NVAR_NOINT); { - CmpPredicate f = PREG->y_u.plxxs.p->cs.d_code; + CmpPredicate f = PREG->u.plxxs.p->cs.d_code; saveregs(); d0 = (CELL) (f) (d0,d1); setregs(); @@ -11725,7 +11725,7 @@ JMPNext(); } if (!d0) { - PREG = PREG->y_u.plxxs.f; + PREG = PREG->u.plxxs.f; JMPNext(); } PREG = NEXTOP(PREG, plxxs); @@ -11752,8 +11752,8 @@ BEGD(d0); BEGD(d1); BEGP(pt0); - pt0 = YREG + PREG->y_u.plxys.y; - d1 = XREG(PREG->y_u.plxys.x); + pt0 = YREG + PREG->u.plxys.y; + d1 = XREG(PREG->u.plxys.x); d0 = *pt0; ENDP(pt0); profiled_deref_head_TEST(d0, traced_call_bfunc_yx_unk); @@ -11766,13 +11766,13 @@ int flags; Int v = IntOfTerm(d0) - IntOfTerm(d1); - flags = PREG->y_u.plxys.flags; + flags = PREG->u.plxys.flags; if (v > 0) { if (flags & GT_OK_IN_CMP) { PREG = NEXTOP(PREG, plxys); JMPNext(); } else { - PREG = PREG->y_u.plxys.f; + PREG = PREG->u.plxys.f; JMPNext(); } } else if (v < 0) { @@ -11780,7 +11780,7 @@ PREG = NEXTOP(PREG, plxys); JMPNext(); } else { - PREG = PREG->y_u.plxys.f; + PREG = PREG->u.plxys.f; JMPNext(); } } else /* if (v == 0) */ { @@ -11788,7 +11788,7 @@ PREG = NEXTOP(PREG, plxys); JMPNext(); } else { - PREG = PREG->y_u.plxys.f; + PREG = PREG->u.plxys.f; JMPNext(); } } @@ -11797,14 +11797,14 @@ EMIT_CONDITIONAL_FAIL("IsIntTerm(d0) && IsIntTerm(d1)"); EMIT_MULTIPLE_DESTINY_BLOCK_TEST(CALL_BFUNC_YX_CALL_BFUNC_YX2_NVAR_NOINT); { - CmpPredicate f = PREG->y_u.plxys.p->cs.d_code; + CmpPredicate f = PREG->u.plxys.p->cs.d_code; saveregs(); d0 = (CELL) (f) (d0,d1); setregs(); } if (!d0 || PREG == FAILCODE) { if (PREG != FAILCODE) { - PREG = PREG->y_u.plxys.f; + PREG = PREG->u.plxys.f; } JMPNext(); } @@ -11832,8 +11832,8 @@ BEGD(d0); BEGD(d1); BEGP(pt0); - pt0 = YREG + PREG->y_u.plxys.y; - d0 = XREG(PREG->y_u.plxys.x); + pt0 = YREG + PREG->u.plxys.y; + d0 = XREG(PREG->u.plxys.x); d1 = *pt0; ENDP(pt0); profiled_deref_head_TEST(d0, traced_call_bfunc_xy_unk); @@ -11846,13 +11846,13 @@ int flags; Int v = IntOfTerm(d0) - IntOfTerm(d1); - flags = PREG->y_u.plxys.flags; + flags = PREG->u.plxys.flags; if (v > 0) { if (flags & GT_OK_IN_CMP) { PREG = NEXTOP(PREG, plxys); JMPNext(); } else { - PREG = PREG->y_u.plxys.f; + PREG = PREG->u.plxys.f; JMPNext(); } } else if (v < 0) { @@ -11860,7 +11860,7 @@ PREG = NEXTOP(PREG, plxys); JMPNext(); } else { - PREG = PREG->y_u.plxys.f; + PREG = PREG->u.plxys.f; JMPNext(); } } else /* if (v == 0) */ { @@ -11868,7 +11868,7 @@ PREG = NEXTOP(PREG, plxys); JMPNext(); } else { - PREG = PREG->y_u.plxys.f; + PREG = PREG->u.plxys.f; JMPNext(); } } @@ -11877,14 +11877,14 @@ EMIT_CONDITIONAL_FAIL("IsIntTerm(d0) && IsIntTerm(d1)"); EMIT_MULTIPLE_DESTINY_BLOCK_TEST(CALL_BFUNC_XY_CALL_BFUNC_XY2_NVAR_NOINT); { - CmpPredicate f = PREG->y_u.plxys.p->cs.d_code; + CmpPredicate f = PREG->u.plxys.p->cs.d_code; saveregs(); d0 = (CELL) (f) (d0,d1); setregs(); } if (!d0 || PREG == FAILCODE) { if (PREG != FAILCODE) { - PREG = PREG->y_u.plxys.f; + PREG = PREG->u.plxys.f; } JMPNext(); } @@ -11912,9 +11912,9 @@ BEGD(d0); BEGD(d1); BEGP(pt0); - pt0 = YREG + PREG->y_u.plyys.y1; + pt0 = YREG + PREG->u.plyys.y1; BEGP(pt1); - pt1 = YREG + PREG->y_u.plyys.y2; + pt1 = YREG + PREG->u.plyys.y2; d0 = *pt0; d1 = *pt1; ENDP(pt1); @@ -11929,13 +11929,13 @@ int flags; Int v = IntOfTerm(d0) - IntOfTerm(d1); - flags = PREG->y_u.plyys.flags; + flags = PREG->u.plyys.flags; if (v > 0) { if (flags & GT_OK_IN_CMP) { PREG = NEXTOP(PREG, plyys); JMPNext(); } else { - PREG = PREG->y_u.plyys.f; + PREG = PREG->u.plyys.f; JMPNext(); } } else if (v < 0) { @@ -11943,7 +11943,7 @@ PREG = NEXTOP(PREG, plyys); JMPNext(); } else { - PREG = PREG->y_u.plyys.f; + PREG = PREG->u.plyys.f; JMPNext(); } } else /* if (v == 0) */ { @@ -11951,7 +11951,7 @@ PREG = NEXTOP(PREG, plyys); JMPNext(); } else { - PREG = PREG->y_u.plyys.f; + PREG = PREG->u.plyys.f; JMPNext(); } } @@ -11960,14 +11960,14 @@ EMIT_CONDITIONAL_FAIL("IsIntTerm(d0) && IsIntTerm(d1)"); EMIT_MULTIPLE_DESTINY_BLOCK_TEST(CALL_BFUNC_YY_CALL_BFUNC_YY2_NVAR_NOINT); { - CmpPredicate f = PREG->y_u.plyys.p->cs.d_code; + CmpPredicate f = PREG->u.plyys.p->cs.d_code; saveregs(); d0 = (CELL) (f) (d0,d1); setregs(); } if (!d0 || PREG == FAILCODE) { if (PREG != FAILCODE) { - PREG = PREG->y_u.plyys.f; + PREG = PREG->u.plyys.f; } JMPNext(); } @@ -12023,7 +12023,7 @@ /* both arguments are bound */ EMIT_MULTIPLE_DESTINY_BLOCK_TEST(P_DIF_DIF_NVAR1_NVAR2); if (d0 == d1) { - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; GONext(); } if (IsAtomOrIntTerm(d0) || IsAtomOrIntTerm(d1)) { @@ -12048,7 +12048,7 @@ pt0 = TR; BEGCHO(pt1); pt1 = B; - /* make B and HB point to HR to guarantee all bindings will + /* make B and HRB point to HR to guarantee all bindings will * be trailed */ HBREG = HR; @@ -12068,7 +12068,7 @@ B = pt1; SET_BB(PROTECT_FROZEN_B(pt1)); #ifdef COROUTINING - HR = HBREG; + H = HRBREG; #endif HBREG = B->cp_h; /* untrail all bindings made by Yap_IUnify */ @@ -12104,11 +12104,11 @@ ENDD(d1); } if (opresult) { - /* restore B, no need to restore HB */ - PREG = PREG->y_u.l.l; + /* restore B, no need to restore HRB */ + PREG = PREG->u.l.l; GONext(); } - /* restore B, and later HB */ + /* restore B, and later HRB */ PREG = NEXTOP(PREG, l); ENDCHO(pt1); } @@ -12119,7 +12119,7 @@ EMIT_SIMPLE_BLOCK_TEST(P_DIF_DIF_UNK1); ENDP(pt0); /* first argument is unbound */ - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; GONext(); BEGP(pt0); @@ -12127,7 +12127,7 @@ EMIT_SIMPLE_BLOCK_TEST(P_DIF_DIF_NVAR1_UNK2); ENDP(pt0); /* second argument is unbound */ - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; GONext(); ENDD(d1); ENDD(d0); @@ -12160,14 +12160,14 @@ } if (IsPairTerm(d0)) { if (!IsPairTerm(d1)) { - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; GONext(); } BEGD(d2); always_save_pc(); d2 = iequ_complex(RepPair(d0)-1, RepPair(d0)+1,RepPair(d1)-1); if (d2 == FALSE) { - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; GONext(); } ENDD(d2); @@ -12181,7 +12181,7 @@ /* f1 must be a compound term, even if it is a suspension */ if (!IsApplTerm(d1)) { - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; GONext(); } f1 = FunctorOfTerm(d1); @@ -12195,35 +12195,35 @@ PREG = NEXTOP(PREG, l); GONext(); } - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; GONext(); case (CELL)FunctorLongInt: if (f1 != FunctorLongInt) { - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; GONext(); } if (LongIntOfTerm(d0) == LongIntOfTerm(d1)) { PREG = NEXTOP(PREG, l); GONext(); } - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; GONext(); #ifdef USE_GMP case (CELL)FunctorBigInt: if (f1 != FunctorBigInt) { - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; GONext(); } if (Yap_gmp_tcmp_big_big(d0,d1) == 0) { PREG = NEXTOP(PREG, l); GONext(); } - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; GONext(); #endif case (CELL)FunctorDouble: if (f1 != FunctorDouble) { - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; GONext(); } if (FloatOfTerm(d0) == FloatOfTerm(d1)) { @@ -12231,19 +12231,19 @@ GONext(); } default: - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; GONext(); } } if (f0 != f1) { - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; GONext(); } always_save_pc(); BEGD(d2); d2 = iequ_complex(RepAppl(d0), RepAppl(d0)+ArityOfFunctor(f0), RepAppl(d1)); if (d2 == FALSE) { - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; GONext(); } ENDD(d2); @@ -12251,7 +12251,7 @@ PREG = NEXTOP(PREG, l); GONext(); } - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; GONext(); BEGP(pt0); @@ -12262,7 +12262,7 @@ /* second argument is unbound */ /* I don't need to worry about co-routining because an unbound variable may never be == to a constrained variable!! */ - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; GONext(); ENDD(d1); @@ -12276,7 +12276,7 @@ /* I don't need to worry about co-routining because an unbound variable may never be == to a constrained variable!! */ EMIT_SIMPLE_BLOCK_TEST(P_EQ_P_EQ_VAR1_NVAR2); - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; GONext(); BEGP(pt1); @@ -12285,7 +12285,7 @@ /* second argument is unbound */ EMIT_MULTIPLE_DESTINY_BLOCK_TEST(P_EQ_P_EQ_VAR1_UNK2_END); if (pt1 != pt0) { - PREG = PREG->y_u.l.l; + PREG = PREG->u.l.l; GONext(); } PREG = NEXTOP(PREG, l); @@ -12302,15 +12302,15 @@ #ifdef LOW_LEVEL_TRACER if (Yap_do_low_level_trace) { EMIT_SIMPLE_BLOCK(P_ARG_VV_LOW_LEVEL_TRACER); - HR[0] = XREG(PREG->y_u.xxx.x1); - HR[1] = XREG(PREG->y_u.xxx.x2); + H[0] = XREG(PREG->u.xxx.x1); + H[1] = XREG(PREG->u.xxx.x2); RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorArg,0)),HR); + low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorArg,0)),H); } #endif /* LOW_LEVEL_TRACE */ EMIT_SIMPLE_BLOCK_TEST(P_ARG_VV_TEST_D0); BEGD(d0); - d0 = XREG(PREG->y_u.xxx.x1); + d0 = XREG(PREG->u.xxx.x1); profiled_deref_head_TEST(d0, traced_arg_arg1_unk); traced_arg_arg1_nvar: /* ARG1 is ok! */ @@ -12329,7 +12329,7 @@ /* d0 now got the argument we want */ EMIT_SIMPLE_BLOCK_TEST(P_ARG_VV_TEST_D1); BEGD(d1); - d1 = XREG(PREG->y_u.xxx.x2); + d1 = XREG(PREG->u.xxx.x2); profiled_deref_head_TEST(d1, traced_arg_arg2_unk); traced_arg_arg2_nvar: /* d1 now got the structure we want to fetch the argument @@ -12354,7 +12354,7 @@ */ TRACED_FAIL(); } - XREG(PREG->y_u.xxx.x) = pt0[d0]; + XREG(PREG->u.xxx.x) = pt0[d0]; PREG = NEXTOP(PREG, xxx); GONext(); ENDP(pt0); @@ -12371,7 +12371,7 @@ } TRACED_FAIL(); } - XREG(PREG->y_u.xxx.x) = pt0[d0-1]; + XREG(PREG->u.xxx.x) = pt0[d0-1]; PREG = NEXTOP(PREG, xxx); GONext(); ENDP(pt0); @@ -12413,20 +12413,20 @@ if (Yap_do_low_level_trace) { EMIT_SIMPLE_BLOCK_TEST(P_ARG_CV_LOW_LEVEL_TRACER); CELL *Ho = HR; - Term t = MkIntegerTerm(PREG->y_u.xxn.c); - HR[0] = t; - HR[1] = XREG(PREG->y_u.xxn.xi); + Term t = MkIntegerTerm(PREG->u.xxn.c); + H[0] = t; + H[1] = XREG(PREG->u.xxn.xi); RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorArg,0)),HR); - HR = Ho; + low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorArg,0)),H); + H = HRo; } #endif /* LOW_LEVEL_TRACE */ EMIT_SIMPLE_BLOCK_TEST(P_ARG_CV_TEST_D1); BEGD(d0); - d0 = PREG->y_u.xxn.c; + d0 = PREG->u.xxn.c; /* d0 now got the argument we want */ BEGD(d1); - d1 = XREG(PREG->y_u.xxn.xi); + d1 = XREG(PREG->u.xxn.xi); profiled_deref_head_TEST(d1, traced_arg_arg2_vc_unk); traced_arg_arg2_vc_nvar: EMIT_MULTIPLE_DESTINY_BLOCK_TEST(P_ARG_CV_ARG_ARG2_VC_NVAR); @@ -12451,7 +12451,7 @@ */ TRACED_FAIL(); } - XREG(PREG->y_u.xxn.x) = pt0[d0]; + XREG(PREG->u.xxn.x) = pt0[d0]; PREG = NEXTOP(PREG, xxn); GONext(); ENDP(pt0); @@ -12468,7 +12468,7 @@ } TRACED_FAIL(); } - XREG(PREG->y_u.xxn.x) = pt0[d0-1]; + XREG(PREG->u.xxn.x) = pt0[d0-1]; PREG = NEXTOP(PREG, xxn); GONext(); ENDP(pt0); @@ -12501,16 +12501,16 @@ #ifdef LOW_LEVEL_TRACER if (Yap_do_low_level_trace) { EMIT_SIMPLE_BLOCK_TEST(P_ARG_Y_VV_LOW_LEVEL_TRACER); - HR[0] = XREG(PREG->y_u.yxx.x1); - HR[1] = XREG(PREG->y_u.yxx.x2); - HR[2] = YREG[PREG->y_u.yxx.y]; + H[0] = XREG(PREG->u.yxx.x1); + H[1] = XREG(PREG->u.yxx.x2); + H[2] = YREG[PREG->u.yxx.y]; RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorArg,0)),HR); + low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorArg,0)),H); } #endif /* LOW_LEVEL_TRACE */ EMIT_SIMPLE_BLOCK_TEST(P_ARG_Y_VV_TEST_D0); BEGD(d0); - d0 = XREG(PREG->y_u.yxx.x1); + d0 = XREG(PREG->u.yxx.x1); profiled_deref_head_TEST(d0, traced_arg_y_arg1_unk); traced_arg_y_arg1_nvar: EMIT_SIMPLE_BLOCK_TEST(P_ARG_Y_VV_ARG_Y_ARG1_NVAR); @@ -12529,7 +12529,7 @@ /* d0 now got the argument we want */ EMIT_SIMPLE_BLOCK_TEST(P_ARG_Y_VV_TEST_D1); BEGD(d1); - d1 = XREG(PREG->y_u.yxx.x2); + d1 = XREG(PREG->u.yxx.x2); profiled_deref_head_TEST(d1, traced_arg_y_arg2_unk); traced_arg_y_arg2_nvar: /* d1 now got the structure we want to fetch the argument @@ -12555,7 +12555,7 @@ TRACED_FAIL(); } BEGP(pt1); - pt1 = YREG + PREG->y_u.yxx.y; + pt1 = YREG + PREG->u.yxx.y; PREG = NEXTOP(PREG, yxx); INITIALIZE_PERMVAR(pt1,pt0[d0]); ENDP(pt1); @@ -12575,7 +12575,7 @@ TRACED_FAIL(); } BEGP(pt1); - pt1 = YREG + PREG->y_u.yxx.y; + pt1 = YREG + PREG->u.yxx.y; PREG = NEXTOP(PREG, yxx); INITIALIZE_PERMVAR(pt1,pt0[d0-1]); GONext(); @@ -12623,23 +12623,23 @@ EMIT_SIMPLE_BLOCK(P_ARG_Y_CV_LOW_LEVEL_TRACER); ///#endif CELL *Ho = HR; - Term t = MkIntegerTerm(PREG->y_u.yxn.c); - HR[0] = t; - HR[1] = XREG(PREG->y_u.yxn.xi); - HR[2] = YREG[PREG->y_u.yxn.y]; + Term t = MkIntegerTerm(PREG->u.yxn.c); + H[0] = t; + H[1] = XREG(PREG->u.yxn.xi); + H[2] = YREG[PREG->u.yxn.y]; RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorArg,0)),HR); - HR = Ho; + low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorArg,0)),H); + H = HRo; } #endif /* LOW_LEVEL_TRACE */ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_ARG_Y_CV_TEST_D1); ///#endif BEGD(d0); - d0 = PREG->y_u.yxn.c; + d0 = PREG->u.yxn.c; /* d0 now got the argument we want */ BEGD(d1); - d1 = XREG(PREG->y_u.yxn.xi); + d1 = XREG(PREG->u.yxn.xi); deref_head(d1, traced_arg_y_arg2_vc_unk); traced_arg_y_arg2_vc_nvar: /* d1 now got the structure we want to fetch the argument @@ -12670,7 +12670,7 @@ EMIT_SIMPLE_BLOCK(P_ARG_Y_CV_D1APPL_END); ///#endif BEGP(pt1); - pt1 = YREG + PREG->y_u.yxn.y; + pt1 = YREG + PREG->u.yxn.y; PREG = NEXTOP(PREG, yxn); INITIALIZE_PERMVAR(pt1,pt0[d0]); ENDP(pt1); @@ -12699,7 +12699,7 @@ EMIT_SIMPLE_BLOCK(P_ARG_Y_CV_D1PAIR_END); ///#endif BEGP(pt1); - pt1 = YREG + PREG->y_u.yxn.y; + pt1 = YREG + PREG->u.yxn.y; PREG = NEXTOP(PREG, yxn); INITIALIZE_PERMVAR(pt1,pt0[d0-1]); ENDP(pt1); @@ -12743,9 +12743,9 @@ EMIT_SIMPLE_BLOCK(P_FUNC2S_VV_LOW_LEVEL_TRACER); ///#endif RESET_VARIABLE(HR); - HR[1] = XREG(PREG->y_u.xxx.x1); - HR[2] = XREG(PREG->y_u.xxx.x2); - low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + H[1] = XREG(PREG->u.xxx.x1); + H[2] = XREG(PREG->u.xxx.x2); + low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorFunctor,0)),H); } #endif /* LOW_LEVEL_TRACE */ /* We have to build the structure */ @@ -12753,7 +12753,7 @@ EMIT_SIMPLE_BLOCK(P_FUNC2S_TEST_D0); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.xxx.x1); + d0 = XREG(PREG->u.xxx.x1); deref_head(d0, traced_func2s_unk); traced_func2s_nvar: /* we do, let's get the third argument */ @@ -12761,7 +12761,7 @@ EMIT_SIMPLE_BLOCK(P_FUNC2S_VV_TEST_D1); ///#endif BEGD(d1); - d1 = XREG(PREG->y_u.xxx.x2); + d1 = XREG(PREG->u.xxx.x2); deref_head(d1, traced_func2s_unk2); traced_func2s_nvar2: /* Uuuff, the second and third argument are bound */ @@ -12810,10 +12810,10 @@ RESET_VARIABLE(HR); RESET_VARIABLE(HR+1); d0 = AbsPair(HR); - HR += 2; + H += 2; /* else if arity is 0 just pass d0 through */ /* Ding, ding, we made it */ - XREG(PREG->y_u.xxx.x) = d0; + XREG(PREG->u.xxx.x) = d0; PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxx),Osbpp),l); GONext(); } @@ -12875,19 +12875,19 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2S_VV_SECONDIFOK_END); ///#endif - HR = pt1; + H = pt1; /* done building the term */ ENDP(pt1); /* else if arity is 0 just pass d0 through */ /* Ding, ding, we made it */ - XREG(PREG->y_u.xxx.x) = d0; + XREG(PREG->u.xxx.x) = d0; PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxx),Osbpp),l); GONext(); } else if ((Int)d1 == 0) { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2S_VV_THIRDIFOK); ///#endif - XREG(PREG->y_u.xxx.x) = d0; + XREG(PREG->u.xxx.x) = d0; PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxx),Osbpp),l); GONext(); } else { @@ -12939,9 +12939,9 @@ EMIT_SIMPLE_BLOCK(P_FUNC2S_CV_LOW_LEVEL_TRACER); ///#endif RESET_VARIABLE(HR); - HR[1] = PREG->y_u.xxc.c; - HR[2] = XREG(PREG->y_u.xxc.xi); - low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + H[1] = PREG->u.xxc.c; + H[2] = XREG(PREG->u.xxc.xi); + low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorFunctor,0)),H); } #endif /* LOW_LEVEL_TRACE */ ///#ifdef PROFILED_ABSMI @@ -12949,10 +12949,10 @@ ///#endif BEGD(d0); /* We have to build the structure */ - d0 = PREG->y_u.xxc.c; + d0 = PREG->u.xxc.c; /* we do, let's get the third argument */ BEGD(d1); - d1 = XREG(PREG->y_u.xxc.xi); + d1 = XREG(PREG->u.xxc.xi); deref_head(d1, traced_func2s_unk2_cv); traced_func2s_nvar2_cv: /* Uuuff, the second and third argument are bound */ @@ -12992,10 +12992,10 @@ RESET_VARIABLE(HR); RESET_VARIABLE(HR+1); d0 = AbsPair(HR); - HR += 2; + H += 2; /* else if arity is 0 just pass d0 through */ /* Ding, ding, we made it */ - XREG(PREG->y_u.xxc.x) = d0; + XREG(PREG->u.xxc.x) = d0; PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxc),Osbpp),l); GONext(); } else if ((Int)d1 > 0) { @@ -13057,18 +13057,18 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2S_CV_D1GREATER_END); ///#endif - HR = pt1; + H = pt1; ENDP(pt1); /* else if arity is 0 just pass d0 through */ /* Ding, ding, we made it */ - XREG(PREG->y_u.xxc.x) = d0; + XREG(PREG->u.xxc.x) = d0; PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxc),Osbpp),l); GONext(); } else if (d1 == 0) { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2S_CV_D1ISZERO); ///#endif - XREG(PREG->y_u.xxc.x) = d0; + XREG(PREG->u.xxc.x) = d0; PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxc),Osbpp),l); GONext(); } else { @@ -13110,12 +13110,12 @@ Term ti; CELL *hi = HR; - ti = MkIntegerTerm(PREG->y_u.xxn.c); + ti = MkIntegerTerm(PREG->u.xxn.c); RESET_VARIABLE(HR); - HR[1] = XREG(PREG->y_u.xxn.xi); - HR[2] = ti; - low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - HR = hi; + H[1] = XREG(PREG->u.xxn.xi); + H[2] = ti; + low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorFunctor,0)),H); + H = hi; } #endif /* LOW_LEVEL_TRACE */ /* We have to build the structure */ @@ -13123,14 +13123,14 @@ EMIT_SIMPLE_BLOCK(P_FUNC2S_VC_TEST_D0); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.xxn.xi); + d0 = XREG(PREG->u.xxn.xi); deref_head(d0, traced_func2s_unk_vc); traced_func2s_nvar_vc: ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2S_VC_FUNC2S_NVAR_VC); ///#endif BEGD(d1); - d1 = PREG->y_u.xxn.c; + d1 = PREG->u.xxn.c; if (!IsAtomicTerm(d0)) { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2S_VC_D0NOATOMIC); @@ -13149,10 +13149,10 @@ RESET_VARIABLE(HR); RESET_VARIABLE(HR+1); d0 = AbsPair(HR); - HR += 2; + H += 2; /* else if arity is 0 just pass d0 through */ /* Ding, ding, we made it */ - XREG(PREG->y_u.xxn.x) = d0; + XREG(PREG->u.xxn.x) = d0; PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxn),Osbpp),l); GONext(); } @@ -13161,7 +13161,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2S_VC_D1ISZERO); ///#endif - XREG(PREG->y_u.xxn.x) = d0; + XREG(PREG->u.xxn.x) = d0; PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxn),Osbpp),l); GONext(); } @@ -13227,7 +13227,7 @@ ENDD(d1); /* else if arity is 0 just pass d0 through */ /* Ding, ding, we made it */ - XREG(PREG->y_u.xxn.x) = d0; + XREG(PREG->u.xxn.x) = d0; PREG = NEXTOP(NEXTOP(NEXTOP(PREG, xxn),Osbpp),l); GONext(); @@ -13257,9 +13257,9 @@ EMIT_SIMPLE_BLOCK(P_FUNC2S_Y_VV_LOW_LEVEL_TRACER); ///#endif RESET_VARIABLE(HR); - HR[1] = XREG(PREG->y_u.yxx.x1); - HR[2] = XREG(PREG->y_u.yxx.x2); - low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + H[1] = XREG(PREG->u.yxx.x1); + H[2] = XREG(PREG->u.yxx.x2); + low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorFunctor,0)),H); } #endif /* LOW_LEVEL_TRACE */ /* We have to build the structure */ @@ -13267,7 +13267,7 @@ EMIT_SIMPLE_BLOCK(P_FUNC2S_Y_VV_TEST_D0); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.yxx.x1); + d0 = XREG(PREG->u.yxx.x1); deref_head(d0, traced_func2s_y_unk); traced_func2s_y_nvar: /* we do, let's get the third argument */ @@ -13275,7 +13275,7 @@ EMIT_SIMPLE_BLOCK(P_FUNC2S_Y_VV_TEST_D1); ///#endif BEGD(d1); - d1 = XREG(PREG->y_u.yxx.x2); + d1 = XREG(PREG->u.yxx.x2); deref_head(d1, traced_func2s_y_unk2); traced_func2s_y_nvar2: /* Uuuff, the second and third argument are bound */ @@ -13324,9 +13324,9 @@ RESET_VARIABLE(HR); RESET_VARIABLE(HR+1); d0 = AbsPair(HR); - HR += 2; + H += 2; BEGP(pt1); - pt1 = YREG + PREG->y_u.yxx.y; + pt1 = YREG + PREG->u.yxx.y; PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxx),Osbpp),l); INITIALIZE_PERMVAR(pt1,d0); ENDP(pt1); @@ -13390,12 +13390,12 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2S_Y_VV_D1GREATER_END); ///#endif - HR = pt1; + H = pt1; ENDP(pt1); /* else if arity is 0 just pass d0 through */ /* Ding, ding, we made it */ BEGP(pt1); - pt1 = YREG + PREG->y_u.yxx.y; + pt1 = YREG + PREG->u.yxx.y; PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxx),Osbpp),l); INITIALIZE_PERMVAR(pt1,d0); ENDP(pt1); @@ -13405,7 +13405,7 @@ EMIT_SIMPLE_BLOCK(P_FUNC2S_Y_VV_D1ISZERO); ///#endif BEGP(pt1); - pt1 = YREG + PREG->y_u.yxx.y; + pt1 = YREG + PREG->u.yxx.y; PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxx),Osbpp),l); INITIALIZE_PERMVAR(pt1,d0); ENDP(pt1); @@ -13459,9 +13459,9 @@ EMIT_SIMPLE_BLOCK(P_FUNC2S_Y_CV_LOW_LEVEL_TRACER); ///#endif RESET_VARIABLE(HR); - HR[1] = PREG->y_u.yxn.c; - HR[2] = XREG(PREG->y_u.yxn.xi); - low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + H[1] = PREG->u.yxn.c; + H[2] = XREG(PREG->u.yxn.xi); + low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorFunctor,0)),H); } #endif /* LOW_LEVEL_TRACE */ /* We have to build the structure */ @@ -13469,10 +13469,10 @@ EMIT_SIMPLE_BLOCK(P_FUNC2S_Y_CV_TEST_D1); ///#endif BEGD(d0); - d0 = PREG->y_u.yxn.c; + d0 = PREG->u.yxn.c; /* we do, let's get the third argument */ BEGD(d1); - d1 = XREG(PREG->y_u.yxn.xi); + d1 = XREG(PREG->u.yxn.xi); deref_head(d1, traced_func2s_y_unk_cv); traced_func2s_y_nvar_cv: /* Uuuff, the second and third argument are bound */ @@ -13512,11 +13512,11 @@ RESET_VARIABLE(HR); RESET_VARIABLE(HR+1); d0 = AbsPair(HR); - HR += 2; + H += 2; /* else if arity is 0 just pass d0 through */ /* Ding, ding, we made it */ BEGP(pt1); - pt1 = YREG + PREG->y_u.yxn.y; + pt1 = YREG + PREG->u.yxn.y; PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxn),Osbpp),l); INITIALIZE_PERMVAR(pt1,d0); ENDP(pt1); @@ -13581,12 +13581,12 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2S_Y_CV_D1GREATER_END); ///#endif - HR = pt1; + H = pt1; ENDP(pt1); /* else if arity is 0 just pass d0 through */ /* Ding, ding, we made it */ BEGP(pt1); - pt1 = YREG + PREG->y_u.yxn.y; + pt1 = YREG + PREG->u.yxn.y; PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxn),Osbpp),l); INITIALIZE_PERMVAR(pt1,d0); ENDP(pt1); @@ -13596,7 +13596,7 @@ EMIT_SIMPLE_BLOCK(P_FUNC2S_Y_CV_D1ISZERO); ///#endif BEGP(pt1); - pt1 = YREG + PREG->y_u.yxn.y; + pt1 = YREG + PREG->u.yxn.y; PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxn),Osbpp),l); INITIALIZE_PERMVAR(pt1,d0); ENDP(pt1); @@ -13640,12 +13640,12 @@ Term ti; CELL *hi = HR; - ti = MkIntegerTerm((Int)(PREG->y_u.yxn.c)); + ti = MkIntegerTerm((Int)(PREG->u.yxn.c)); RESET_VARIABLE(HR); - HR[1] = XREG(PREG->y_u.yxn.xi); - HR[2] = ti; - low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); - HR = hi; + H[1] = XREG(PREG->u.yxn.xi); + H[2] = ti; + low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorFunctor,0)),H); + H = hi; } #endif /* LOW_LEVEL_TRACE */ /* We have to build the structure */ @@ -13653,14 +13653,14 @@ EMIT_SIMPLE_BLOCK(P_FUNC2S_Y_VC_TEST_D0); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.yxn.xi); + d0 = XREG(PREG->u.yxn.xi); deref_head(d0, traced_func2s_y_unk_vc); traced_func2s_y_nvar_vc: ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2S_Y_VC_FUNC2S_Y_NVAR_VC); ///#endif BEGD(d1); - d1 = PREG->y_u.yxn.c; + d1 = PREG->u.yxn.c; if (!IsAtomicTerm(d0)) { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2S_Y_VC_D0NOATOMIC); @@ -13679,11 +13679,11 @@ RESET_VARIABLE(HR); RESET_VARIABLE(HR+1); d0 = AbsPair(HR); - HR += 2; + H += 2; /* else if arity is 0 just pass d0 through */ /* Ding, ding, we made it */ BEGP(pt1); - pt1 = YREG + PREG->y_u.yxn.y; + pt1 = YREG + PREG->u.yxn.y; PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxn),Osbpp),l); INITIALIZE_PERMVAR(pt1,d0); ENDP(pt1); @@ -13694,7 +13694,7 @@ EMIT_SIMPLE_BLOCK(P_FUNC2S_Y_VC_D1ISZERO); ///#endif BEGP(pt1); - pt1 = YREG + PREG->y_u.yxn.y; + pt1 = YREG + PREG->u.yxn.y; PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxn),Osbpp),l); INITIALIZE_PERMVAR(pt1,d0); ENDP(pt1); @@ -13772,7 +13772,7 @@ /* else if arity is 0 just pass d0 through */ /* Ding, ding, we made it */ BEGP(pt1); - pt1 = YREG + PREG->y_u.yxn.y; + pt1 = YREG + PREG->u.yxn.y; PREG = NEXTOP(NEXTOP(NEXTOP(PREG, yxn),Osbpp),l); INITIALIZE_PERMVAR(pt1,d0); ENDP(pt1); @@ -13802,17 +13802,17 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_XX_LOW_LEVEL_TRACER); ///#endif - HR[0] = XREG(PREG->y_u.xxx.x); + H[0] = XREG(PREG->u.xxx.x); RESET_VARIABLE(HR+1); RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorFunctor,0)),H); } #endif /* LOW_LEVEL_TRACE */ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_XX_TEST_D0); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.xxx.x); + d0 = XREG(PREG->u.xxx.x); deref_head(d0, traced_func2f_xx_unk); traced_func2f_xx_nvar: if (IsApplTerm(d0)) { @@ -13824,32 +13824,32 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_XX_D0APPL_D1EXTFUNC); ///#endif - XREG(PREG->y_u.xxx.x1) = d0; - XREG(PREG->y_u.xxx.x2) = MkIntTerm(0); + XREG(PREG->u.xxx.x1) = d0; + XREG(PREG->u.xxx.x2) = MkIntTerm(0); PREG = NEXTOP(PREG, xxx); GONext(); } ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_XX_D0APPL_END); ///#endif - XREG(PREG->y_u.xxx.x1) = MkAtomTerm(NameOfFunctor(d1)); - XREG(PREG->y_u.xxx.x2) = MkIntegerTerm(ArityOfFunctor(d1)); + XREG(PREG->u.xxx.x1) = MkAtomTerm(NameOfFunctor(d1)); + XREG(PREG->u.xxx.x2) = MkIntegerTerm(ArityOfFunctor(d1)); PREG = NEXTOP(PREG, xxx); GONext(); } else if (IsPairTerm(d0)) { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_XX_D0PAIR); ///#endif - XREG(PREG->y_u.xxx.x1) = TermDot; - XREG(PREG->y_u.xxx.x2) = MkIntTerm(2); + XREG(PREG->u.xxx.x1) = TermDot; + XREG(PREG->u.xxx.x2) = MkIntTerm(2); PREG = NEXTOP(PREG, xxx); GONext(); } else { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_XX_D0NOCOMPOUND); ///#endif - XREG(PREG->y_u.xxx.x1) = d0; - XREG(PREG->y_u.xxx.x2) = MkIntTerm(0); + XREG(PREG->u.xxx.x1) = d0; + XREG(PREG->u.xxx.x2) = MkIntTerm(0); PREG = NEXTOP(PREG, xxx); GONext(); } @@ -13877,17 +13877,17 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_XY_LOW_LEVEL_TRACER); ///#endif - HR[0] = XREG(PREG->y_u.xxy.x); + H[0] = XREG(PREG->u.xxy.x); RESET_VARIABLE(HR+1); RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorFunctor,0)),H); } #endif /* LOW_LEVEL_TRACE */ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_XY_TEST_D0); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.xxy.x); + d0 = XREG(PREG->u.xxy.x); deref_head(d0, traced_func2f_xy_unk); traced_func2f_xy_nvar: if (IsApplTerm(d0)) { @@ -13895,12 +13895,12 @@ EMIT_SIMPLE_BLOCK(P_FUNC2F_XY_D0APPL); ///#endif Functor d1 = FunctorOfTerm(d0); - CELL *pt0 = YREG+PREG->y_u.xxy.y2; + CELL *pt0 = YREG+PREG->u.xxy.y2; if (IsExtensionFunctor(d1)) { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_XY_D0APPL_D1EXTFUNC); ///#endif - XREG(PREG->y_u.xxy.x1) = d0; + XREG(PREG->u.xxy.x1) = d0; PREG = NEXTOP(PREG, xxy); INITIALIZE_PERMVAR(pt0, MkIntTerm(0)); GONext(); @@ -13908,7 +13908,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_XY_D0APPL_END); ///#endif - XREG(PREG->y_u.xxy.x1) = MkAtomTerm(NameOfFunctor(d1)); + XREG(PREG->u.xxy.x1) = MkAtomTerm(NameOfFunctor(d1)); PREG = NEXTOP(PREG, xxy); INITIALIZE_PERMVAR(pt0, MkIntegerTerm(ArityOfFunctor(d1))); GONext(); @@ -13916,8 +13916,8 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_XY_D0PAIR); ///#endif - CELL *pt0 = YREG+PREG->y_u.xxy.y2; - XREG(PREG->y_u.xxy.x1) = TermDot; + CELL *pt0 = YREG+PREG->u.xxy.y2; + XREG(PREG->u.xxy.x1) = TermDot; PREG = NEXTOP(PREG, xxy); INITIALIZE_PERMVAR(pt0, MkIntTerm(2)); GONext(); @@ -13925,8 +13925,8 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_XY_D0NOCOMPOUND); ///#endif - CELL *pt0 = YREG+PREG->y_u.xxy.y2; - XREG(PREG->y_u.xxy.x1) = d0; + CELL *pt0 = YREG+PREG->u.xxy.y2; + XREG(PREG->u.xxy.x1) = d0; PREG = NEXTOP(PREG, xxy); INITIALIZE_PERMVAR(pt0, MkIntTerm(0)); GONext(); @@ -13955,17 +13955,17 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_YX_LOW_LEVEL_TRACER); ///#endif - HR[0] = XREG(PREG->y_u.yxx.x2); + H[0] = XREG(PREG->u.yxx.x2); RESET_VARIABLE(HR+1); RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorFunctor,0)),H); } #endif /* LOW_LEVEL_TRACE */ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_YX_TEST_D0); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.yxx.x2); + d0 = XREG(PREG->u.yxx.x2); deref_head(d0, traced_func2f_yx_unk); traced_func2f_yx_nvar: if (IsApplTerm(d0)) { @@ -13973,12 +13973,12 @@ EMIT_SIMPLE_BLOCK(P_FUNC2F_YX_D0APPL); ///#endif Functor d1 = FunctorOfTerm(d0); - CELL *pt0 = YREG+PREG->y_u.yxx.y; + CELL *pt0 = YREG+PREG->u.yxx.y; if (IsExtensionFunctor(d1)) { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_YX_D0APPL_D1EXTFUNC); ///#endif - XREG(PREG->y_u.yxx.x1) = MkIntTerm(0); + XREG(PREG->u.yxx.x1) = MkIntTerm(0); PREG = NEXTOP(PREG, yxx); INITIALIZE_PERMVAR(pt0, d0); GONext(); @@ -13986,7 +13986,7 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_YX_D0APPL_END); ///#endif - XREG(PREG->y_u.yxx.x1) = MkIntegerTerm(ArityOfFunctor(d1)); + XREG(PREG->u.yxx.x1) = MkIntegerTerm(ArityOfFunctor(d1)); PREG = NEXTOP(PREG, yxx); INITIALIZE_PERMVAR(pt0, MkAtomTerm(NameOfFunctor(d1))); GONext(); @@ -13994,8 +13994,8 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_YX_D0PAIR); ///#endif - CELL *pt0 = YREG+PREG->y_u.yxx.y; - XREG(PREG->y_u.yxx.x1) = MkIntTerm(2); + CELL *pt0 = YREG+PREG->u.yxx.y; + XREG(PREG->u.yxx.x1) = MkIntTerm(2); PREG = NEXTOP(PREG, yxx); INITIALIZE_PERMVAR(pt0 ,TermDot); GONext(); @@ -14003,8 +14003,8 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_YX_D0NOCOMPOUND); ///#endif - CELL *pt0 = YREG+PREG->y_u.yxx.y; - XREG(PREG->y_u.yxx.x1) = MkIntTerm(0); + CELL *pt0 = YREG+PREG->u.yxx.y; + XREG(PREG->u.yxx.x1) = MkIntTerm(0); PREG = NEXTOP(PREG, yxx); INITIALIZE_PERMVAR(pt0, d0); GONext(); @@ -14033,17 +14033,17 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_YY_LOW_LEVEL_TRACER); ///#endif - HR[0] = XREG(PREG->y_u.yyx.x); + H[0] = XREG(PREG->u.yyx.x); RESET_VARIABLE(HR+1); RESET_VARIABLE(HR+2); - low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + low_level_trace(enter_pred,RepPredPrOp(traced_Yap_GetPredPropByFunc(FunctorFunctor,0)),H); } #endif /* LOW_LEVEL_TRACE */ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_YY_TEST_D0); ///#endif BEGD(d0); - d0 = XREG(PREG->y_u.yyx.x); + d0 = XREG(PREG->u.yyx.x); deref_head(d0, traced_func2f_yy_unk); traced_func2f_yy_nvar: if (IsApplTerm(d0)) { @@ -14051,8 +14051,8 @@ EMIT_SIMPLE_BLOCK(P_FUNC2F_YY_D0APPL); ///#endif Functor d1 = FunctorOfTerm(d0); - CELL *pt0 = YREG+PREG->y_u.yyx.y1; - CELL *pt1 = YREG+PREG->y_u.yyx.y2; + CELL *pt0 = YREG+PREG->u.yyx.y1; + CELL *pt1 = YREG+PREG->u.yyx.y2; if (IsExtensionFunctor(d1)) { ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_YY_D0APPL_D1EXTFUNC); @@ -14073,8 +14073,8 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_YY_D0PAIR); ///#endif - CELL *pt0 = YREG+PREG->y_u.yyx.y1; - CELL *pt1 = YREG+PREG->y_u.yyx.y2; + CELL *pt0 = YREG+PREG->u.yyx.y1; + CELL *pt1 = YREG+PREG->u.yyx.y2; PREG = NEXTOP(PREG, yyx); INITIALIZE_PERMVAR(pt0, TermDot); INITIALIZE_PERMVAR(pt1, MkIntTerm(2)); @@ -14083,8 +14083,8 @@ ///#ifdef PROFILED_ABSMI EMIT_SIMPLE_BLOCK(P_FUNC2F_YY_D0NOCOMPOUND); ///#endif - CELL *pt0 = YREG+PREG->y_u.yyx.y1; - CELL *pt1 = YREG+PREG->y_u.yyx.y2; + CELL *pt0 = YREG+PREG->u.yyx.y1; + CELL *pt1 = YREG+PREG->u.yyx.y2; PREG = NEXTOP(PREG, yyx); INITIALIZE_PERMVAR(pt0, d0); INITIALIZE_PERMVAR(pt1, MkIntTerm(0)); @@ -14220,7 +14220,7 @@ RESET_VARIABLE(HR); RESET_VARIABLE(HR+1); d0 = AbsPair(HR); - HR += 2; + H += 2; } else if ((Int)d1 > 0) { /* now let's build a compound term */ @@ -14256,7 +14256,7 @@ pt1++; } /* done building the term */ - HR = pt1; + H = pt1; ENDP(pt1); } else if ((Int)d1 < 0) { saveregs(); @@ -14308,7 +14308,7 @@ } CACHE_Y_AS_ENV(YREG); /* Try to preserve the environment */ - ENV_YREG = (CELL *) (((char *) YREG) + PREG->y_u.Osbpp.s); + ENV_YREG = (CELL *) (((char *) YREG) + PREG->u.Osbpp.s); #ifdef FROZEN_STACKS { choiceptr top_b = PROTECT_FROZEN_B(B); @@ -14512,11 +14512,11 @@ //printf("p_execute!!\n"); { PredEntry *pen; - Term mod = PREG->y_u.Osbmp.mod; + Term mod = PREG->u.Osbmp.mod; CACHE_Y_AS_ENV(YREG); /* Try to preserve the environment */ - ENV_YREG = (CELL *) (((char *) YREG) + PREG->y_u.Osbmp.s); + ENV_YREG = (CELL *) (((char *) YREG) + PREG->u.Osbmp.s); #ifdef FROZEN_STACKS { choiceptr top_b = PROTECT_FROZEN_B(B); diff --git a/JIT/HPP/yaam_basics.h b/JIT/HPP/yaam_basics.h index 1db46d5a5..45717bb07 100644 --- a/JIT/HPP/yaam_basics.h +++ b/JIT/HPP/yaam_basics.h @@ -89,53 +89,53 @@ #if (defined(YAPOR_SBA) && defined(YAPOR)) || defined(TABLING) #define NoStackDeallocate_Exception \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) { \ + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) { \ return external_labels[8]; \ } #define NoStackCall_Exception \ CACHE_Y_AS_ENV(YREG); \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) { \ + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) { \ return external_labels[6]; \ } \ ENDCACHE_Y_AS_ENV(); #define NoStackDExecute_Exception \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) { \ + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) { \ return external_labels[7]; \ } #define NoStackExecute_Exception \ CACHE_Y_AS_ENV(YREG); \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) { \ + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) { \ return external_labels[5]; \ } \ ENDCACHE_Y_AS_ENV(); #define NoStackFail_Exception \ CACHE_Y_AS_ENV(YREG); \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) { \ + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) { \ return external_labels[10]; \ } \ ENDCACHE_Y_AS_ENV(); #define NoStackEither_Exception \ CACHE_Y_AS_ENV(YREG); \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) { \ + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) { \ return external_labels[4]; \ } \ ENDCACHE_Y_AS_ENV(); #define NoStackCommitY_Exception \ CACHE_Y_AS_ENV(YREG); \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) { \ + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) { \ return external_labels[2]; \ } \ ENDCACHE_Y_AS_ENV(); #define NoStackCommitX_Exception \ CACHE_Y_AS_ENV(YREG); \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) { \ + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) { \ return external_labels[11]; \ } \ ENDCACHE_Y_AS_ENV(); diff --git a/JIT/HPP/yaam_basics_d.h b/JIT/HPP/yaam_basics_d.h index e0b62e272..de3cd0930 100644 --- a/JIT/HPP/yaam_basics_d.h +++ b/JIT/HPP/yaam_basics_d.h @@ -91,7 +91,7 @@ #if (defined(YAPOR_SBA) && defined(YAPOR)) || defined(TABLING) #define NoStackDeallocate_Exception \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) { \ + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) { \ if ((char*)ExpEnv.debug_struc.pprint_me.native_treat_heap != 0 && (char*)ExpEnv.debug_struc.pprint_me.native_treat_heap != (char*)0x1) { \ fprintf(stderr, "%s:%d\n", __FILE__, __LINE__); \ fprintf(stderr, "%s", (char*)ExpEnv.debug_struc.pprint_me.native_treat_heap); \ @@ -101,7 +101,7 @@ #define NoStackCall_Exception \ CACHE_Y_AS_ENV(YREG); \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) { \ + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) { \ if ((char*)ExpEnv.debug_struc.pprint_me.native_treat_heap != 0 && (char*)ExpEnv.debug_struc.pprint_me.native_treat_heap != (char*)0x1) { \ fprintf(stderr, "%s:%d\n", __FILE__, __LINE__); \ fprintf(stderr, "%s", (char*)ExpEnv.debug_struc.pprint_me.native_treat_heap); \ @@ -111,7 +111,7 @@ ENDCACHE_Y_AS_ENV(); #define NoStackDExecute_Exception \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) { \ + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) { \ if ((char*)ExpEnv.debug_struc.pprint_me.native_treat_heap != 0 && (char*)ExpEnv.debug_struc.pprint_me.native_treat_heap != (char*)0x1) { \ fprintf(stderr, "%s:%d\n", __FILE__, __LINE__); \ fprintf(stderr, "%s", (char*)ExpEnv.debug_struc.pprint_me.native_treat_heap); \ @@ -121,7 +121,7 @@ #define NoStackExecute_Exception \ CACHE_Y_AS_ENV(YREG); \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) { \ + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) { \ if ((char*)ExpEnv.debug_struc.pprint_me.native_treat_heap != 0 && (char*)ExpEnv.debug_struc.pprint_me.native_treat_heap != (char*)0x1) { \ fprintf(stderr, "%s:%d\n", __FILE__, __LINE__); \ fprintf(stderr, "%s", (char*)ExpEnv.debug_struc.pprint_me.native_treat_heap); \ @@ -132,7 +132,7 @@ #define NoStackFail_Exception \ CACHE_Y_AS_ENV(YREG); \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) { \ + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) { \ if ((char*)ExpEnv.debug_struc.pprint_me.native_treat_heap != 0 && (char*)ExpEnv.debug_struc.pprint_me.native_treat_heap != (char*)0x1) { \ fprintf(stderr, "%s:%d\n", __FILE__, __LINE__); \ fprintf(stderr, "%s", (char*)ExpEnv.debug_struc.pprint_me.native_treat_heap); \ @@ -143,7 +143,7 @@ #define NoStackEither_Exception \ CACHE_Y_AS_ENV(YREG); \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) { \ + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) { \ if ((char*)ExpEnv.debug_struc.pprint_me.native_treat_heap != 0 && (char*)ExpEnv.debug_struc.pprint_me.native_treat_heap != (char*)0x1) { \ fprintf(stderr, "%s:%d\n", __FILE__, __LINE__); \ fprintf(stderr, "%s", (char*)ExpEnv.debug_struc.pprint_me.native_treat_heap); \ @@ -154,7 +154,7 @@ #define NoStackCommitY_Exception \ CACHE_Y_AS_ENV(YREG); \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) { \ + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) { \ if ((char*)ExpEnv.debug_struc.pprint_me.native_treat_heap != 0 && (char*)ExpEnv.debug_struc.pprint_me.native_treat_heap != (char*)0x1) { \ fprintf(stderr, "%s:%d\n", __FILE__, __LINE__); \ fprintf(stderr, "%s", (char*)ExpEnv.debug_struc.pprint_me.native_treat_heap); \ @@ -165,7 +165,7 @@ #define NoStackCommitX_Exception \ CACHE_Y_AS_ENV(YREG); \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) { \ + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) { \ if ((char*)ExpEnv.debug_struc.pprint_me.native_treat_heap != 0 && (char*)ExpEnv.debug_struc.pprint_me.native_treat_heap != (char*)0x1) { \ fprintf(stderr, "%s:%d\n", __FILE__, __LINE__); \ fprintf(stderr, "%s", (char*)ExpEnv.debug_struc.pprint_me.native_treat_heap); \ diff --git a/JIT/HPP/yaam_call.h b/JIT/HPP/yaam_call.h index 5ab0f85c6..ede8266eb 100644 --- a/JIT/HPP/yaam_call.h +++ b/JIT/HPP/yaam_call.h @@ -3,7 +3,7 @@ register CELL d0; \ PredEntry *pt0; \ register CELL *ENV_YREG = (YREG); \ - pt0 = (*_PREG)->y_u.pp.p; + pt0 = (*_PREG)->u.pp.p; #ifdef LOW_LEVEL_TRACER #define EXECUTE_LOW_LEVEL_TRACER \ @@ -51,14 +51,14 @@ #ifdef LOW_LEVEL_TRACER #define DEXECUTE_LOW_LEVEL_TRACER \ - low_level_trace(enter_pred,(*_PREG)->y_u.pp.p,XREGS+1); + low_level_trace(enter_pred,(*_PREG)->u.pp.p,XREGS+1); #endif #define DEXECUTE_POST_LOW_LEVEL_TRACER \ CACHE_Y_AS_ENV(YREG); \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; + pt0 = (*_PREG)->u.pp.p; #ifdef DEPTH_LIMIT #define DEXECUTE_DEPTH_MINOR \ @@ -166,18 +166,18 @@ #ifdef LOW_LEVEL_TRACER #define CALL_LOW_LEVEL_TRACER \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); #endif #define CALL_POST_LOW_LEVEL_TRACER \ register CELL *ENV_YREG = (YREG); \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); #define CALL_POST_NO_CHECKING \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ diff --git a/JIT/HPP/yaam_call_count.h b/JIT/HPP/yaam_call_count.h index 5b51bb909..788cd8735 100644 --- a/JIT/HPP/yaam_call_count.h +++ b/JIT/HPP/yaam_call_count.h @@ -1,7 +1,7 @@ #define COUNT_CALL_INSTINIT \ - LOCK((*_PREG)->y_u.p.p->StatisticsForPred.lock); \ - (*_PREG)->y_u.p.p->StatisticsForPred.NOfEntries++; \ - UNLOCK((*_PREG)->y_u.p.p->StatisticsForPred.lock); \ + LOCK((*_PREG)->u.p.p->StatisticsForPred.lock); \ + (*_PREG)->u.p.p->StatisticsForPred.NOfEntries++; \ + UNLOCK((*_PREG)->u.p.p->StatisticsForPred.lock); \ LOCAL_ReductionsCounter--; #define COUNT_CALL_MIDDLE \ @@ -26,9 +26,9 @@ GONext(); #define COUNT_RETRY_INSTINIT \ - LOCK((*_PREG)->y_u.p.p->StatisticsForPred.lock); \ - (*_PREG)->y_u.p.p->StatisticsForPred.NOfRetries++; \ - UNLOCK((*_PREG)->y_u.p.p->StatisticsForPred.lock); \ + LOCK((*_PREG)->u.p.p->StatisticsForPred.lock); \ + (*_PREG)->u.p.p->StatisticsForPred.NOfRetries++; \ + UNLOCK((*_PREG)->u.p.p->StatisticsForPred.lock); \ LOCAL_RetriesCounter--; #define COUNT_RETRY_MIDDLE \ @@ -56,8 +56,8 @@ #define COUNT_RETRY_ME_INSTINIT \ CACHE_Y(B); \ - restore_yaam_regs((*_PREG)->y_u.Otapl.d); \ - restore_args((*_PREG)->y_u.Otapl.s); + restore_yaam_regs((*_PREG)->u.Otapl.d); \ + restore_args((*_PREG)->u.Otapl.s); #ifdef FROZEN_STACKS #define COUNT_RETRY_ME_MIDDLE \ @@ -65,9 +65,9 @@ set_cut(S_YREG, B->cp_b); \ SET_BB(B_YREG); \ ENDCACHE_Y(); \ - LOCK(((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.lock); \ - ((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.NOfRetries++; \ - UNLOCK(((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.lock); \ + LOCK(((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.lock); \ + ((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.NOfRetries++; \ + UNLOCK(((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.lock); \ LOCAL_RetriesCounter--; \ if (LOCAL_RetriesCounter == 0 && LOCAL_RetriesCounterOn) { \ saveregs(); \ @@ -87,9 +87,9 @@ set_cut(S_YREG, B_YREG->cp_b); \ SET_BB(B_YREG); \ ENDCACHE_Y(); \ - LOCK(((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.lock); \ - ((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.NOfRetries++; \ - UNLOCK(((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.lock); \ + LOCK(((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.lock); \ + ((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.NOfRetries++; \ + UNLOCK(((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.lock); \ LOCAL_RetriesCounter--; \ if (LOCAL_RetriesCounter == 0 && LOCAL_RetriesCounterOn) { \ saveregs(); \ @@ -118,14 +118,14 @@ #define COUNT_TRUST_ME_MIDDLE \ if (SCH_top_shared_cp(B)) { \ SCH_last_alternative((*_PREG), B_YREG); \ - restore_args((*_PREG)->y_u.Otapl.s); \ + restore_args((*_PREG)->u.Otapl.s); \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B->cp_b); \ } \ else \ { \ pop_yaam_regs(); \ - pop_args((*_PREG)->y_u.Otapl.s); \ + pop_args((*_PREG)->u.Otapl.s); \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B); \ } \ @@ -149,13 +149,13 @@ #define COUNT_TRUST_ME_MIDDLE \ if (SCH_top_shared_cp(B)) { \ SCH_last_alternative((*_PREG), B_YREG); \ - restore_args((*_PREG)->y_u.Otapl.s); \ + restore_args((*_PREG)->u.Otapl.s); \ set_cut(S_YREG, B->cp_b); \ } \ else \ { \ pop_yaam_regs(); \ - pop_args((*_PREG)->y_u.Otapl.s); \ + pop_args((*_PREG)->u.Otapl.s); \ set_cut(S_YREG, B); \ } \ SET_BB(B_YREG); \ @@ -180,7 +180,7 @@ #define COUNT_TRUST_ME_MIDDLE \ { \ pop_yaam_regs(); \ - pop_args((*_PREG)->y_u.Otapl.s); \ + pop_args((*_PREG)->u.Otapl.s); \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B); \ } \ @@ -204,7 +204,7 @@ #define COUNT_TRUST_ME_MIDDLE \ { \ pop_yaam_regs(); \ - pop_args((*_PREG)->y_u.Otapl.s); \ + pop_args((*_PREG)->u.Otapl.s); \ set_cut(S_YREG, B); \ } \ SET_BB(B_YREG); \ @@ -227,9 +227,9 @@ #endif /* YAPOR */ #define COUNT_TRUST_ME_END \ - LOCK(((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.lock); \ - ((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.NOfRetries++; \ - UNLOCK(((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.lock); \ + LOCK(((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.lock); \ + ((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.NOfRetries++; \ + UNLOCK(((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.lock); \ (*_PREG) = NEXTOP((*_PREG), Otapl); \ GONext(); @@ -241,13 +241,13 @@ { \ UInt timestamp; \ CACHE_Y(B); \ - timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[(*_PREG)->y_u.OtaLl.s]); \ - if (!VALID_TIMESTAMP(timestamp, (*_PREG)->y_u.OtaLl.d)) { \ - (*_PREG)=(*_PREG)->y_u.OtaLl.n; \ + timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[(*_PREG)->u.OtaLl.s]); \ + if (!VALID_TIMESTAMP(timestamp, (*_PREG)->u.OtaLl.d)) { \ + (*_PREG)=(*_PREG)->u.OtaLl.n; \ JMPNext(); \ } \ - restore_yaam_regs((*_PREG)->y_u.OtaLl.n); \ - restore_args((*_PREG)->y_u.OtaLl.s); \ + restore_yaam_regs((*_PREG)->u.OtaLl.n); \ + restore_args((*_PREG)->u.OtaLl.s); \ LOCAL_RetriesCounter--; \ if (LOCAL_RetriesCounter == 0) { \ saveregs(); \ @@ -262,11 +262,11 @@ setregs(); \ JMPNext(); \ } \ - LOCK((*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); \ - (*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; \ - UNLOCK((*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); \ - PP = (*_PREG)->y_u.OtaLl.d->ClPred; \ - (*_PREG) = (*_PREG)->y_u.OtaLl.d->ClCode; \ + LOCK((*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.lock); \ + (*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; \ + UNLOCK((*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.lock); \ + PP = (*_PREG)->u.OtaLl.d->ClPred; \ + (*_PREG) = (*_PREG)->u.OtaLl.d->ClCode; \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B->cp_b); \ SET_BB(B_YREG); \ @@ -280,13 +280,13 @@ { \ UInt timestamp; \ CACHE_Y(B); \ - timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[(*_PREG)->y_u.OtaLl.s]); \ - if (!VALID_TIMESTAMP(timestamp, (*_PREG)->y_u.OtaLl.d)) { \ - (*_PREG)=(*_PREG)->y_u.OtaLl.n; \ + timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[(*_PREG)->u.OtaLl.s]); \ + if (!VALID_TIMESTAMP(timestamp, (*_PREG)->u.OtaLl.d)) { \ + (*_PREG)=(*_PREG)->u.OtaLl.n; \ JMPNext(); \ } \ - restore_yaam_regs((*_PREG)->y_u.OtaLl.n); \ - restore_args((*_PREG)->y_u.OtaLl.s); \ + restore_yaam_regs((*_PREG)->u.OtaLl.n); \ + restore_args((*_PREG)->u.OtaLl.s); \ LOCAL_RetriesCounter--; \ if (LOCAL_RetriesCounter == 0) { \ saveregs(); \ @@ -301,11 +301,11 @@ setregs(); \ JMPNext(); \ } \ - LOCK((*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); \ - (*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; \ - UNLOCK((*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); \ - PP = (*_PREG)->y_u.OtaLl.d->ClPred; \ - (*_PREG) = (*_PREG)->y_u.OtaLl.d->ClCode; \ + LOCK((*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.lock); \ + (*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; \ + UNLOCK((*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.lock); \ + PP = (*_PREG)->u.OtaLl.d->ClPred; \ + (*_PREG) = (*_PREG)->u.OtaLl.d->ClCode; \ set_cut(S_YREG, B_YREG->cp_b); \ SET_BB(B_YREG); \ ENDCACHE_Y(); \ @@ -320,13 +320,13 @@ { \ UInt timestamp; \ CACHE_Y(B); \ - timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[(*_PREG)->y_u.OtaLl.s]); \ - if (!VALID_TIMESTAMP(timestamp, (*_PREG)->y_u.OtaLl.d)) { \ - (*_PREG)=(*_PREG)->y_u.OtaLl.n; \ + timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[(*_PREG)->u.OtaLl.s]); \ + if (!VALID_TIMESTAMP(timestamp, (*_PREG)->u.OtaLl.d)) { \ + (*_PREG)=(*_PREG)->u.OtaLl.n; \ JMPNext(); \ } \ - restore_yaam_regs((*_PREG)->y_u.OtaLl.n); \ - restore_args((*_PREG)->y_u.OtaLl.s); \ + restore_yaam_regs((*_PREG)->u.OtaLl.n); \ + restore_args((*_PREG)->u.OtaLl.s); \ LOCAL_RetriesCounter--; \ if (LOCAL_RetriesCounter == 0) { \ saveregs(); \ @@ -341,10 +341,10 @@ setregs(); \ JMPNext(); \ } \ - LOCK((*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); \ - (*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; \ - UNLOCK((*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); \ - (*_PREG) = (*_PREG)->y_u.OtaLl.d->ClCode; \ + LOCK((*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.lock); \ + (*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; \ + UNLOCK((*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.lock); \ + (*_PREG) = (*_PREG)->u.OtaLl.d->ClCode; \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B->cp_b); \ SET_BB(B_YREG); \ @@ -358,13 +358,13 @@ { \ UInt timestamp; \ CACHE_Y(B); \ - timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[(*_PREG)->y_u.OtaLl.s]); \ - if (!VALID_TIMESTAMP(timestamp, (*_PREG)->y_u.OtaLl.d)) { \ - (*_PREG)=(*_PREG)->y_u.OtaLl.n; \ + timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[(*_PREG)->u.OtaLl.s]); \ + if (!VALID_TIMESTAMP(timestamp, (*_PREG)->u.OtaLl.d)) { \ + (*_PREG)=(*_PREG)->u.OtaLl.n; \ JMPNext(); \ } \ - restore_yaam_regs((*_PREG)->y_u.OtaLl.n); \ - restore_args((*_PREG)->y_u.OtaLl.s); \ + restore_yaam_regs((*_PREG)->u.OtaLl.n); \ + restore_args((*_PREG)->u.OtaLl.s); \ LOCAL_RetriesCounter--; \ if (LOCAL_RetriesCounter == 0) { \ saveregs(); \ @@ -379,10 +379,10 @@ setregs(); \ JMPNext(); \ } \ - LOCK((*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); \ - (*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; \ - UNLOCK((*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); \ - (*_PREG) = (*_PREG)->y_u.OtaLl.d->ClCode; \ + LOCK((*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.lock); \ + (*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; \ + UNLOCK((*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.lock); \ + (*_PREG) = (*_PREG)->u.OtaLl.d->ClCode; \ set_cut(S_YREG, B_YREG->cp_b); \ SET_BB(B_YREG); \ ENDCACHE_Y(); \ @@ -401,9 +401,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -472,9 +472,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -544,9 +544,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -609,9 +609,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -678,9 +678,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -752,9 +752,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -827,9 +827,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -895,9 +895,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -966,9 +966,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -1039,9 +1039,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -1113,9 +1113,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -1180,9 +1180,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ diff --git a/JIT/HPP/yaam_call_count_d.h b/JIT/HPP/yaam_call_count_d.h index 406e84fba..3f672e6aa 100644 --- a/JIT/HPP/yaam_call_count_d.h +++ b/JIT/HPP/yaam_call_count_d.h @@ -1,8 +1,8 @@ #define COUNT_CALL_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - LOCK((*_PREG)->y_u.p.p->StatisticsForPred.lock); \ - (*_PREG)->y_u.p.p->StatisticsForPred.NOfEntries++; \ - UNLOCK((*_PREG)->y_u.p.p->StatisticsForPred.lock); \ + LOCK((*_PREG)->u.p.p->StatisticsForPred.lock); \ + (*_PREG)->u.p.p->StatisticsForPred.NOfEntries++; \ + UNLOCK((*_PREG)->u.p.p->StatisticsForPred.lock); \ LOCAL_ReductionsCounter--; #define COUNT_CALL_MIDDLE \ @@ -28,9 +28,9 @@ #define COUNT_RETRY_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - LOCK((*_PREG)->y_u.p.p->StatisticsForPred.lock); \ - (*_PREG)->y_u.p.p->StatisticsForPred.NOfRetries++; \ - UNLOCK((*_PREG)->y_u.p.p->StatisticsForPred.lock); \ + LOCK((*_PREG)->u.p.p->StatisticsForPred.lock); \ + (*_PREG)->u.p.p->StatisticsForPred.NOfRetries++; \ + UNLOCK((*_PREG)->u.p.p->StatisticsForPred.lock); \ LOCAL_RetriesCounter--; #define COUNT_RETRY_MIDDLE \ @@ -59,8 +59,8 @@ #define COUNT_RETRY_ME_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ CACHE_Y(B); \ - restore_yaam_regs((*_PREG)->y_u.Otapl.d); \ - restore_args((*_PREG)->y_u.Otapl.s); + restore_yaam_regs((*_PREG)->u.Otapl.d); \ + restore_args((*_PREG)->u.Otapl.s); #ifdef FROZEN_STACKS #define COUNT_RETRY_ME_MIDDLE \ @@ -68,9 +68,9 @@ set_cut(S_YREG, B->cp_b); \ SET_BB(B_YREG); \ ENDCACHE_Y(); \ - LOCK(((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.lock); \ - ((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.NOfRetries++; \ - UNLOCK(((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.lock); \ + LOCK(((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.lock); \ + ((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.NOfRetries++; \ + UNLOCK(((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.lock); \ LOCAL_RetriesCounter--; \ if (LOCAL_RetriesCounter == 0 && LOCAL_RetriesCounterOn) { \ saveregs(); \ @@ -90,9 +90,9 @@ set_cut(S_YREG, B_YREG->cp_b); \ SET_BB(B_YREG); \ ENDCACHE_Y(); \ - LOCK(((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.lock); \ - ((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.NOfRetries++; \ - UNLOCK(((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.lock); \ + LOCK(((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.lock); \ + ((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.NOfRetries++; \ + UNLOCK(((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.lock); \ LOCAL_RetriesCounter--; \ if (LOCAL_RetriesCounter == 0 && LOCAL_RetriesCounterOn) { \ saveregs(); \ @@ -122,14 +122,14 @@ #define COUNT_TRUST_ME_MIDDLE \ if (SCH_top_shared_cp(B)) { \ SCH_last_alternative((*_PREG), B_YREG); \ - restore_args((*_PREG)->y_u.Otapl.s); \ + restore_args((*_PREG)->u.Otapl.s); \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B->cp_b); \ } \ else \ { \ pop_yaam_regs(); \ - pop_args((*_PREG)->y_u.Otapl.s); \ + pop_args((*_PREG)->u.Otapl.s); \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B); \ } \ @@ -153,13 +153,13 @@ #define COUNT_TRUST_ME_MIDDLE \ if (SCH_top_shared_cp(B)) { \ SCH_last_alternative((*_PREG), B_YREG); \ - restore_args((*_PREG)->y_u.Otapl.s); \ + restore_args((*_PREG)->u.Otapl.s); \ set_cut(S_YREG, B->cp_b); \ } \ else \ { \ pop_yaam_regs(); \ - pop_args((*_PREG)->y_u.Otapl.s); \ + pop_args((*_PREG)->u.Otapl.s); \ set_cut(S_YREG, B); \ } \ SET_BB(B_YREG); \ @@ -184,7 +184,7 @@ #define COUNT_TRUST_ME_MIDDLE \ { \ pop_yaam_regs(); \ - pop_args((*_PREG)->y_u.Otapl.s); \ + pop_args((*_PREG)->u.Otapl.s); \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B); \ } \ @@ -208,7 +208,7 @@ #define COUNT_TRUST_ME_MIDDLE \ { \ pop_yaam_regs(); \ - pop_args((*_PREG)->y_u.Otapl.s); \ + pop_args((*_PREG)->u.Otapl.s); \ set_cut(S_YREG, B); \ } \ SET_BB(B_YREG); \ @@ -231,9 +231,9 @@ #endif /* YAPOR */ #define COUNT_TRUST_ME_END \ - LOCK(((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.lock); \ - ((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.NOfRetries++; \ - UNLOCK(((PredEntry *)((*_PREG)->y_u.Otapl.p))->StatisticsForPred.lock); \ + LOCK(((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.lock); \ + ((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.NOfRetries++; \ + UNLOCK(((PredEntry *)((*_PREG)->u.Otapl.p))->StatisticsForPred.lock); \ (*_PREG) = NEXTOP((*_PREG), Otapl); \ GONext(); @@ -246,13 +246,13 @@ { \ UInt timestamp; \ CACHE_Y(B); \ - timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[(*_PREG)->y_u.OtaLl.s]); \ - if (!VALID_TIMESTAMP(timestamp, (*_PREG)->y_u.OtaLl.d)) { \ - (*_PREG)=(*_PREG)->y_u.OtaLl.n; \ + timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[(*_PREG)->u.OtaLl.s]); \ + if (!VALID_TIMESTAMP(timestamp, (*_PREG)->u.OtaLl.d)) { \ + (*_PREG)=(*_PREG)->u.OtaLl.n; \ JMPNext(); \ } \ - restore_yaam_regs((*_PREG)->y_u.OtaLl.n); \ - restore_args((*_PREG)->y_u.OtaLl.s); \ + restore_yaam_regs((*_PREG)->u.OtaLl.n); \ + restore_args((*_PREG)->u.OtaLl.s); \ LOCAL_RetriesCounter--; \ if (LOCAL_RetriesCounter == 0) { \ saveregs(); \ @@ -267,11 +267,11 @@ setregs(); \ JMPNext(); \ } \ - LOCK((*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); \ - (*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; \ - UNLOCK((*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); \ - PP = (*_PREG)->y_u.OtaLl.d->ClPred; \ - (*_PREG) = (*_PREG)->y_u.OtaLl.d->ClCode; \ + LOCK((*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.lock); \ + (*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; \ + UNLOCK((*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.lock); \ + PP = (*_PREG)->u.OtaLl.d->ClPred; \ + (*_PREG) = (*_PREG)->u.OtaLl.d->ClCode; \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B->cp_b); \ SET_BB(B_YREG); \ @@ -286,13 +286,13 @@ { \ UInt timestamp; \ CACHE_Y(B); \ - timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[(*_PREG)->y_u.OtaLl.s]); \ - if (!VALID_TIMESTAMP(timestamp, (*_PREG)->y_u.OtaLl.d)) { \ - (*_PREG)=(*_PREG)->y_u.OtaLl.n; \ + timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[(*_PREG)->u.OtaLl.s]); \ + if (!VALID_TIMESTAMP(timestamp, (*_PREG)->u.OtaLl.d)) { \ + (*_PREG)=(*_PREG)->u.OtaLl.n; \ JMPNext(); \ } \ - restore_yaam_regs((*_PREG)->y_u.OtaLl.n); \ - restore_args((*_PREG)->y_u.OtaLl.s); \ + restore_yaam_regs((*_PREG)->u.OtaLl.n); \ + restore_args((*_PREG)->u.OtaLl.s); \ LOCAL_RetriesCounter--; \ if (LOCAL_RetriesCounter == 0) { \ saveregs(); \ @@ -307,11 +307,11 @@ setregs(); \ JMPNext(); \ } \ - LOCK((*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); \ - (*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; \ - UNLOCK((*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); \ - PP = (*_PREG)->y_u.OtaLl.d->ClPred; \ - (*_PREG) = (*_PREG)->y_u.OtaLl.d->ClCode; \ + LOCK((*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.lock); \ + (*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; \ + UNLOCK((*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.lock); \ + PP = (*_PREG)->u.OtaLl.d->ClPred; \ + (*_PREG) = (*_PREG)->u.OtaLl.d->ClCode; \ set_cut(S_YREG, B_YREG->cp_b); \ SET_BB(B_YREG); \ ENDCACHE_Y(); \ @@ -327,13 +327,13 @@ { \ UInt timestamp; \ CACHE_Y(B); \ - timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[(*_PREG)->y_u.OtaLl.s]); \ - if (!VALID_TIMESTAMP(timestamp, (*_PREG)->y_u.OtaLl.d)) { \ - (*_PREG)=(*_PREG)->y_u.OtaLl.n; \ + timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[(*_PREG)->u.OtaLl.s]); \ + if (!VALID_TIMESTAMP(timestamp, (*_PREG)->u.OtaLl.d)) { \ + (*_PREG)=(*_PREG)->u.OtaLl.n; \ JMPNext(); \ } \ - restore_yaam_regs((*_PREG)->y_u.OtaLl.n); \ - restore_args((*_PREG)->y_u.OtaLl.s); \ + restore_yaam_regs((*_PREG)->u.OtaLl.n); \ + restore_args((*_PREG)->u.OtaLl.s); \ LOCAL_RetriesCounter--; \ if (LOCAL_RetriesCounter == 0) { \ saveregs(); \ @@ -348,10 +348,10 @@ setregs(); \ JMPNext(); \ } \ - LOCK((*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); \ - (*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; \ - UNLOCK((*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); \ - (*_PREG) = (*_PREG)->y_u.OtaLl.d->ClCode; \ + LOCK((*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.lock); \ + (*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; \ + UNLOCK((*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.lock); \ + (*_PREG) = (*_PREG)->u.OtaLl.d->ClCode; \ S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); \ set_cut(S_YREG, B->cp_b); \ SET_BB(B_YREG); \ @@ -366,13 +366,13 @@ { \ UInt timestamp; \ CACHE_Y(B); \ - timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[(*_PREG)->y_u.OtaLl.s]); \ - if (!VALID_TIMESTAMP(timestamp, (*_PREG)->y_u.OtaLl.d)) { \ - (*_PREG)=(*_PREG)->y_u.OtaLl.n; \ + timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[(*_PREG)->u.OtaLl.s]); \ + if (!VALID_TIMESTAMP(timestamp, (*_PREG)->u.OtaLl.d)) { \ + (*_PREG)=(*_PREG)->u.OtaLl.n; \ JMPNext(); \ } \ - restore_yaam_regs((*_PREG)->y_u.OtaLl.n); \ - restore_args((*_PREG)->y_u.OtaLl.s); \ + restore_yaam_regs((*_PREG)->u.OtaLl.n); \ + restore_args((*_PREG)->u.OtaLl.s); \ LOCAL_RetriesCounter--; \ if (LOCAL_RetriesCounter == 0) { \ saveregs(); \ @@ -387,10 +387,10 @@ setregs(); \ JMPNext(); \ } \ - LOCK((*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); \ - (*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; \ - UNLOCK((*_PREG)->y_u.OtaLl.d->ClPred->StatisticsForPred.lock); \ - (*_PREG) = (*_PREG)->y_u.OtaLl.d->ClCode; \ + LOCK((*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.lock); \ + (*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; \ + UNLOCK((*_PREG)->u.OtaLl.d->ClPred->StatisticsForPred.lock); \ + (*_PREG) = (*_PREG)->u.OtaLl.d->ClCode; \ set_cut(S_YREG, B_YREG->cp_b); \ SET_BB(B_YREG); \ ENDCACHE_Y(); \ @@ -410,9 +410,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -482,9 +482,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -555,9 +555,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -621,9 +621,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -691,9 +691,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -766,9 +766,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -842,9 +842,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -911,9 +911,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -983,9 +983,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -1057,9 +1057,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -1132,9 +1132,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ @@ -1200,9 +1200,9 @@ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y(B); \ { \ - LogUpdIndex *cl = (*_PREG)->y_u.OtILl.block; \ + LogUpdIndex *cl = (*_PREG)->u.OtILl.block; \ PredEntry *ap = cl->ClPred; \ - LogUpdClause *lcl = (*_PREG)->y_u.OtILl.d; \ + LogUpdClause *lcl = (*_PREG)->u.OtILl.d; \ UInt timestamp = IntegerOfTerm(((CELL *)(B_YREG+1))[ap->ArityOfPE]); \ if (!VALID_TIMESTAMP(timestamp, lcl)) { \ (*_PREG) = FAILCODE; \ diff --git a/JIT/HPP/yaam_call_d.h b/JIT/HPP/yaam_call_d.h index 456795063..b81595cb6 100644 --- a/JIT/HPP/yaam_call_d.h +++ b/JIT/HPP/yaam_call_d.h @@ -4,7 +4,7 @@ register CELL d0; \ PredEntry *pt0; \ register CELL *ENV_YREG = (YREG); \ - pt0 = (*_PREG)->y_u.pp.p; + pt0 = (*_PREG)->u.pp.p; #ifdef LOW_LEVEL_TRACER #define EXECUTE_LOW_LEVEL_TRACER \ @@ -53,14 +53,14 @@ #ifdef LOW_LEVEL_TRACER #define DEXECUTE_LOW_LEVEL_TRACER \ - low_level_trace(enter_pred,(*_PREG)->y_u.pp.p,XREGS+1); + low_level_trace(enter_pred,(*_PREG)->u.pp.p,XREGS+1); #endif #define DEXECUTE_POST_LOW_LEVEL_TRACER \ CACHE_Y_AS_ENV(YREG); \ PredEntry *pt0; \ CACHE_A1(); \ - pt0 = (*_PREG)->y_u.pp.p; + pt0 = (*_PREG)->u.pp.p; #ifdef DEPTH_LIMIT #define DEXECUTE_DEPTH_MINOR \ @@ -169,18 +169,18 @@ #ifdef LOW_LEVEL_TRACER #define CALL_LOW_LEVEL_TRACER \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); #endif #define CALL_POST_LOW_LEVEL_TRACER \ register CELL *ENV_YREG = (YREG); \ PredEntry *pt; \ - pt = (*_PREG)->y_u.Osbpp.p; \ + pt = (*_PREG)->u.Osbpp.p; \ CACHE_A1(); #define CALL_POST_NO_CHECKING \ ENV = ENV_YREG; \ - ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->y_u.Osbpp.s); \ + ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_PREG) = pt->CodeOfPred; \ save_pc(); \ diff --git a/JIT/HPP/yaam_cpred.h b/JIT/HPP/yaam_cpred.h index bf76f0672..5f80dbb57 100644 --- a/JIT/HPP/yaam_cpred.h +++ b/JIT/HPP/yaam_cpred.h @@ -4,14 +4,14 @@ #if (defined(YAPOR_SBA) && defined(YAPOR)) || defined(TABLING) #define CALL_CPRED_TEST_STACK \ - if (!((*_PREG)->y_u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ + if (!((*_PREG)->u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ CACHE_Y_AS_ENV(YREG); \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) { return external_labels[6]; } \ + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) { return external_labels[6]; } \ ENDCACHE_Y_AS_ENV(); \ } #else #define CALL_CPRED_TEST_STACK \ - if (!((*_PREG)->y_u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ + if (!((*_PREG)->u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ CACHE_Y_AS_ENV(YREG); \ if (__builtin_expect(((Int)(Unsigned(ENV_YREG) - Unsigned(HR)) < CreepFlag ), 0) ) { return external_labels[6]; } \ ENDCACHE_Y_AS_ENV(); \ @@ -27,27 +27,27 @@ if (YREG > (CELL *) top_b || YREG < HR) \ ASP = (CELL *)top_b; \ else \ - ASP = (CELL *)(((char *)YREG) + (*_PREG)->y_u.Osbpp.s); + ASP = (CELL *)(((char *)YREG) + (*_PREG)->u.Osbpp.s); #else /* YAPOR_SBA */ #define CALL_CPRED_TOPB \ if (YREG > (CELL *) top_b) \ ASP = (CELL *)top_b; \ else \ - ASP = (CELL *)(((char *)YREG) + (*_PREG)->y_u.Osbpp.s); + ASP = (CELL *)(((char *)YREG) + (*_PREG)->u.Osbpp.s); #endif /* YAPOR_SBA */ #else #define CALL_CPRED_NOFROZEN \ - SET_ASP(YREG, (*_PREG)->y_u.Osbpp.s); + SET_ASP(YREG, (*_PREG)->u.Osbpp.s); #endif #ifdef LOW_LEVEL_TRACER #define CALL_CPRED_LOW_LEVEL_TRACER \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); #endif #define CALL_CPRED_POST_LOW_LEVEL_TRACER \ - CPredicate f = (*_PREG)->y_u.Osbpp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.Osbpp.p->cs.f_code; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -105,7 +105,7 @@ #endif #define EXECUTE_CPRED_POST_FROZEN \ - pt0 = (*_PREG)->y_u.pp.p; + pt0 = (*_PREG)->u.pp.p; #ifdef LOW_LEVEL_TRACER #define EXECUTE_CPRED_LOW_LEVEL_TRACER \ @@ -146,7 +146,7 @@ #define EXECUTE_CPRED_END \ BLOCK = (CELL)EXECUTE_CPRED_END; \ if (!FAILED) { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -172,7 +172,7 @@ #define EXECUTE_CPRED_END \ BLOCK = (CELL)EXECUTE_CPRED_END; \ if (!FAILED) { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -199,7 +199,7 @@ #define EXECUTE_CPRED_END \ BLOCK = (CELL)EXECUTE_CPRED_END; \ if (!FAILED) { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -224,7 +224,7 @@ #define EXECUTE_CPRED_END \ BLOCK = (CELL)EXECUTE_CPRED_END; \ if (!FAILED) { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -251,7 +251,7 @@ #define CALL_USERCPRED_INSTINIT \ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y_AS_ENV(YREG); \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) { return external_labels[6]; } \ + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) { return external_labels[6]; } \ ENDCACHE_Y_AS_ENV(); #else #define CALL_USERCPRED_INSTINIT \ @@ -263,7 +263,7 @@ #ifdef LOW_LEVEL_TRACER #define CALL_USERCPRED_LOW_LEVEL_TRACER \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); #endif #ifdef FROZEN_STACKS @@ -273,18 +273,18 @@ if (YREG > (CELL *) top_b || YREG < HR) \ ASP = (CELL *) top_b; \ else \ - ASP = (CELL *)(((char *)YREG) + (*_PREG)->y_u.Osbpp.s); + ASP = (CELL *)(((char *)YREG) + (*_PREG)->u.Osbpp.s); #else /* YAPOR_SBA */ #define CALL_USERCPRED_FROZEN \ choiceptr top_b = PROTECT_FROZEN_B(B); \ if (YREG > (CELL *) top_b) \ ASP = (CELL *) top_b; \ else \ - ASP = (CELL *)(((char *)YREG) + (*_PREG)->y_u.Osbpp.s); + ASP = (CELL *)(((char *)YREG) + (*_PREG)->u.Osbpp.s); #endif /* YAPOR_SBA */ #else /* FROZEN_STACKS */ #define CALL_USERCPRED_FROZEN \ - SET_ASP(YREG, (*_PREG)->y_u.Osbpp.s); + SET_ASP(YREG, (*_PREG)->u.Osbpp.s); #endif /* FROZEN_STACKS */ #define CALL_USERCPRED_POST_FROZEN \ @@ -292,7 +292,7 @@ Yap_StartSlots( PASS_REGS1 ); \ LOCAL_PrologMode = UserCCallMode; \ { \ - PredEntry *p = (*_PREG)->y_u.Osbpp.p; \ + PredEntry *p = (*_PREG)->u.Osbpp.p; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ savedP = (*_PREG); \ saveregs(); \ diff --git a/JIT/HPP/yaam_cpred_d.h b/JIT/HPP/yaam_cpred_d.h index 93e86e171..88281d8c2 100644 --- a/JIT/HPP/yaam_cpred_d.h +++ b/JIT/HPP/yaam_cpred_d.h @@ -5,14 +5,14 @@ #if (defined(YAPOR_SBA) && defined(YAPOR)) || defined(TABLING) #define CALL_CPRED_TEST_STACK \ - if (!((*_PREG)->y_u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ + if (!((*_PREG)->u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ CACHE_Y_AS_ENV(YREG); \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) { return external_labels[6]; } \ + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) { return external_labels[6]; } \ ENDCACHE_Y_AS_ENV(); \ } #else #define CALL_CPRED_TEST_STACK \ - if (!((*_PREG)->y_u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ + if (!((*_PREG)->u.Osbpp.p->PredFlags & (SafePredFlag|HiddenPredFlag))) { \ CACHE_Y_AS_ENV(YREG); \ if (__builtin_expect(((Int)(Unsigned(ENV_YREG) - Unsigned(HR)) < CreepFlag ), 0) ) { return external_labels[6]; } \ ENDCACHE_Y_AS_ENV(); \ @@ -28,27 +28,27 @@ if (YREG > (CELL *) top_b || YREG < HR) \ ASP = (CELL *)top_b; \ else \ - ASP = (CELL *)(((char *)YREG) + (*_PREG)->y_u.Osbpp.s); + ASP = (CELL *)(((char *)YREG) + (*_PREG)->u.Osbpp.s); #else /* YAPOR_SBA */ #define CALL_CPRED_TOPB \ if (YREG > (CELL *) top_b) \ ASP = (CELL *)top_b; \ else \ - ASP = (CELL *)(((char *)YREG) + (*_PREG)->y_u.Osbpp.s); + ASP = (CELL *)(((char *)YREG) + (*_PREG)->u.Osbpp.s); #endif /* YAPOR_SBA */ #else #define CALL_CPRED_NOFROZEN \ - SET_ASP(YREG, (*_PREG)->y_u.Osbpp.s); + SET_ASP(YREG, (*_PREG)->u.Osbpp.s); #endif #ifdef LOW_LEVEL_TRACER #define CALL_CPRED_LOW_LEVEL_TRACER \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); #endif #define CALL_CPRED_POST_LOW_LEVEL_TRACER \ - CPredicate f = (*_PREG)->y_u.Osbpp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.Osbpp.p->cs.f_code; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -107,7 +107,7 @@ #endif #define EXECUTE_CPRED_POST_FROZEN \ - pt0 = (*_PREG)->y_u.pp.p; + pt0 = (*_PREG)->u.pp.p; #ifdef LOW_LEVEL_TRACER #define EXECUTE_CPRED_LOW_LEVEL_TRACER \ @@ -148,7 +148,7 @@ #define EXECUTE_CPRED_END \ BLOCK = (CELL)EXECUTE_CPRED_END; \ if (!FAILED) { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -174,7 +174,7 @@ #define EXECUTE_CPRED_END \ BLOCK = (CELL)EXECUTE_CPRED_END; \ if (!FAILED) { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -201,7 +201,7 @@ #define EXECUTE_CPRED_END \ BLOCK = (CELL)EXECUTE_CPRED_END; \ if (!FAILED) { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -226,7 +226,7 @@ #define EXECUTE_CPRED_END \ BLOCK = (CELL)EXECUTE_CPRED_END; \ if (!FAILED) { \ - CPredicate f = (*_PREG)->y_u.pp.p->cs.f_code; \ + CPredicate f = (*_PREG)->u.pp.p->cs.f_code; \ yamop *oldPREG = (*_PREG); \ saveregs(); \ d0 = (f)(PASS_REGS1); \ @@ -254,7 +254,7 @@ print_instruction((*_PREG), ON_NATIVE); \ BLOCKADDRESS = (CELL)(*_PREG); \ CACHE_Y_AS_ENV(YREG); \ - if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,HR))) < CreepFlag), 0) ) { return external_labels[6]; } \ + if (__builtin_expect( ((Int)(Unsigned(YOUNGEST_CP((choiceptr)ENV_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,H))) < CreepFlag), 0) ) { return external_labels[6]; } \ ENDCACHE_Y_AS_ENV(); #else #define CALL_USERCPRED_INSTINIT \ @@ -267,7 +267,7 @@ #ifdef LOW_LEVEL_TRACER #define CALL_USERCPRED_LOW_LEVEL_TRACER \ - low_level_trace(enter_pred,(*_PREG)->y_u.Osbpp.p,XREGS+1); + low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); #endif #ifdef FROZEN_STACKS @@ -277,18 +277,18 @@ if (YREG > (CELL *) top_b || YREG < HR) \ ASP = (CELL *) top_b; \ else \ - ASP = (CELL *)(((char *)YREG) + (*_PREG)->y_u.Osbpp.s); + ASP = (CELL *)(((char *)YREG) + (*_PREG)->u.Osbpp.s); #else /* YAPOR_SBA */ #define CALL_USERCPRED_FROZEN \ choiceptr top_b = PROTECT_FROZEN_B(B); \ if (YREG > (CELL *) top_b) \ ASP = (CELL *) top_b; \ else \ - ASP = (CELL *)(((char *)YREG) + (*_PREG)->y_u.Osbpp.s); + ASP = (CELL *)(((char *)YREG) + (*_PREG)->u.Osbpp.s); #endif /* YAPOR_SBA */ #else /* FROZEN_STACKS */ #define CALL_USERCPRED_FROZEN \ - SET_ASP(YREG, (*_PREG)->y_u.Osbpp.s); + SET_ASP(YREG, (*_PREG)->u.Osbpp.s); #endif /* FROZEN_STACKS */ #define CALL_USERCPRED_POST_FROZEN \ @@ -296,7 +296,7 @@ Yap_StartSlots( PASS_REGS1 ); \ LOCAL_PrologMode = UserCCallMode; \ { \ - PredEntry *p = (*_PREG)->y_u.Osbpp.p; \ + PredEntry *p = (*_PREG)->u.Osbpp.p; \ (*_PREG) = NEXTOP((*_PREG), Osbpp); \ savedP = (*_PREG); \ saveregs(); \ diff --git a/JIT/HPP/yaam_cut.h b/JIT/HPP/yaam_cut.h index e244e026e..bf8da05ab 100644 --- a/JIT/HPP/yaam_cut.h +++ b/JIT/HPP/yaam_cut.h @@ -8,7 +8,7 @@ #endif #define CUT_NOCOROUTINING \ - SET_ASP(YREG, (*_PREG)->y_u.s.s); \ + SET_ASP(YREG, (*_PREG)->u.s.s); \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), s),Osbpp),l); \ saveregs(); \ prune((choiceptr)YREG[E_CB]); \ @@ -25,7 +25,7 @@ #endif #define CUT_T_NOCOROUTINING \ - SET_ASP(YREG, (*_PREG)->y_u.s.s); \ + SET_ASP(YREG, (*_PREG)->u.s.s); \ saveregs(); \ prune((choiceptr)YREG[E_CB]); \ setregs(); \ @@ -42,7 +42,7 @@ #endif #define CUT_E_NOCOROUTINING \ - SET_ASP(YREG, (*_PREG)->y_u.s.s); \ + SET_ASP(YREG, (*_PREG)->u.s.s); \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), s),Osbpp),l); \ saveregs(); \ prune((choiceptr)(*_SREG)[E_CB]); \ @@ -51,7 +51,7 @@ #define SAVE_B_X_INSTINIT \ register CELL d0; \ - d0 = (*_PREG)->y_u.x.x; + d0 = (*_PREG)->u.x.x; #if defined(YAPOR_SBA) && defined(FROZEN_STACKS) #define SAVE_B_X_YSBA_FROZEN \ @@ -69,10 +69,10 @@ #if defined(YAPOR_SBA) #define SAVE_B_Y_YSBA \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.y.y,MkIntegerTerm((Int)B)); + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.y.y,MkIntegerTerm((Int)B)); #else #define SAVE_B_Y_NOYSBA \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.y.y,MkIntegerTerm(LCL0-(CELL *)(B))); + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.y.y,MkIntegerTerm(LCL0-(CELL *)(B))); #endif #define SAVE_B_Y_END \ @@ -84,10 +84,10 @@ register CELL *pt1; #define COMMIT_B_X_DO_COMMIT_B_X \ - d0 = XREG((*_PREG)->y_u.xps.x); + d0 = XREG((*_PREG)->u.xps.x); #define COMMIT_B_X_COMMIT_B_X_NVAR \ - SET_ASP(YREG, (*_PREG)->y_u.xps.s); \ + SET_ASP(YREG, (*_PREG)->u.xps.s); \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xps),Osbpp),l); \ choiceptr pt0; @@ -112,10 +112,10 @@ register CELL *pt1; #define COMMIT_B_Y_DO_COMMIT_B_Y \ - d0 = YREG[(*_PREG)->y_u.yps.y]; + d0 = YREG[(*_PREG)->u.yps.y]; #define COMMIT_B_Y_COMMIT_B_Y_NVAR \ - SET_ASP(YREG, (*_PREG)->y_u.yps.s); \ + SET_ASP(YREG, (*_PREG)->u.yps.s); \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yps),Osbpp),l); \ choiceptr pt0; diff --git a/JIT/HPP/yaam_cut_d.h b/JIT/HPP/yaam_cut_d.h index afb8c94d6..c24305d30 100644 --- a/JIT/HPP/yaam_cut_d.h +++ b/JIT/HPP/yaam_cut_d.h @@ -9,7 +9,7 @@ #endif #define CUT_NOCOROUTINING \ - SET_ASP(YREG, (*_PREG)->y_u.s.s); \ + SET_ASP(YREG, (*_PREG)->u.s.s); \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), s),Osbpp),l); \ saveregs(); \ prune((choiceptr)YREG[E_CB]); \ @@ -27,7 +27,7 @@ #endif #define CUT_T_NOCOROUTINING \ - SET_ASP(YREG, (*_PREG)->y_u.s.s); \ + SET_ASP(YREG, (*_PREG)->u.s.s); \ saveregs(); \ prune((choiceptr)YREG[E_CB]); \ setregs(); \ @@ -45,7 +45,7 @@ #endif #define CUT_E_NOCOROUTINING \ - SET_ASP(YREG, (*_PREG)->y_u.s.s); \ + SET_ASP(YREG, (*_PREG)->u.s.s); \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), s),Osbpp),l); \ saveregs(); \ prune((choiceptr)(*_SREG)[E_CB]); \ @@ -55,7 +55,7 @@ #define SAVE_B_X_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = (*_PREG)->y_u.x.x; + d0 = (*_PREG)->u.x.x; #if defined(YAPOR_SBA) && defined(FROZEN_STACKS) #define SAVE_B_X_YSBA_FROZEN \ @@ -73,10 +73,10 @@ #if defined(YAPOR_SBA) #define SAVE_B_Y_YSBA \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.y.y,MkIntegerTerm((Int)B)); + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.y.y,MkIntegerTerm((Int)B)); #else #define SAVE_B_Y_NOYSBA \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.y.y,MkIntegerTerm(LCL0-(CELL *)(B))); + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.y.y,MkIntegerTerm(LCL0-(CELL *)(B))); #endif #define SAVE_B_Y_END \ @@ -89,10 +89,10 @@ register CELL *pt1; #define COMMIT_B_X_DO_COMMIT_B_X \ - d0 = XREG((*_PREG)->y_u.xps.x); + d0 = XREG((*_PREG)->u.xps.x); #define COMMIT_B_X_COMMIT_B_X_NVAR \ - SET_ASP(YREG, (*_PREG)->y_u.xps.s); \ + SET_ASP(YREG, (*_PREG)->u.xps.s); \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xps),Osbpp),l); \ choiceptr pt0; @@ -118,10 +118,10 @@ register CELL *pt1; #define COMMIT_B_Y_DO_COMMIT_B_Y \ - d0 = YREG[(*_PREG)->y_u.yps.y]; + d0 = YREG[(*_PREG)->u.yps.y]; #define COMMIT_B_Y_COMMIT_B_Y_NVAR \ - SET_ASP(YREG, (*_PREG)->y_u.yps.s); \ + SET_ASP(YREG, (*_PREG)->u.yps.s); \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yps),Osbpp),l); \ choiceptr pt0; diff --git a/JIT/HPP/yaam_failure.h b/JIT/HPP/yaam_failure.h index 0207becfd..bd3bc48ee 100644 --- a/JIT/HPP/yaam_failure.h +++ b/JIT/HPP/yaam_failure.h @@ -392,14 +392,14 @@ } \ case _jump: \ { \ - ipc = ipc->y_u.l.l; \ + ipc = ipc->u.l.l; \ go_on = TRUE; \ break; \ } \ case _retry_c: \ case _retry_userc: \ { \ - low_level_trace(retry_pred, ipc->y_u.OtapFs.p, B->cp_args); \ + low_level_trace(retry_pred, ipc->u.OtapFs.p, B->cp_args); \ break; \ } \ case _retry_profiled: \ @@ -420,7 +420,7 @@ case _retry: \ case _trust: \ { \ - low_level_trace(retry_pred, ipc->y_u.Otapl.p, B->cp_args); \ + low_level_trace(retry_pred, ipc->u.Otapl.p, B->cp_args); \ break; \ } \ case _try_logical: \ @@ -431,7 +431,7 @@ case _profiled_trust_logical: \ case _count_trust_logical: \ { \ - low_level_trace(retry_pred, ipc->y_u.OtILl.d->ClPred, B->cp_args); \ + low_level_trace(retry_pred, ipc->u.OtILl.d->ClPred, B->cp_args); \ break; \ } \ case _Nstop: \ @@ -543,7 +543,7 @@ pt0 = (tr_fr_ptr) pt1; \ continue; \ } else \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -574,7 +574,7 @@ pt0 = (tr_fr_ptr) pt1; \ continue; \ } else \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -599,7 +599,7 @@ insert_into_global_sg_fr_list(sg_fr); \ continue; \ } \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -623,7 +623,7 @@ pt0 = (tr_fr_ptr) pt1; \ continue; \ } else \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -647,7 +647,7 @@ pt0 = (tr_fr_ptr) pt1; \ continue; \ } else \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -665,7 +665,7 @@ { \ register CELL flags; \ CELL *pt1 = RepPair(d1); \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -697,7 +697,7 @@ pt0 = (tr_fr_ptr) pt1; \ continue; \ } else \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -727,7 +727,7 @@ pt0 = (tr_fr_ptr) pt1; \ continue; \ } else \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -751,7 +751,7 @@ insert_into_global_sg_fr_list(sg_fr); \ continue; \ } \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -774,7 +774,7 @@ pt0 = (tr_fr_ptr) pt1; \ continue; \ } else \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -797,7 +797,7 @@ pt0 = (tr_fr_ptr) pt1; \ continue; \ } else \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -814,7 +814,7 @@ { \ register CELL flags; \ CELL *pt1 = RepPair(d1); \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ diff --git a/JIT/HPP/yaam_failure_d.h b/JIT/HPP/yaam_failure_d.h index 6b07b8bd5..6aa7b9e4e 100644 --- a/JIT/HPP/yaam_failure_d.h +++ b/JIT/HPP/yaam_failure_d.h @@ -413,14 +413,14 @@ } \ case _jump: \ { \ - ipc = ipc->y_u.l.l; \ + ipc = ipc->u.l.l; \ go_on = TRUE; \ break; \ } \ case _retry_c: \ case _retry_userc: \ { \ - low_level_trace(retry_pred, ipc->y_u.OtapFs.p, B->cp_args); \ + low_level_trace(retry_pred, ipc->u.OtapFs.p, B->cp_args); \ break; \ } \ case _retry_profiled: \ @@ -441,7 +441,7 @@ case _retry: \ case _trust: \ { \ - low_level_trace(retry_pred, ipc->y_u.Otapl.p, B->cp_args); \ + low_level_trace(retry_pred, ipc->u.Otapl.p, B->cp_args); \ break; \ } \ case _try_logical: \ @@ -452,7 +452,7 @@ case _profiled_trust_logical: \ case _count_trust_logical: \ { \ - low_level_trace(retry_pred, ipc->y_u.OtILl.d->ClPred, B->cp_args); \ + low_level_trace(retry_pred, ipc->u.OtILl.d->ClPred, B->cp_args); \ break; \ } \ case _Nstop: \ @@ -564,7 +564,7 @@ pt0 = (tr_fr_ptr) pt1; \ continue; \ } else \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -595,7 +595,7 @@ pt0 = (tr_fr_ptr) pt1; \ continue; \ } else \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -620,7 +620,7 @@ insert_into_global_sg_fr_list(sg_fr); \ continue; \ } \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -644,7 +644,7 @@ pt0 = (tr_fr_ptr) pt1; \ continue; \ } else \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -668,7 +668,7 @@ pt0 = (tr_fr_ptr) pt1; \ continue; \ } else \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -686,7 +686,7 @@ { \ register CELL flags; \ CELL *pt1 = RepPair(d1); \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -718,7 +718,7 @@ pt0 = (tr_fr_ptr) pt1; \ continue; \ } else \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -748,7 +748,7 @@ pt0 = (tr_fr_ptr) pt1; \ continue; \ } else \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -772,7 +772,7 @@ insert_into_global_sg_fr_list(sg_fr); \ continue; \ } \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -795,7 +795,7 @@ pt0 = (tr_fr_ptr) pt1; \ continue; \ } else \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -818,7 +818,7 @@ pt0 = (tr_fr_ptr) pt1; \ continue; \ } else \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ @@ -835,7 +835,7 @@ { \ register CELL flags; \ CELL *pt1 = RepPair(d1); \ - if (IN_BETWEEN(H0,pt1,HR)) { \ + if (IN_BETWEEN(H0,pt1,H)) { \ if (IsAttVar(pt1)) { \ continue; \ } else if (*pt1 == (CELL)FunctorBigInt) { \ diff --git a/JIT/HPP/yaam_get.h b/JIT/HPP/yaam_get.h index 34cd38f66..b9815b209 100644 --- a/JIT/HPP/yaam_get.h +++ b/JIT/HPP/yaam_get.h @@ -1,15 +1,15 @@ #define GET_X_VAR_INSTINIT \ register CELL d0; \ - d0 = XREG((*_PREG)->y_u.xx.xr); \ - XREG((*_PREG)->y_u.xx.xl) = d0; \ + d0 = XREG((*_PREG)->u.xx.xr); \ + XREG((*_PREG)->u.xx.xl) = d0; \ (*_PREG) = NEXTOP((*_PREG), xx); \ GONext(); #define GET_Y_VAR_INSTINIT \ register CELL d0; \ register CELL *pt0; \ - pt0 = YREG + (*_PREG)->y_u.yx.y; \ - d0 = XREG((*_PREG)->y_u.yx.x); \ + pt0 = YREG + (*_PREG)->u.yx.y; \ + d0 = XREG((*_PREG)->u.yx.x); \ (*_PREG) = NEXTOP((*_PREG), yx); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -18,10 +18,10 @@ register CELL d0, d1; \ register CELL *pt0, *pt1; \ CACHE_Y(YREG); \ - pt0 = S_YREG + (*_PREG)->y_u.yyxx.y1; \ - d0 = XREG((*_PREG)->y_u.yyxx.x1); \ - pt1 = S_YREG + (*_PREG)->y_u.yyx.y2; \ - d1 = XREG((*_PREG)->y_u.yyxx.x2); \ + pt0 = S_YREG + (*_PREG)->u.yyxx.y1; \ + d0 = XREG((*_PREG)->u.yyxx.x1); \ + pt1 = S_YREG + (*_PREG)->u.yyx.y2; \ + d1 = XREG((*_PREG)->u.yyxx.x2); \ (*_PREG) = NEXTOP((*_PREG), yyxx); \ INITIALIZE_PERMVAR(pt0,d0); \ INITIALIZE_PERMVAR(pt1,d1); \ @@ -32,10 +32,10 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.xx.xl); + d0 = XREG((*_PREG)->u.xx.xl); #define GET_X_VAL_GVALX_NONVAR \ - d1 = XREG((*_PREG)->y_u.xx.xr); + d1 = XREG((*_PREG)->u.xx.xr); #define GET_X_VAL_GVALX_NONVAR_NONVAR \ BLOCK = (CELL)GET_X_VAL_GVALX_NONVAR_NONVAR; \ @@ -48,7 +48,7 @@ GONext(); #define GET_X_VAL_GVALX_UNK \ - d1 = XREG((*_PREG)->y_u.xx.xr); + d1 = XREG((*_PREG)->u.xx.xr); #define GET_X_VAL_GVALX_VAR_NONVAR \ (*_PREG) = NEXTOP((*_PREG), xx); \ @@ -63,11 +63,11 @@ #define GET_Y_VAL_INSTINIT \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - pt0 = YREG + (*_PREG)->y_u.yx.y; \ + pt0 = YREG + (*_PREG)->u.yx.y; \ d0 = *pt0; #define GET_Y_VAL_GVALY_NONVAR \ - d1 = XREG((*_PREG)->y_u.yx.x); + d1 = XREG((*_PREG)->u.yx.x); #define GET_Y_VAL_GVALY_NONVAR_NONVAR \ BLOCK = (CELL)GET_Y_VAL_GVALY_NONVAR_NONVAR; \ @@ -80,7 +80,7 @@ GONext(); #define GET_Y_VAL_GVALY_UNK \ - d1 = XREG((*_PREG)->y_u.yx.x); + d1 = XREG((*_PREG)->u.yx.x); #define GET_Y_VAL_GVALY_VAR_NONVAR \ (*_PREG) = NEXTOP((*_PREG), yx); \ @@ -96,8 +96,8 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xc.x); \ - d1 = (*_PREG)->y_u.xc.c; + d0 = XREG((*_PREG)->u.xc.x); \ + d1 = (*_PREG)->u.xc.c; #define GET_ATOM_GATOM_NONVAR \ BLOCK = (CELL)GET_ATOM_GATOM_NONVAR; \ @@ -121,11 +121,11 @@ d0 = ARG1; #define GET_2ATOMS_GATOM_2UNK \ - Bind(pt0, (*_PREG)->y_u.cc.c1); + Bind(pt0, (*_PREG)->u.cc.c1); #define GET_2ATOMS_GATOM_2B \ d0 = ARG2; \ - d1 = (*_PREG)->y_u.cc.c2; + d1 = (*_PREG)->u.cc.c2; #define GET_2ATOMS_GATOM_2BNONVAR \ BLOCK = (CELL)GET_2ATOMS_GATOM_2BNONVAR; \ @@ -149,17 +149,17 @@ d0 = ARG1; #define GET_3ATOMS_GATOM_3UNK \ - Bind(pt0, (*_PREG)->y_u.ccc.c1); + Bind(pt0, (*_PREG)->u.ccc.c1); #define GET_3ATOMS_GATOM_3B \ d0 = ARG2; #define GET_3ATOMS_GATOM_3BUNK \ - Bind(pt0, (*_PREG)->y_u.ccc.c2); + Bind(pt0, (*_PREG)->u.ccc.c2); #define GET_3ATOMS_GATOM_3C \ d0 = ARG3; \ - d1 = (*_PREG)->y_u.ccc.c3; + d1 = (*_PREG)->u.ccc.c3; #define GET_3ATOMS_GATOM_3CNONVAR \ BLOCK = (CELL)GET_3ATOMS_GATOM_3CNONVAR; \ @@ -183,23 +183,23 @@ d0 = ARG1; #define GET_4ATOMS_GATOM_4UNK \ - Bind(pt0, (*_PREG)->y_u.cccc.c1); + Bind(pt0, (*_PREG)->u.cccc.c1); #define GET_4ATOMS_GATOM_4B \ d0 = ARG2; #define GET_4ATOMS_GATOM_4BUNK \ - Bind(pt0, (*_PREG)->y_u.cccc.c2); + Bind(pt0, (*_PREG)->u.cccc.c2); #define GET_4ATOMS_GATOM_4C \ d0 = ARG3; #define GET_4ATOMS_GATOM_4CUNK \ - Bind(pt0, (*_PREG)->y_u.cccc.c3); + Bind(pt0, (*_PREG)->u.cccc.c3); #define GET_4ATOMS_GATOM_4D \ d0 = ARG4; \ - d1 = (*_PREG)->y_u.cccc.c4; + d1 = (*_PREG)->u.cccc.c4; #define GET_4ATOMS_GATOM_4DNONVAR \ BLOCK = (CELL)GET_4ATOMS_GATOM_4DNONVAR; \ @@ -223,29 +223,29 @@ d0 = ARG1; #define GET_5ATOMS_GATOM_5UNK \ - Bind(pt0, (*_PREG)->y_u.ccccc.c1); + Bind(pt0, (*_PREG)->u.ccccc.c1); #define GET_5ATOMS_GATOM_5B \ d0 = ARG2; #define GET_5ATOMS_GATOM_5BUNK \ - Bind(pt0, (*_PREG)->y_u.ccccc.c2); + Bind(pt0, (*_PREG)->u.ccccc.c2); #define GET_5ATOMS_GATOM_5C \ d0 = ARG3; #define GET_5ATOMS_GATOM_5CUNK \ - Bind(pt0, (*_PREG)->y_u.ccccc.c3); + Bind(pt0, (*_PREG)->u.ccccc.c3); #define GET_5ATOMS_GATOM_5D \ d0 = ARG4; #define GET_5ATOMS_GATOM_5DUNK \ - Bind(pt0, (*_PREG)->y_u.ccccc.c4); + Bind(pt0, (*_PREG)->u.ccccc.c4); #define GET_5ATOMS_GATOM_5E \ d0 = ARG5; \ - d1 = (*_PREG)->y_u.ccccc.c5; + d1 = (*_PREG)->u.ccccc.c5; #define GET_5ATOMS_GATOM_5ENONVAR \ BLOCK = (CELL)GET_5ATOMS_GATOM_5ENONVAR; \ @@ -269,35 +269,35 @@ d0 = ARG1; #define GET_6ATOMS_GATOM_6UNK \ - Bind(pt0, (*_PREG)->y_u.cccccc.c1); + Bind(pt0, (*_PREG)->u.cccccc.c1); #define GET_6ATOMS_GATOM_6B \ d0 = ARG2; #define GET_6ATOMS_GATOM_6BUNK \ - Bind(pt0, (*_PREG)->y_u.cccccc.c2); + Bind(pt0, (*_PREG)->u.cccccc.c2); #define GET_6ATOMS_GATOM_6C \ d0 = ARG3; #define GET_6ATOMS_GATOM_6CUNK \ - Bind(pt0, (*_PREG)->y_u.cccccc.c3); + Bind(pt0, (*_PREG)->u.cccccc.c3); #define GET_6ATOMS_GATOM_6D \ d0 = ARG4; #define GET_6ATOMS_GATOM_6DUNK \ - Bind(pt0, (*_PREG)->y_u.cccccc.c4); + Bind(pt0, (*_PREG)->u.cccccc.c4); #define GET_6ATOMS_GATOM_6E \ d0 = ARG5; #define GET_6ATOMS_GATOM_6EUNK \ - Bind(pt0, (*_PREG)->y_u.cccccc.c5); + Bind(pt0, (*_PREG)->u.cccccc.c5); #define GET_6ATOMS_GATOM_6F \ d0 = ARG6; \ - d1 = (*_PREG)->y_u.cccccc.c6; + d1 = (*_PREG)->u.cccccc.c6; #define GET_6ATOMS_GATOM_6FNONVAR \ BLOCK = (CELL)GET_6ATOMS_GATOM_6FNONVAR; \ @@ -319,7 +319,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.x.x); + d0 = XREG((*_PREG)->u.x.x); #define GET_LIST_GLIST_NONVAR \ BLOCK = (CELL)GET_LIST_GLIST_NONVAR; \ @@ -351,7 +351,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xfa.x); + d0 = XREG((*_PREG)->u.xfa.x); #define GET_STRUCT_GSTRUCT_NONVAR \ BLOCK = (CELL)GET_STRUCT_GSTRUCT_NONVAR; \ @@ -362,7 +362,7 @@ else { \ register CELL * S_SREG; \ S_SREG = RepAppl(d0); \ - d0 = (CELL) ((*_PREG)->y_u.xfa.f); \ + d0 = (CELL) ((*_PREG)->u.xfa.f); \ if (*S_SREG != d0) { \ YAAM_FAIL; \ } \ @@ -378,9 +378,9 @@ d1 = AbsAppl(HR); \ Bind(pt0, d1); \ pt0 = HR; \ - d0 = (CELL) ((*_PREG)->y_u.xfa.f); \ + d0 = (CELL) ((*_PREG)->u.xfa.f); \ *pt0++ = d0; \ - HR = pt0 + (*_PREG)->y_u.xfa.a; \ + HR = pt0 + (*_PREG)->u.xfa.a; \ (*_PREG) = NEXTOP((*_PREG), xfa); \ (*_SREG) = pt0; \ GONextW(); \ @@ -390,7 +390,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.xd.x); + d0 = XREG((*_PREG)->u.xd.x); #if SIZEOF_DOUBLE == 2*SIZEOF_INT_P #define GET_FLOAT_GFLOAT_NONVAR \ @@ -405,7 +405,7 @@ YAAM_FAIL; \ } \ else { \ - pt1 = (*_PREG)->y_u.xd.d; \ + pt1 = (*_PREG)->u.xd.d; \ (*_PREG) = NEXTOP((*_PREG), xd); \ if ( \ pt1[1] != pt0[1] \ @@ -431,7 +431,7 @@ YAAM_FAIL; \ } \ else { \ - pt1 = (*_PREG)->y_u.xd.d; \ + pt1 = (*_PREG)->u.xd.d; \ (*_PREG) = NEXTOP((*_PREG), xd); \ if ( \ pt1[1] != pt0[1] \ @@ -447,7 +447,7 @@ #define GET_FLOAT_GFLOAT_UNK \ START_PREFETCH(xc); \ - d1 = AbsAppl((*_PREG)->y_u.xd.d); \ + d1 = AbsAppl((*_PREG)->u.xd.d); \ (*_PREG) = NEXTOP((*_PREG), xd); \ Bind(pt0, d1); \ GONext(); \ @@ -456,7 +456,7 @@ #define GET_LONGINT_INSTINIT \ register CELL d0, d1; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xi.x); + d0 = XREG((*_PREG)->u.xi.x); #define GET_LONGINT_GLONGINT_NONVAR \ BLOCK = (CELL)GET_LONGINT_GLONGINT_NONVAR; \ @@ -469,7 +469,7 @@ if (*pt0 != (CELL)FunctorLongInt) { \ YAAM_FAIL; \ } \ - if ((*_PREG)->y_u.xi.i[1] != (CELL)pt0[1]) { \ + if ((*_PREG)->u.xi.i[1] != (CELL)pt0[1]) { \ YAAM_FAIL; \ } \ } \ @@ -480,7 +480,7 @@ #define GET_LONGINT_GLONGINT_UNK \ START_PREFETCH(xi); \ - d1 = AbsAppl((*_PREG)->y_u.xi.i); \ + d1 = AbsAppl((*_PREG)->u.xi.i); \ (*_PREG) = NEXTOP((*_PREG), xi); \ Bind(pt0, d1); \ GONext(); \ @@ -490,7 +490,7 @@ #define GET_BIGINT_INSTINIT \ register CELL d0, d1; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xN.x); + d0 = XREG((*_PREG)->u.xN.x); #define GET_BIGINT_GBIGINT_NONVAR \ BLOCK = (CELL)GET_BIGINT_GBIGINT_NONVAR; \ @@ -503,7 +503,7 @@ if (*pt0 != (CELL)FunctorBigInt) { \ YAAM_FAIL; \ } \ - if (Yap_gmp_tcmp_big_big(d0,(*_PREG)->y_u.xN.b)) { \ + if (Yap_gmp_tcmp_big_big(d0,(*_PREG)->u.xN.b)) { \ YAAM_FAIL; \ } \ } \ @@ -514,7 +514,7 @@ #define GET_BIGINT_GBIGINT_UNK \ START_PREFETCH(xN); \ - d1 = (*_PREG)->y_u.xN.b; \ + d1 = (*_PREG)->u.xN.b; \ (*_PREG) = NEXTOP((*_PREG), xN); \ Bind(pt0, d1); \ GONext(); \ @@ -524,17 +524,17 @@ #define GET_DBTERM_INSTINIT \ register CELL d0, d1; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xD.x); + d0 = XREG((*_PREG)->u.xD.x); #define GET_DBTERM_GDBTERM_NONVAR \ BLOCK = (CELL)GET_DBTERM_GDBTERM_NONVAR; \ - d1 = (*_PREG)->y_u.xD.D; \ + d1 = (*_PREG)->u.xD.D; \ (*_PREG) = NEXTOP((*_PREG), xD); \ YAAM_UNIFYBOUND; #define GET_DBTERM_GDBTERM_UNK \ START_PREFETCH(xD); \ - d1 = (*_PREG)->y_u.xD.D; \ + d1 = (*_PREG)->u.xD.D; \ (*_PREG) = NEXTOP((*_PREG), xD); \ Bind(pt0, d1); \ GONext(); \ @@ -544,7 +544,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.xx.xl); \ + d0 = XREG((*_PREG)->u.xx.xl); \ if (!IsVarTerm(d0)) { \ printf("Oops!\n"); \ exit(1); \ @@ -563,7 +563,7 @@ } #define GLIST_VALX_GLIST_VALX_NONVAR \ - d1 = XREG((*_PREG)->y_u.xx.xr); + d1 = XREG((*_PREG)->u.xx.xr); #define GLIST_VALX_GLIST_VALX_NONVAR_NONVAR \ BLOCK = (CELL)GLIST_VALX_GLIST_VALX_NONVAR_NONVAR; \ @@ -576,7 +576,7 @@ GONext(); #define GLIST_VALX_GLIST_VALX_UNK \ - d0 = XREG((*_PREG)->y_u.xx.xr); + d0 = XREG((*_PREG)->u.xx.xr); #define GLIST_VALX_GLIST_VALX_VAR_NONVAR \ (*_PREG) = NEXTOP((*_PREG), xx); \ @@ -591,7 +591,7 @@ #define GLIST_VALX_GLIST_VALX_WRITE \ CACHE_S(); \ S_SREG = HR; \ - d1 = XREG((*_PREG)->y_u.xx.xr); \ + d1 = XREG((*_PREG)->u.xx.xr); \ d0 = AbsPair(S_SREG); \ S_SREG[0] = d1; \ ALWAYS_START_PREFETCH_W(xx); \ @@ -606,7 +606,7 @@ #define GLIST_VALY_INSTINIT \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.yx.x); + d0 = XREG((*_PREG)->u.yx.x); #define GLIST_VALY_GLIST_VALY_READ \ if (!IsPairTerm(d0)) { \ @@ -618,7 +618,7 @@ d0 = *pt0; #define GLIST_VALY_GLIST_VALY_NONVAR \ - pt1 = YREG + (*_PREG)->y_u.yx.y; \ + pt1 = YREG + (*_PREG)->u.yx.y; \ d1 = *pt1; \ (*_PREG) = NEXTOP((*_PREG), yx); @@ -632,7 +632,7 @@ GONext(); #define GLIST_VALY_GLIST_VALY_UNK \ - pt1 = YREG+(*_PREG)->y_u.yx.y; \ + pt1 = YREG+(*_PREG)->u.yx.y; \ d1 = *pt1; #define GLIST_VALY_GLIST_VALY_VAR_NONVAR \ @@ -651,7 +651,7 @@ pt1 = HR; \ d0 = AbsPair(pt1); \ Bind(pt0, d0); \ - d0 = YREG[(*_PREG)->y_u.yx.y]; \ + d0 = YREG[(*_PREG)->u.yx.y]; \ pt1[0] = d0; \ HR = pt1 + 2; \ (*_SREG) = pt1 + 1; \ @@ -663,7 +663,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.xx.xl); + d0 = XREG((*_PREG)->u.xx.xl); #define GL_VOID_VARX_GLIST_VOID_VARX_READ \ BLOCK = (CELL)GL_VOID_VARX_GLIST_VOID_VARX_READ; \ @@ -674,14 +674,14 @@ else { \ pt0 = RepPair(d0); \ d0 = pt0[1]; \ - XREG((*_PREG)->y_u.xx.xr) = d0; \ + XREG((*_PREG)->u.xx.xr) = d0; \ (*_PREG) = NEXTOP((*_PREG), xx); \ ALWAYS_GONext(); \ } #define GL_VOID_VARX_GLIST_VOID_VAR_WRITE \ pt1 = HR; \ - XREG((*_PREG)->y_u.xx.xr) = \ + XREG((*_PREG)->u.xx.xr) = \ Unsigned(pt1 + 1); \ RESET_VARIABLE(pt1); \ RESET_VARIABLE(pt1+1); \ @@ -695,7 +695,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.yx.x); + d0 = XREG((*_PREG)->u.yx.x); #define GL_VOID_VARY_GLIST_VOID_VARY_READ \ BLOCK = (CELL)GL_VOID_VARY_GLIST_VOID_VARY_READ; \ @@ -706,14 +706,14 @@ else { \ pt0 = RepPair(d0); \ d0 = pt0[1]; \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.yx.y,d0); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.yx.y,d0); \ (*_PREG) = NEXTOP((*_PREG), yx); \ GONext(); \ } #define GL_VOID_VARY_GLIST_VOID_VARY_WRITE \ pt1 = HR; \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.yx.y,Unsigned(pt1 + 1)); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.yx.y,Unsigned(pt1 + 1)); \ (*_PREG) = NEXTOP((*_PREG), yx); \ RESET_VARIABLE(pt1); \ RESET_VARIABLE(pt1+1); \ @@ -726,7 +726,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.xx.xl); + d0 = XREG((*_PREG)->u.xx.xl); #define GL_VOID_VALX_GLIST_VOID_VALX_READ \ BLOCK = (CELL)GL_VOID_VALX_GLIST_VOID_VALX_READ; \ @@ -740,7 +740,7 @@ } #define GL_VOID_VALX_GLIST_VOID_VALX_NONVAR \ - d1 = XREG((*_PREG)->y_u.xx.xr); + d1 = XREG((*_PREG)->u.xx.xr); #define GL_VOID_VALX_GLIST_VOID_VALX_NONVAR_NONVAR \ BLOCK = (CELL)GL_VOID_VALX_GLIST_VOID_VALX_NONVAR_NONVAR; \ @@ -753,7 +753,7 @@ GONext(); #define GL_VOID_VALX_GLIST_VOID_VALX_UNK \ - d1 = XREG((*_PREG)->y_u.xx.xr); + d1 = XREG((*_PREG)->u.xx.xr); #define GL_VOID_VALX_GLIST_VOID_VALX_VAR_NONVAR \ (*_PREG) = NEXTOP((*_PREG), xx); \ @@ -770,7 +770,7 @@ d0 = AbsPair(pt1); \ Bind(pt0, d0); \ pt1 = HR; \ - d0 = XREG((*_PREG)->y_u.xx.xr); \ + d0 = XREG((*_PREG)->u.xx.xr); \ RESET_VARIABLE(pt1); \ pt1[1] = d0; \ HR = pt1 + 2; \ @@ -781,7 +781,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.yx.x); + d0 = XREG((*_PREG)->u.yx.x); #define GL_VOID_VALY_GLIST_VOID_VALY_READ \ BLOCK = (CELL)GL_VOID_VALY_GLIST_VOID_VALY_READ; \ @@ -795,7 +795,7 @@ } #define GL_VOID_VALY_GLIST_VOID_VALY_NONVAR \ - pt1 = YREG+(*_PREG)->y_u.yx.y; \ + pt1 = YREG+(*_PREG)->u.yx.y; \ d1 = *pt1; #define GL_VOID_VALY_GLIST_VOID_VALY_NONVAR_NONVAR \ @@ -809,7 +809,7 @@ GONext(); #define GL_VOID_VALY_GLIST_VOID_VALY_UNK \ - pt1 = YREG+(*_PREG)->y_u.yx.y; \ + pt1 = YREG+(*_PREG)->u.yx.y; \ d1 = *pt1; #define GL_VOID_VALY_GLIST_VOID_VALY_VAR_NONVAR \ @@ -828,7 +828,7 @@ d0 = AbsPair(S_SREG); \ Bind(pt0, d0); \ S_SREG = HR; \ - d1 = YREG[(*_PREG)->y_u.yx.y]; \ + d1 = YREG[(*_PREG)->u.yx.y]; \ RESET_VARIABLE(S_SREG); \ S_SREG[1] = d1; \ (*_PREG) = NEXTOP((*_PREG), yx); \ diff --git a/JIT/HPP/yaam_get_d.h b/JIT/HPP/yaam_get_d.h index 72d56435f..0bcbf9e2c 100644 --- a/JIT/HPP/yaam_get_d.h +++ b/JIT/HPP/yaam_get_d.h @@ -1,8 +1,8 @@ #define GET_X_VAR_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = XREG((*_PREG)->y_u.xx.xr); \ - XREG((*_PREG)->y_u.xx.xl) = d0; \ + d0 = XREG((*_PREG)->u.xx.xr); \ + XREG((*_PREG)->u.xx.xl) = d0; \ (*_PREG) = NEXTOP((*_PREG), xx); \ GONext(); @@ -10,8 +10,8 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL *pt0; \ - pt0 = YREG + (*_PREG)->y_u.yx.y; \ - d0 = XREG((*_PREG)->y_u.yx.x); \ + pt0 = YREG + (*_PREG)->u.yx.y; \ + d0 = XREG((*_PREG)->u.yx.x); \ (*_PREG) = NEXTOP((*_PREG), yx); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -21,10 +21,10 @@ register CELL d0, d1; \ register CELL *pt0, *pt1; \ CACHE_Y(YREG); \ - pt0 = S_YREG + (*_PREG)->y_u.yyxx.y1; \ - d0 = XREG((*_PREG)->y_u.yyxx.x1); \ - pt1 = S_YREG + (*_PREG)->y_u.yyx.y2; \ - d1 = XREG((*_PREG)->y_u.yyxx.x2); \ + pt0 = S_YREG + (*_PREG)->u.yyxx.y1; \ + d0 = XREG((*_PREG)->u.yyxx.x1); \ + pt1 = S_YREG + (*_PREG)->u.yyx.y2; \ + d1 = XREG((*_PREG)->u.yyxx.x2); \ (*_PREG) = NEXTOP((*_PREG), yyxx); \ INITIALIZE_PERMVAR(pt0,d0); \ INITIALIZE_PERMVAR(pt1,d1); \ @@ -36,10 +36,10 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.xx.xl); + d0 = XREG((*_PREG)->u.xx.xl); #define GET_X_VAL_GVALX_NONVAR \ - d1 = XREG((*_PREG)->y_u.xx.xr); + d1 = XREG((*_PREG)->u.xx.xr); #define GET_X_VAL_GVALX_NONVAR_NONVAR \ BLOCK = (CELL)GET_X_VAL_GVALX_NONVAR_NONVAR; \ @@ -52,7 +52,7 @@ GONext(); #define GET_X_VAL_GVALX_UNK \ - d1 = XREG((*_PREG)->y_u.xx.xr); + d1 = XREG((*_PREG)->u.xx.xr); #define GET_X_VAL_GVALX_VAR_NONVAR \ (*_PREG) = NEXTOP((*_PREG), xx); \ @@ -68,11 +68,11 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - pt0 = YREG + (*_PREG)->y_u.yx.y; \ + pt0 = YREG + (*_PREG)->u.yx.y; \ d0 = *pt0; #define GET_Y_VAL_GVALY_NONVAR \ - d1 = XREG((*_PREG)->y_u.yx.x); + d1 = XREG((*_PREG)->u.yx.x); #define GET_Y_VAL_GVALY_NONVAR_NONVAR \ BLOCK = (CELL)GET_Y_VAL_GVALY_NONVAR_NONVAR; \ @@ -85,7 +85,7 @@ GONext(); #define GET_Y_VAL_GVALY_UNK \ - d1 = XREG((*_PREG)->y_u.yx.x); + d1 = XREG((*_PREG)->u.yx.x); #define GET_Y_VAL_GVALY_VAR_NONVAR \ (*_PREG) = NEXTOP((*_PREG), yx); \ @@ -102,8 +102,8 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xc.x); \ - d1 = (*_PREG)->y_u.xc.c; + d0 = XREG((*_PREG)->u.xc.x); \ + d1 = (*_PREG)->u.xc.c; #define GET_ATOM_GATOM_NONVAR \ BLOCK = (CELL)GET_ATOM_GATOM_NONVAR; \ @@ -128,11 +128,11 @@ d0 = ARG1; #define GET_2ATOMS_GATOM_2UNK \ - Bind(pt0, (*_PREG)->y_u.cc.c1); + Bind(pt0, (*_PREG)->u.cc.c1); #define GET_2ATOMS_GATOM_2B \ d0 = ARG2; \ - d1 = (*_PREG)->y_u.cc.c2; + d1 = (*_PREG)->u.cc.c2; #define GET_2ATOMS_GATOM_2BNONVAR \ BLOCK = (CELL)GET_2ATOMS_GATOM_2BNONVAR; \ @@ -157,17 +157,17 @@ d0 = ARG1; #define GET_3ATOMS_GATOM_3UNK \ - Bind(pt0, (*_PREG)->y_u.ccc.c1); + Bind(pt0, (*_PREG)->u.ccc.c1); #define GET_3ATOMS_GATOM_3B \ d0 = ARG2; #define GET_3ATOMS_GATOM_3BUNK \ - Bind(pt0, (*_PREG)->y_u.ccc.c2); + Bind(pt0, (*_PREG)->u.ccc.c2); #define GET_3ATOMS_GATOM_3C \ d0 = ARG3; \ - d1 = (*_PREG)->y_u.ccc.c3; + d1 = (*_PREG)->u.ccc.c3; #define GET_3ATOMS_GATOM_3CNONVAR \ BLOCK = (CELL)GET_3ATOMS_GATOM_3CNONVAR; \ @@ -192,23 +192,23 @@ d0 = ARG1; #define GET_4ATOMS_GATOM_4UNK \ - Bind(pt0, (*_PREG)->y_u.cccc.c1); + Bind(pt0, (*_PREG)->u.cccc.c1); #define GET_4ATOMS_GATOM_4B \ d0 = ARG2; #define GET_4ATOMS_GATOM_4BUNK \ - Bind(pt0, (*_PREG)->y_u.cccc.c2); + Bind(pt0, (*_PREG)->u.cccc.c2); #define GET_4ATOMS_GATOM_4C \ d0 = ARG3; #define GET_4ATOMS_GATOM_4CUNK \ - Bind(pt0, (*_PREG)->y_u.cccc.c3); + Bind(pt0, (*_PREG)->u.cccc.c3); #define GET_4ATOMS_GATOM_4D \ d0 = ARG4; \ - d1 = (*_PREG)->y_u.cccc.c4; + d1 = (*_PREG)->u.cccc.c4; #define GET_4ATOMS_GATOM_4DNONVAR \ BLOCK = (CELL)GET_4ATOMS_GATOM_4DNONVAR; \ @@ -233,29 +233,29 @@ d0 = ARG1; #define GET_5ATOMS_GATOM_5UNK \ - Bind(pt0, (*_PREG)->y_u.ccccc.c1); + Bind(pt0, (*_PREG)->u.ccccc.c1); #define GET_5ATOMS_GATOM_5B \ d0 = ARG2; #define GET_5ATOMS_GATOM_5BUNK \ - Bind(pt0, (*_PREG)->y_u.ccccc.c2); + Bind(pt0, (*_PREG)->u.ccccc.c2); #define GET_5ATOMS_GATOM_5C \ d0 = ARG3; #define GET_5ATOMS_GATOM_5CUNK \ - Bind(pt0, (*_PREG)->y_u.ccccc.c3); + Bind(pt0, (*_PREG)->u.ccccc.c3); #define GET_5ATOMS_GATOM_5D \ d0 = ARG4; #define GET_5ATOMS_GATOM_5DUNK \ - Bind(pt0, (*_PREG)->y_u.ccccc.c4); + Bind(pt0, (*_PREG)->u.ccccc.c4); #define GET_5ATOMS_GATOM_5E \ d0 = ARG5; \ - d1 = (*_PREG)->y_u.ccccc.c5; + d1 = (*_PREG)->u.ccccc.c5; #define GET_5ATOMS_GATOM_5ENONVAR \ BLOCK = (CELL)GET_5ATOMS_GATOM_5ENONVAR; \ @@ -280,35 +280,35 @@ d0 = ARG1; #define GET_6ATOMS_GATOM_6UNK \ - Bind(pt0, (*_PREG)->y_u.cccccc.c1); + Bind(pt0, (*_PREG)->u.cccccc.c1); #define GET_6ATOMS_GATOM_6B \ d0 = ARG2; #define GET_6ATOMS_GATOM_6BUNK \ - Bind(pt0, (*_PREG)->y_u.cccccc.c2); + Bind(pt0, (*_PREG)->u.cccccc.c2); #define GET_6ATOMS_GATOM_6C \ d0 = ARG3; #define GET_6ATOMS_GATOM_6CUNK \ - Bind(pt0, (*_PREG)->y_u.cccccc.c3); + Bind(pt0, (*_PREG)->u.cccccc.c3); #define GET_6ATOMS_GATOM_6D \ d0 = ARG4; #define GET_6ATOMS_GATOM_6DUNK \ - Bind(pt0, (*_PREG)->y_u.cccccc.c4); + Bind(pt0, (*_PREG)->u.cccccc.c4); #define GET_6ATOMS_GATOM_6E \ d0 = ARG5; #define GET_6ATOMS_GATOM_6EUNK \ - Bind(pt0, (*_PREG)->y_u.cccccc.c5); + Bind(pt0, (*_PREG)->u.cccccc.c5); #define GET_6ATOMS_GATOM_6F \ d0 = ARG6; \ - d1 = (*_PREG)->y_u.cccccc.c6; + d1 = (*_PREG)->u.cccccc.c6; #define GET_6ATOMS_GATOM_6FNONVAR \ BLOCK = (CELL)GET_6ATOMS_GATOM_6FNONVAR; \ @@ -331,7 +331,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.x.x); + d0 = XREG((*_PREG)->u.x.x); #define GET_LIST_GLIST_NONVAR \ BLOCK = (CELL)GET_LIST_GLIST_NONVAR; \ @@ -364,7 +364,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xfa.x); + d0 = XREG((*_PREG)->u.xfa.x); #define GET_STRUCT_GSTRUCT_NONVAR \ BLOCK = (CELL)GET_STRUCT_GSTRUCT_NONVAR; \ @@ -375,7 +375,7 @@ else { \ register CELL * S_SREG; \ S_SREG = RepAppl(d0); \ - d0 = (CELL) ((*_PREG)->y_u.xfa.f); \ + d0 = (CELL) ((*_PREG)->u.xfa.f); \ if (*S_SREG != d0) { \ YAAM_FAIL; \ } \ @@ -391,9 +391,9 @@ d1 = AbsAppl(HR); \ Bind(pt0, d1); \ pt0 = HR; \ - d0 = (CELL) ((*_PREG)->y_u.xfa.f); \ + d0 = (CELL) ((*_PREG)->u.xfa.f); \ *pt0++ = d0; \ - HR = pt0 + (*_PREG)->y_u.xfa.a; \ + HR = pt0 + (*_PREG)->u.xfa.a; \ (*_PREG) = NEXTOP((*_PREG), xfa); \ (*_SREG) = pt0; \ GONextW(); \ @@ -404,7 +404,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.xd.x); + d0 = XREG((*_PREG)->u.xd.x); #if SIZEOF_DOUBLE == 2*SIZEOF_INT_P #define GET_FLOAT_GFLOAT_NONVAR \ @@ -419,7 +419,7 @@ YAAM_FAIL; \ } \ else { \ - pt1 = (*_PREG)->y_u.xd.d; \ + pt1 = (*_PREG)->u.xd.d; \ (*_PREG) = NEXTOP((*_PREG), xd); \ if ( \ pt1[1] != pt0[1] \ @@ -445,7 +445,7 @@ YAAM_FAIL; \ } \ else { \ - pt1 = (*_PREG)->y_u.xd.d; \ + pt1 = (*_PREG)->u.xd.d; \ (*_PREG) = NEXTOP((*_PREG), xd); \ if ( \ pt1[1] != pt0[1] \ @@ -461,7 +461,7 @@ #define GET_FLOAT_GFLOAT_UNK \ START_PREFETCH(xc); \ - d1 = AbsAppl((*_PREG)->y_u.xd.d); \ + d1 = AbsAppl((*_PREG)->u.xd.d); \ (*_PREG) = NEXTOP((*_PREG), xd); \ Bind(pt0, d1); \ GONext(); \ @@ -471,7 +471,7 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0, d1; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xi.x); + d0 = XREG((*_PREG)->u.xi.x); #define GET_LONGINT_GLONGINT_NONVAR \ BLOCK = (CELL)GET_LONGINT_GLONGINT_NONVAR; \ @@ -484,7 +484,7 @@ if (*pt0 != (CELL)FunctorLongInt) { \ YAAM_FAIL; \ } \ - if ((*_PREG)->y_u.xi.i[1] != (CELL)pt0[1]) { \ + if ((*_PREG)->u.xi.i[1] != (CELL)pt0[1]) { \ YAAM_FAIL; \ } \ } \ @@ -495,7 +495,7 @@ #define GET_LONGINT_GLONGINT_UNK \ START_PREFETCH(xi); \ - d1 = AbsAppl((*_PREG)->y_u.xi.i); \ + d1 = AbsAppl((*_PREG)->u.xi.i); \ (*_PREG) = NEXTOP((*_PREG), xi); \ Bind(pt0, d1); \ GONext(); \ @@ -506,7 +506,7 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0, d1; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xN.x); + d0 = XREG((*_PREG)->u.xN.x); #define GET_BIGINT_GBIGINT_NONVAR \ BLOCK = (CELL)GET_BIGINT_GBIGINT_NONVAR; \ @@ -519,7 +519,7 @@ if (*pt0 != (CELL)FunctorBigInt) { \ YAAM_FAIL; \ } \ - if (Yap_gmp_tcmp_big_big(d0,(*_PREG)->y_u.xN.b)) { \ + if (Yap_gmp_tcmp_big_big(d0,(*_PREG)->u.xN.b)) { \ YAAM_FAIL; \ } \ } \ @@ -530,7 +530,7 @@ #define GET_BIGINT_GBIGINT_UNK \ START_PREFETCH(xN); \ - d1 = (*_PREG)->y_u.xN.b; \ + d1 = (*_PREG)->u.xN.b; \ (*_PREG) = NEXTOP((*_PREG), xN); \ Bind(pt0, d1); \ GONext(); \ @@ -541,17 +541,17 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0, d1; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xD.x); + d0 = XREG((*_PREG)->u.xD.x); #define GET_DBTERM_GDBTERM_NONVAR \ BLOCK = (CELL)GET_DBTERM_GDBTERM_NONVAR; \ - d1 = (*_PREG)->y_u.xD.D; \ + d1 = (*_PREG)->u.xD.D; \ (*_PREG) = NEXTOP((*_PREG), xD); \ YAAM_UNIFYBOUND; #define GET_DBTERM_GDBTERM_UNK \ START_PREFETCH(xD); \ - d1 = (*_PREG)->y_u.xD.D; \ + d1 = (*_PREG)->u.xD.D; \ (*_PREG) = NEXTOP((*_PREG), xD); \ Bind(pt0, d1); \ GONext(); \ @@ -562,7 +562,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.xx.xl); \ + d0 = XREG((*_PREG)->u.xx.xl); \ if (!IsVarTerm(d0)) { \ printf("Oops!\n"); \ exit(1); \ @@ -581,7 +581,7 @@ } #define GLIST_VALX_GLIST_VALX_NONVAR \ - d1 = XREG((*_PREG)->y_u.xx.xr); + d1 = XREG((*_PREG)->u.xx.xr); #define GLIST_VALX_GLIST_VALX_NONVAR_NONVAR \ BLOCK = (CELL)GLIST_VALX_GLIST_VALX_NONVAR_NONVAR; \ @@ -594,7 +594,7 @@ GONext(); #define GLIST_VALX_GLIST_VALX_UNK \ - d0 = XREG((*_PREG)->y_u.xx.xr); + d0 = XREG((*_PREG)->u.xx.xr); #define GLIST_VALX_GLIST_VALX_VAR_NONVAR \ (*_PREG) = NEXTOP((*_PREG), xx); \ @@ -609,7 +609,7 @@ #define GLIST_VALX_GLIST_VALX_WRITE \ CACHE_S(); \ S_SREG = HR; \ - d1 = XREG((*_PREG)->y_u.xx.xr); \ + d1 = XREG((*_PREG)->u.xx.xr); \ d0 = AbsPair(S_SREG); \ S_SREG[0] = d1; \ ALWAYS_START_PREFETCH_W(xx); \ @@ -625,7 +625,7 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.yx.x); + d0 = XREG((*_PREG)->u.yx.x); #define GLIST_VALY_GLIST_VALY_READ \ if (!IsPairTerm(d0)) { \ @@ -637,7 +637,7 @@ d0 = *pt0; #define GLIST_VALY_GLIST_VALY_NONVAR \ - pt1 = YREG + (*_PREG)->y_u.yx.y; \ + pt1 = YREG + (*_PREG)->u.yx.y; \ d1 = *pt1; \ (*_PREG) = NEXTOP((*_PREG), yx); @@ -651,7 +651,7 @@ GONext(); #define GLIST_VALY_GLIST_VALY_UNK \ - pt1 = YREG+(*_PREG)->y_u.yx.y; \ + pt1 = YREG+(*_PREG)->u.yx.y; \ d1 = *pt1; #define GLIST_VALY_GLIST_VALY_VAR_NONVAR \ @@ -670,7 +670,7 @@ pt1 = HR; \ d0 = AbsPair(pt1); \ Bind(pt0, d0); \ - d0 = YREG[(*_PREG)->y_u.yx.y]; \ + d0 = YREG[(*_PREG)->u.yx.y]; \ pt1[0] = d0; \ HR = pt1 + 2; \ (*_SREG) = pt1 + 1; \ @@ -683,7 +683,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.xx.xl); + d0 = XREG((*_PREG)->u.xx.xl); #define GL_VOID_VARX_GLIST_VOID_VARX_READ \ BLOCK = (CELL)GL_VOID_VARX_GLIST_VOID_VARX_READ; \ @@ -694,14 +694,14 @@ else { \ pt0 = RepPair(d0); \ d0 = pt0[1]; \ - XREG((*_PREG)->y_u.xx.xr) = d0; \ + XREG((*_PREG)->u.xx.xr) = d0; \ (*_PREG) = NEXTOP((*_PREG), xx); \ ALWAYS_GONext(); \ } #define GL_VOID_VARX_GLIST_VOID_VAR_WRITE \ pt1 = HR; \ - XREG((*_PREG)->y_u.xx.xr) = \ + XREG((*_PREG)->u.xx.xr) = \ Unsigned(pt1 + 1); \ RESET_VARIABLE(pt1); \ RESET_VARIABLE(pt1+1); \ @@ -716,7 +716,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.yx.x); + d0 = XREG((*_PREG)->u.yx.x); #define GL_VOID_VARY_GLIST_VOID_VARY_READ \ BLOCK = (CELL)GL_VOID_VARY_GLIST_VOID_VARY_READ; \ @@ -727,14 +727,14 @@ else { \ pt0 = RepPair(d0); \ d0 = pt0[1]; \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.yx.y,d0); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.yx.y,d0); \ (*_PREG) = NEXTOP((*_PREG), yx); \ GONext(); \ } #define GL_VOID_VARY_GLIST_VOID_VARY_WRITE \ pt1 = HR; \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.yx.y,Unsigned(pt1 + 1)); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.yx.y,Unsigned(pt1 + 1)); \ (*_PREG) = NEXTOP((*_PREG), yx); \ RESET_VARIABLE(pt1); \ RESET_VARIABLE(pt1+1); \ @@ -748,7 +748,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.xx.xl); + d0 = XREG((*_PREG)->u.xx.xl); #define GL_VOID_VALX_GLIST_VOID_VALX_READ \ BLOCK = (CELL)GL_VOID_VALX_GLIST_VOID_VALX_READ; \ @@ -762,7 +762,7 @@ } #define GL_VOID_VALX_GLIST_VOID_VALX_NONVAR \ - d1 = XREG((*_PREG)->y_u.xx.xr); + d1 = XREG((*_PREG)->u.xx.xr); #define GL_VOID_VALX_GLIST_VOID_VALX_NONVAR_NONVAR \ BLOCK = (CELL)GL_VOID_VALX_GLIST_VOID_VALX_NONVAR_NONVAR; \ @@ -775,7 +775,7 @@ GONext(); #define GL_VOID_VALX_GLIST_VOID_VALX_UNK \ - d1 = XREG((*_PREG)->y_u.xx.xr); + d1 = XREG((*_PREG)->u.xx.xr); #define GL_VOID_VALX_GLIST_VOID_VALX_VAR_NONVAR \ (*_PREG) = NEXTOP((*_PREG), xx); \ @@ -792,7 +792,7 @@ d0 = AbsPair(pt1); \ Bind(pt0, d0); \ pt1 = HR; \ - d0 = XREG((*_PREG)->y_u.xx.xr); \ + d0 = XREG((*_PREG)->u.xx.xr); \ RESET_VARIABLE(pt1); \ pt1[1] = d0; \ HR = pt1 + 2; \ @@ -804,7 +804,7 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.yx.x); + d0 = XREG((*_PREG)->u.yx.x); #define GL_VOID_VALY_GLIST_VOID_VALY_READ \ BLOCK = (CELL)GL_VOID_VALY_GLIST_VOID_VALY_READ; \ @@ -818,7 +818,7 @@ } #define GL_VOID_VALY_GLIST_VOID_VALY_NONVAR \ - pt1 = YREG+(*_PREG)->y_u.yx.y; \ + pt1 = YREG+(*_PREG)->u.yx.y; \ d1 = *pt1; #define GL_VOID_VALY_GLIST_VOID_VALY_NONVAR_NONVAR \ @@ -832,7 +832,7 @@ GONext(); #define GL_VOID_VALY_GLIST_VOID_VALY_UNK \ - pt1 = YREG+(*_PREG)->y_u.yx.y; \ + pt1 = YREG+(*_PREG)->u.yx.y; \ d1 = *pt1; #define GL_VOID_VALY_GLIST_VOID_VALY_VAR_NONVAR \ @@ -851,7 +851,7 @@ d0 = AbsPair(S_SREG); \ Bind(pt0, d0); \ S_SREG = HR; \ - d1 = YREG[(*_PREG)->y_u.yx.y]; \ + d1 = YREG[(*_PREG)->u.yx.y]; \ RESET_VARIABLE(S_SREG); \ S_SREG[1] = d1; \ (*_PREG) = NEXTOP((*_PREG), yx); \ diff --git a/JIT/HPP/yaam_macros.hh b/JIT/HPP/yaam_macros.hh new file mode 100644 index 000000000..0372aad5e --- /dev/null +++ b/JIT/HPP/yaam_macros.hh @@ -0,0 +1,1309 @@ +typedef enum { + #include "Yap_BasicBlocks.h" +} YAP_BBs; + +#ifndef _NATIVE + +#include "lastop.h" +#include "sprintblock.h" + +static inline Int +set_last_deeply(BlocksContext* b, BlocksContext** last) { + BlocksContext *last1, *last2; + while (b) { + if (b->blockty == MULTIPLE_DESTINY && b->thisp == BLOCKADDRESS && b->u.mdb.id == BLOCK) { + *last = b; + return 1; + } + if (b->blockty == CONDITIONAL_HEADER) { + Int _if = set_last_deeply(b->u.kb._if, &last1); + Int _else = set_last_deeply(b->u.kb._else, &last2); + if (_if || _else) { + if (_if) *last = last1; + else *last = last2; + return 1; + } + } + b = (BlocksContext*)b->next; + } + *last = NULL; + return 0; +} + +#ifdef USE_GMP +#define FUNCTOR_LARGE_INT "(CELL)f0 == (CELL)FunctorLongInt || (CELL)f0 == (CELL)FunctorBigInt" +#else +#define FUNCTOR_LARGE_INT "(CELL)f0 == (CELL)FunctorLongInt" +#endif + +#define SET_DEPTH(yaam_block) \ + { \ + inst_depth = 0; \ + if (yaam_block == GET_X_VAL_INSTINIT) { \ + inst_depth = 2; \ + } \ + } + +#define BACK_TO_HEADER() \ + { \ + while (curblock->prev) { \ + curblock = (BlocksContext*)curblock->prev; \ + } \ + curblock = (BlocksContext*)curblock->u.xb.header; \ + } + +#define FREE(N) \ + { \ + int j; \ + for (j = 0; j < N; j++) { \ + free(cexp[j]); \ + } \ + free(cexp); \ + free(condty); \ + } + +#define YAAM_BLOCK_IS_DEEPB_MULTIPLE_DESTINY(yaam_block) \ + yaam_block == GL_VOID_VALX_GLIST_VOID_VALX_NONVAR_NONVAR || \ + yaam_block == GL_VOID_VALX_GLIST_VOID_VALX_READ || \ + yaam_block == GL_VOID_VALY_GLIST_VOID_VALY_NONVAR_NONVAR || \ + yaam_block == GL_VOID_VALY_GLIST_VOID_VALY_READ || \ + yaam_block == UNIFY_X_VAL_UVALX_NONVAR_NONVAR || \ + yaam_block == UNIFY_L_X_VAL_ULVALX_NONVAR_NONVAR || \ + +#define EMIT_CONDITIONAL2_BLOCK(yaam_block, EXP1, EXP2, F1, F2) \ + if (first_valid_conditional) { \ + EMIT_2DEEP_BLOCK_TEST(yaam_block, EXP1, EXP2, F1, F2); \ + first_valid_conditional = 0; \ + } \ + else { \ + EMIT_DEEPFK_BLOCK_TEST(yaam_block); \ + } + +#define EMIT_CONDITIONAL1_BLOCK(yaam_block, EXP1, F1) \ + if (first_valid_conditional) { \ + EMIT_1DEEP_BLOCK_TEST(yaam_block, EXP1, F1); \ + first_valid_conditional = 0; \ + } \ + else { \ + EMIT_DEEPFK_BLOCK_TEST(yaam_block); \ + } + +#if defined(YAPOR) || defined(THREADS) +#define YAAM_BLOCK_IS_SIMPLEB_MULTIPLE_DESTINY(yaam_block) \ + yaam_block == YAAM_UNIFYBOUND || \ + yaam_block == PROFILED_RETRY_LOGICAL_END || \ + yaam_block == PROFILED_TRUST_LOGICAL_END || \ + yaam_block == COUNT_RETRY_LOGICAL_END || \ + yaam_block == COUNT_TRUST_LOGICAL_END || \ + yaam_block == LOCK_LU_END || \ + yaam_block == TRY_AND_MARK_YAPOR_THREADS_NOYAPOR_IF || \ +#else /* defined(YAPOR) || defined(THREADS) */ +#define YAAM_BLOCK_IS_SIMPLEB_MULTIPLE_DESTINY(yaam_block) \ + yaam_block == YAAM_UNIFYBOUND || \ + yaam_block == PROFILED_RETRY_LOGICAL_END || \ + yaam_block == PROFILED_TRUST_LOGICAL_END || \ + yaam_block == COUNT_RETRY_LOGICAL_END || \ + yaam_block == COUNT_TRUST_LOGICAL_END || \ + yaam_block == LOCK_LU_END +#endif + +#if YAP_DBG_PREDS +#define PRINT_BLOCK_MAC(yaam_block) print_block(yaam_block, ON_PROFILED_INTERPRETER); +#else /* YAP_DBG_PREDS */ +#define PRINT_BLOCK_MAC(yaam_block) +#endif /* YAP_DBG_PREDS */ + +#if YAP_STAT_PREDS +#define INIT_SPENT_PROF_TIME_FOR_HEAD(i) \ + struct rusage rustart, ruend; \ + struct timeval timstart, timend; \ + getrusage(RUSAGE_SELF, &rustart); + +#define COMPLETE_SPENT_PROF_TIME_FOR_HEAD(i) \ + getrusage(RUSAGE_SELF, &ruend); \ + timstart = rustart.ru_utime; \ + timend = ruend.ru_utime; \ + double spenttime = ((double)timend.tv_sec - (double)timstart.tv_sec) + ((double)timend.tv_usec - (double)timstart.tv_usec) / 1000000.0; \ + IntermediatecodeArea->area.profiling_time[i] += spenttime; + +#define INIT_SPENT_PROF_TIME() \ + struct rusage rustart, ruend; \ + struct timeval timstart, timend; \ + getrusage(RUSAGE_SELF, &rustart); + +#define COMPLETE_SPENT_PROF_TIME() \ + getrusage(RUSAGE_SELF, &ruend); \ + timstart = rustart.ru_utime; \ + timend = ruend.ru_utime; \ + double spenttime = ((double)timend.tv_sec - (double)timstart.tv_sec) + ((double)timend.tv_usec - (double)timstart.tv_usec) / 1000000.0; \ + IntermediatecodeArea->area.profiling_time[i] += spenttime; + +#else /* YAP_STAT_PREDS */ +#define INIT_SPENT_PROF_TIME_FOR_HEAD(i) + +#define COMPLETE_SPENT_PROF_TIME_FOR_HEAD(i) + +#define INIT_SPENT_PROF_TIME() + +#define COMPLETE_SPENT_PROF_TIME() + +#endif /* YAP_STAT_PREDS */ + +static void EMIT_MULTIPLE_DESTINY_BLOCK_TEST(YAP_BBs); + +static void +EMIT_MULTIPLE_DESTINY_BLOCK_TEST(YAP_BBs yaam_block) { + if (IntermediatecodeArea->n) { + PRINT_BLOCK_MAC(yaam_block); + int i; + for (i = 0; i < IntermediatecodeArea->n; i++) { + if (IntermediatecodeArea->area.t && + IntermediatecodeArea->area.ok && + IntermediatecodeArea->area.isactive && + IntermediatecodeArea->area.isactive[i]) + { + INIT_SPENT_PROF_TIME(); + curtrace = &IntermediatecodeArea->area.t[i]; + BlocksContext *curblock; + if (!globalcurblock) curblock = (*curtrace)->bc; + else curblock = globalcurblock[i]; + while (curblock->next) { + if ( (curblock->blockty == SIMPLE && curblock->thisp == (CELL)curpreg && curblock->u.sb.id == (UInt)yaam_block) || + (curblock->blockty == MULTIPLE_DESTINY && curblock->thisp == (CELL)curpreg && curblock->u.mdb.id == (UInt)yaam_block) ) + { break; } + curblock = (BlocksContext*)curblock->next; + } + if (!curblock->next && + (curblock->blockty != SIMPLE || curblock->thisp != (CELL)curpreg || curblock->u.sb.id != (UInt)yaam_block) && + (curblock->blockty != MULTIPLE_DESTINY || curblock->thisp != (CELL)curpreg || curblock->u.mdb.id != (UInt)yaam_block) + ) { + BlocksContext* t = (BlocksContext*)malloc(sizeof(BlocksContext)); + t->thisp = (CELL)curpreg; + t->next = 0; + t->prev = (CELL)curblock; + t->blockty = MULTIPLE_DESTINY; + t->u.mdb.id = (UInt)yaam_block; + t->u.mdb.ndest = 0; + t->u.mdb.nfaillabels = 0; + t->u.mdb.destiny.p = NULL; + t->u.mdb.destiny.labels = NULL; + t->u.mdb.faildestiny.p = NULL; + t->u.mdb.faildestiny.labels = NULL; + (*curtrace)->n += 1; + curblock->next = (CELL)t; + IntermediatecodeArea->area.lastblock[i] = t; + } + else { + IntermediatecodeArea->area.lastblock[i] = curblock; + } + COMPLETE_SPENT_PROF_TIME(); + } + } + } +} + +static void EMIT_SIMPLE_BLOCK_TEST(YAP_BBs); + +static void +EMIT_SIMPLE_BLOCK_TEST(YAP_BBs yaam_block) { + if (IntermediatecodeArea->n) { + PRINT_BLOCK_MAC(yaam_block); + int i; + for (i = 0; i < IntermediatecodeArea->n; i++) { + if (IntermediatecodeArea->area.t && + IntermediatecodeArea->area.ok && + IntermediatecodeArea->area.isactive && + IntermediatecodeArea->area.isactive[i]) + { + INIT_SPENT_PROF_TIME(); + curtrace = &IntermediatecodeArea->area.t[i]; + BlocksContext *curblock; + if (!globalcurblock) curblock = (*curtrace)->bc; + else curblock = globalcurblock[i]; + while (curblock->next) { + if ( (curblock->blockty == SIMPLE && curblock->thisp == (CELL)curpreg && curblock->u.sb.id == (UInt)yaam_block) || + (curblock->blockty == MULTIPLE_DESTINY && curblock->thisp == (CELL)curpreg && curblock->u.mdb.id == (UInt)yaam_block) ) + { break; } + curblock = (BlocksContext*)curblock->next; + } + if (!curblock->next && + (curblock->blockty != SIMPLE || curblock->thisp != (CELL)curpreg || curblock->u.sb.id != (UInt)yaam_block) && + (curblock->blockty != MULTIPLE_DESTINY || curblock->thisp != (CELL)curpreg || curblock->u.mdb.id != (UInt)yaam_block) + ) { + BlocksContext* t = (BlocksContext*)malloc(sizeof(BlocksContext)); + t->thisp = (CELL)curpreg; + t->next = 0; + t->prev = (CELL)curblock; + t->blockty = SIMPLE; + t->u.sb.id = (UInt)yaam_block; + t->u.sb.label_destiny = NULL; + (*curtrace)->n += 1; + curblock->next = (CELL)t; + IntermediatecodeArea->area.lastblock[i] = t; + } + else { + IntermediatecodeArea->area.lastblock[i] = curblock; + } + COMPLETE_SPENT_PROF_TIME(); + } + } + } +} + +#define EMIT_3DEEP_BLOCK(yaam_block, EXP1, EXP2, EXP3, N1, N2, N3) \ + if (IntermediatecodeArea->n) { \ + char *tmp = (char*) malloc(2048*sizeof(char)); \ + sprint_block((YAP_BBs)yaam_block, &tmp); \ + fprintf(stderr, "OOps!! Encontrei um bloco não instrumentado corretamente -- %s\n", tmp); \ + free(tmp); \ + exit(1); \ + } + +#define EMIT_2DEEP_BLOCK(yaam_block, EXP1, EXP2, N1, N2) \ + if (IntermediatecodeArea->n) { \ + char *tmp = (char*) malloc(2048*sizeof(char)); \ + sprint_block((YAP_BBs)yaam_block, &tmp); \ + fprintf(stderr, "OOps!! Encontrei um bloco não instrumentado corretamente -- %s\n", tmp); \ + free(tmp); \ + exit(1); \ + } + +#define EMIT_1DEEP_BLOCK(yaam_block, EXP, N) \ + if (IntermediatecodeArea->n) { \ + char *tmp = (char*) malloc(2048*sizeof(char)); \ + sprint_block((YAP_BBs)yaam_block, &tmp); \ + fprintf(stderr, "OOps!! Encontrei um bloco não instrumentado corretamente -- %s\n", tmp); \ + free(tmp); \ + exit(1); \ + } + +#define EMIT_SIMPLE_BLOCK(yaam_block) \ + if (IntermediatecodeArea->n) { \ + char *tmp = (char*) malloc(2048*sizeof(char)); \ + sprint_block((YAP_BBs)yaam_block, &tmp); \ + fprintf(stderr, "OOps!! Encontrei um bloco não instrumentado corretamente -- %s\n", tmp); \ + } + + +#define REDEFINE_DESTINY(A, B) \ + if ((A)->blockty == SIMPLE_ENTRY) { \ + strcpy((A)->u.eb.label_destiny, B->u.eb.label_entry); \ + } \ + else if ((A)->blockty == SIMPLE) { \ + strcpy((A)->u.sb.label_destiny, B->u.eb.label_entry); \ + } + +#define SET_FAILDESTINY_AS_MULTIPLE(B, i) \ + int k = 0; \ + while (k < IntermediatecodeArea->area.lastblock[i]->u.mdb.nfaillabels) { \ + if (!strcmp(IntermediatecodeArea->area.lastblock[i]->u.mdb.faildestiny.labels[k], (B)->u.eb.label_entry)) break; \ + k++; \ + } \ + if (k == IntermediatecodeArea->area.lastblock[i]->u.mdb.nfaillabels) { \ + IntermediatecodeArea->area.lastblock[i]->u.mdb.nfaillabels++; \ + IntermediatecodeArea->area.lastblock[i]->u.mdb.faildestiny.p = (UInt*)realloc(IntermediatecodeArea->area.lastblock[i]->u.mdb.faildestiny.p, IntermediatecodeArea->area.lastblock[i]->u.mdb.nfaillabels*sizeof(UInt)); \ + IntermediatecodeArea->area.lastblock[i]->u.mdb.faildestiny.p[IntermediatecodeArea->area.lastblock[i]->u.mdb.nfaillabels-1] = (B)->thisp; \ + IntermediatecodeArea->area.lastblock[i]->u.mdb.faildestiny.labels = (char**)realloc(IntermediatecodeArea->area.lastblock[i]->u.mdb.faildestiny.labels, IntermediatecodeArea->area.lastblock[i]->u.mdb.nfaillabels*sizeof(char*)); \ + IntermediatecodeArea->area.lastblock[i]->u.mdb.faildestiny.labels[IntermediatecodeArea->area.lastblock[i]->u.mdb.nfaillabels-1] = (char*)malloc(1024*sizeof(char)); \ + strcpy(IntermediatecodeArea->area.lastblock[i]->u.mdb.faildestiny.labels[IntermediatecodeArea->area.lastblock[i]->u.mdb.nfaillabels-1], (B)->u.eb.label_entry); \ + } + +#define SET_DESTINY_AS_MULTIPLE(B, i) \ + int k = 0; \ + while (k < IntermediatecodeArea->area.lastblock[i]->u.mdb.ndest) { \ + if (!strcmp(IntermediatecodeArea->area.lastblock[i]->u.mdb.destiny.labels[k], (B)->u.eb.label_entry)) break; \ + k++; \ + } \ + if (k == IntermediatecodeArea->area.lastblock[i]->u.mdb.ndest) { \ + IntermediatecodeArea->area.lastblock[i]->u.mdb.ndest++; \ + IntermediatecodeArea->area.lastblock[i]->u.mdb.destiny.p = (UInt*)realloc(IntermediatecodeArea->area.lastblock[i]->u.mdb.destiny.p, IntermediatecodeArea->area.lastblock[i]->u.mdb.ndest*sizeof(UInt)); \ + IntermediatecodeArea->area.lastblock[i]->u.mdb.destiny.p[IntermediatecodeArea->area.lastblock[i]->u.mdb.ndest-1] = (B)->thisp; \ + IntermediatecodeArea->area.lastblock[i]->u.mdb.destiny.labels = (char**)realloc(IntermediatecodeArea->area.lastblock[i]->u.mdb.destiny.labels, IntermediatecodeArea->area.lastblock[i]->u.mdb.ndest*sizeof(char*)); \ + IntermediatecodeArea->area.lastblock[i]->u.mdb.destiny.labels[IntermediatecodeArea->area.lastblock[i]->u.mdb.ndest-1] = (char*)malloc(1024*sizeof(char)); \ + strcpy(IntermediatecodeArea->area.lastblock[i]->u.mdb.destiny.labels[IntermediatecodeArea->area.lastblock[i]->u.mdb.ndest-1], (B)->u.eb.label_entry); \ + } + +#define SET_DESTINY(yaam_block, B, i) \ + if (IntermediatecodeArea->area.lastblock[i]) { \ + if (IntermediatecodeArea->area.lastblock[i]->blockty == MULTIPLE_DESTINY) { \ + if (yaam_block == LBL_FAIL_INSTINIT) { \ + SET_FAILDESTINY_AS_MULTIPLE((B), i); \ + } \ + else { \ + SET_DESTINY_AS_MULTIPLE((B), i); \ + } \ + } \ + if (IntermediatecodeArea->area.lastblock[i]->blockty == SIMPLE_ENTRY) { \ + if (!IntermediatecodeArea->area.lastblock[i]->u.eb.label_destiny) { \ + IntermediatecodeArea->area.lastblock[i]->u.eb.label_destiny = (char*)malloc(1024*sizeof(char)); \ + strcpy(IntermediatecodeArea->area.lastblock[i]->u.eb.label_destiny, (B)->u.eb.label_entry); \ + } \ + } \ + else if (IntermediatecodeArea->area.lastblock[i]->blockty == SIMPLE) { \ + if (IntermediatecodeArea->area.lastblock[i]->u.sb.id != NoStackExecute_Exception) { \ + if (!IntermediatecodeArea->area.lastblock[i]->u.sb.label_destiny) { \ + IntermediatecodeArea->area.lastblock[i]->u.sb.label_destiny = (char*)malloc(1024*sizeof(char)); \ + strcpy(IntermediatecodeArea->area.lastblock[i]->u.sb.label_destiny, (B)->u.eb.label_entry); \ + } \ + } \ + } \ + } + +static void EMIT_HEAD_BLOCK(yamop*); + +static void +EMIT_HEAD_BLOCK(yamop* __P) { + INIT_SPENT_PROF_TIME_FOR_HEAD(__P->u.jhc.jh->caa.taddress); + if (curtrace) { + curpreg = __P; + if (curpreg == headoftrace && curtrace && (*curtrace)->n) { + SET_DESTINY(JIT_HANDLER_INSTINIT, (*curtrace)->bc, __P->u.jhc.jh->caa.taddress); + } + else { + (*curtrace)->bc = (BlocksContext*)malloc(sizeof(BlocksContext)); + (*curtrace)->bc->blockty = SIMPLE_ENTRY; + (*curtrace)->bc->thisp = (CELL)curpreg; + (*curtrace)->bc->next = 0; + (*curtrace)->bc->prev = 0; + (*curtrace)->bc->u.eb.id = (UInt)JIT_HANDLER_INSTINIT; + (*curtrace)->bc->u.eb.label_destiny = NULL; + (*curtrace)->bc->u.eb.label_entry = (char*)malloc(1024*sizeof(char)); + strcpy((*curtrace)->bc->u.eb.label_entry, "LBL_JIT_HANDLER_INSTINIT"); + char *hex = (char*)malloc(33*sizeof(char)); + sprintf(hex, "_%lX", (UInt)curpreg); + strcat((*curtrace)->bc->u.eb.label_entry, hex); + (*curtrace)->n = 1; + } + } + COMPLETE_SPENT_PROF_TIME_FOR_HEAD(__P->u.jhc.jh->caa.taddress); +} + +static void EMIT_ENTRY_BLOCK(yamop*, YAP_BBs); + +static void +EMIT_ENTRY_BLOCK(yamop* __P, YAP_BBs yaam_block) { + if (IntermediatecodeArea->n) { + PRINT_BLOCK_MAC(yaam_block); + if (globalcurblock) { + free(globalcurblock); + globalcurblock = NULL; + } + int i; + for (i = 0; i < IntermediatecodeArea->n; i++) { + if (IntermediatecodeArea->area.t && + IntermediatecodeArea->area.ok && + IntermediatecodeArea->area.isactive && + IntermediatecodeArea->area.isactive[i]) + { + INIT_SPENT_PROF_TIME(); + curtrace = &IntermediatecodeArea->area.t[i]; + curpreg = __P; + BlocksContext *curblock = (*curtrace)->bc; + while (curblock->next) { + if (curblock->blockty == SIMPLE_ENTRY && curblock->thisp == (CELL)curpreg && curblock->u.eb.id == (UInt)yaam_block) { + break; + } + curblock = (BlocksContext*)curblock->next; + } + if (!curblock->next && + (curblock->blockty != SIMPLE_ENTRY || curblock->thisp != (CELL)curpreg || curblock->u.eb.id != (UInt)yaam_block) + ) { + BlocksContext* t = (BlocksContext*)malloc(sizeof(BlocksContext)); + t = (BlocksContext*)malloc(sizeof(BlocksContext)); + t->blockty = SIMPLE_ENTRY; + t->thisp = (CELL)curpreg; + t->next = 0; + t->prev = (CELL)curblock; + t->u.eb.id = (UInt)yaam_block; + t->u.eb.label_destiny = NULL; + t->u.eb.label_entry = (char*)malloc(1024*sizeof(char)); + { + strcpy(t->u.eb.label_entry, "LBL_"); + char *tmp = (char*)malloc(2048*sizeof(char)); + linear_sprint_block(yaam_block, &tmp); + strcat(t->u.eb.label_entry, tmp); + char* hex = (char*)malloc(33*sizeof(char)); + sprintf(hex, "_%lX", (UInt)t->thisp); + strcat(t->u.eb.label_entry, hex); + } + SET_DESTINY(yaam_block, t, i); + if (ineedredefinedest) { + REDEFINE_DESTINY(IntermediatecodeArea->area.lastblock[i], t); + ineedredefinedest = 0; + } + (*curtrace)->n += 1; + curblock->next = (CELL)t; + IntermediatecodeArea->area.lastblock[i] = t; + } + else { + SET_DESTINY(yaam_block, curblock, i); + IntermediatecodeArea->area.lastblock[i] = curblock; + } + COMPLETE_SPENT_PROF_TIME(); + } + } + } +} + +#define EMIT_CONDITIONAL_FAIL(EXP) \ + if (IntermediatecodeArea->n) { \ + int i; \ + BlocksContext** temp_globalcurblock = (BlocksContext**)malloc(IntermediatecodeArea->n * sizeof(BlocksContext*)); \ + for (i = 0; i < IntermediatecodeArea->n; i++) { \ + if (IntermediatecodeArea->area.t && \ + IntermediatecodeArea->area.ok && \ + IntermediatecodeArea->area.isactive && \ + IntermediatecodeArea->area.isactive[i]) \ + { \ + INIT_SPENT_PROF_TIME(); \ + curtrace = &IntermediatecodeArea->area.t[i]; \ + BlocksContext *c; \ + if (!globalcurblock) c = (*curtrace)->bc; \ + else c = globalcurblock[i]; \ + while (c->next) { \ + if (c->blockty == CONDITIONAL_HEADER && c->thisp == (CELL)curpreg && !strcmp(c->u.kb.exp, EXP)) { break; } \ + c = (BlocksContext*)c->next; \ + } \ + if (!c->next && (c->blockty != CONDITIONAL_HEADER || c->thisp != (CELL)curpreg || strcmp(c->u.kb.exp, EXP)) ) { \ + BlocksContext *t = (BlocksContext*)malloc(sizeof(BlocksContext)); \ + t->blockty = CONDITIONAL_HEADER; \ + t->thisp = (CELL)curpreg; \ + t->next = 0; \ + t->prev = (CELL)c; \ + t->u.kb.exp = (char*)malloc(1024*sizeof(char)); \ + strcpy(t->u.kb.exp, EXP); \ + t->u.kb._if = (BlocksContext*)malloc(sizeof(BlocksContext)); \ + t->u.kb._if->blockty = NONE; \ + t->u.kb._if->thisp = (CELL)curpreg; \ + t->u.kb._if->next = 0; \ + t->u.kb._if->prev = 0; \ + t->u.kb._if->u.xb.header = (CELL)t; \ + t->u.kb._else = (BlocksContext*)malloc(sizeof(BlocksContext)); \ + t->u.kb._else->blockty = NONE; \ + t->u.kb._else->thisp = (CELL)curpreg; \ + t->u.kb._else->next = 0; \ + t->u.kb._else->prev = 0; \ + t->u.kb._else->u.xb.header = (CELL)t; \ + c->next = (CELL)t; \ + c = t->u.kb._else; \ + (*curtrace)->n += 2; \ + } \ + else { \ + c = c->u.kb._else; \ + } \ + temp_globalcurblock[i] = c; \ + COMPLETE_SPENT_PROF_TIME(); \ + } \ + } \ + globalcurblock = temp_globalcurblock; \ + } + +#define EMIT_CONDITIONAL_SUCCESS(EXP) \ + if (IntermediatecodeArea->n) { \ + int i; \ + BlocksContext** temp_globalcurblock = (BlocksContext**)malloc(IntermediatecodeArea->n * sizeof(BlocksContext*)); \ + for (i = 0; i < IntermediatecodeArea->n; i++) { \ + if (IntermediatecodeArea->area.t && \ + IntermediatecodeArea->area.ok && \ + IntermediatecodeArea->area.isactive && \ + IntermediatecodeArea->area.isactive[i]) \ + { \ + INIT_SPENT_PROF_TIME(); \ + curtrace = &IntermediatecodeArea->area.t[i]; \ + BlocksContext *c; \ + if (!globalcurblock) c = (*curtrace)->bc; \ + else c = globalcurblock[i]; \ + while (c->next) { \ + if (c->blockty == CONDITIONAL_HEADER && c->thisp == (CELL)curpreg && !strcmp(c->u.kb.exp, EXP)) { break; } \ + c = (BlocksContext*)c->next; \ + } \ + if (!c->next && (c->blockty != CONDITIONAL_HEADER || c->thisp != (CELL)curpreg || strcmp(c->u.kb.exp, EXP)) ) { \ + BlocksContext *t = (BlocksContext*)malloc(sizeof(BlocksContext)); \ + t->blockty = CONDITIONAL_HEADER; \ + t->thisp = (CELL)curpreg; \ + t->next = 0; \ + t->prev = (CELL)c; \ + t->u.kb.exp = (char*)malloc(1024*sizeof(char)); \ + strcpy(t->u.kb.exp, EXP); \ + t->u.kb._if = (BlocksContext*)malloc(sizeof(BlocksContext)); \ + t->u.kb._if->blockty = NONE; \ + t->u.kb._if->thisp = (CELL)curpreg; \ + t->u.kb._if->next = 0; \ + t->u.kb._if->prev = 0; \ + t->u.kb._if->u.xb.header = (CELL)t; \ + t->u.kb._else = (BlocksContext*)malloc(sizeof(BlocksContext)); \ + t->u.kb._else->blockty = NONE; \ + t->u.kb._else->thisp = (CELL)curpreg; \ + t->u.kb._else->next = 0; \ + t->u.kb._else->prev = 0; \ + t->u.kb._else->u.xb.header = (CELL)t; \ + c->next = (CELL)t; \ + c = t->u.kb._if; \ + (*curtrace)->n += 2; \ + } \ + else { \ + c = c->u.kb._if; \ + } \ + temp_globalcurblock[i] = c; \ + COMPLETE_SPENT_PROF_TIME(); \ + } \ + } \ + globalcurblock = temp_globalcurblock; \ + } + +#define EMIT_CONDITIONAL() \ + { \ + BlocksContext *c = (*curtrace)->bc; \ + COUNT i = 0; \ + while (i < ncexp) { \ + while (c->next) { \ + if (c->blockty == CONDITIONAL_HEADER && c->thisp == (CELL)curpreg && !strcmp(c->u.kb.exp, cexp[i])) { break; } \ + c = (BlocksContext*)c->next; \ + } \ + if (!c->next && (c->blockty != CONDITIONAL_HEADER || c->thisp != (CELL)curpreg || strcmp(c->u.kb.exp, cexp[i])) ) { \ + BlocksContext *t = (BlocksContext*)malloc(sizeof(BlocksContext)); \ + t->blockty = CONDITIONAL_HEADER; \ + t->thisp = (CELL)curpreg; \ + t->next = 0; \ + t->prev = (CELL)c; \ + t->u.kb.exp = (char*)malloc(1024*sizeof(char)); \ + strcpy(t->u.kb.exp, cexp[i]); \ + t->u.kb._if = (BlocksContext*)malloc(sizeof(BlocksContext)); \ + t->u.kb._if->blockty = NONE; \ + t->u.kb._if->thisp = (CELL)curpreg; \ + t->u.kb._if->next = 0; \ + t->u.kb._if->prev = 0; \ + t->u.kb._if->u.xb.header = (CELL)t; \ + t->u.kb._else = (BlocksContext*)malloc(sizeof(BlocksContext)); \ + t->u.kb._else->blockty = NONE; \ + t->u.kb._else->thisp = (CELL)curpreg; \ + t->u.kb._else->next = 0; \ + t->u.kb._else->prev = 0; \ + t->u.kb._else->u.xb.header = (CELL)t; \ + c->next = (CELL)t; \ + if (condty[i] == 0) { \ + c = t->u.kb._if; \ + } \ + else { \ + c = t->u.kb._else; \ + } \ + (*curtrace)->n += 2; \ + } \ + else { \ + if (condty[i] == 0) { \ + c = c->u.kb._if; \ + } else { \ + c = c->u.kb._else; \ + } \ + } \ + i++; \ + } \ + curblock = c; \ + } + +#define IF(EXP) EMIT_THIS_BLOCK_AS_IF(EXP); +#define ELSEIF(EXP) EMIT_THIS_BLOCK_AS_ELSEIF(EXP); +#define ELSE() EMIT_THIS_BLOCK_AS_ELSE(); +#define ENDBLOCK() \ + BACK_TO_HEADER(); + +#define SIMPLE_VBLOCK_ND0(block) \ + block == GET_X_VAL_GVALX_NONVAR || \ + block == GET_Y_VAL_GVALY_NONVAR || \ + block == PUT_UNSAFE_PUNSAFE_NONVAR || \ + block == UNIFY_X_LOC_WRITE_UNIFY_X_LOC_NONVAR || \ + block == UNIFY_L_X_LOC_WRITE_ULNIFY_X_LOC_NONVAR || \ + block == UNIFY_Y_LOC_WRITE_UNIFY_Y_LOC_NONVAR || \ + block == UNIFY_L_Y_LOC_WRITE_ULUNIFY_Y_LOC_NONVAR || \ + block == WRITE_X_LOC_W_X_BOUND || \ + block == WRITE_Y_LOC_W_Y_BOUND || \ + block == P_DIF_DIF_NVAR1 || \ + block == P_EQ_P_EQ_NVAR1 || \ + block == P_PLUS_VV_PLUS_VV_NVAR || \ + block == P_PLUS_Y_VV_PLUS_Y_VV_NVAR || \ + block == P_MINUS_VV_MINUS_VV_NVAR || \ + block == P_TIMES_VV_TIMES_VV_NVAR || \ + block == P_DIV_VV_DIV_VV_NVAR || \ + block == P_AND_VV_AND_VV_NVAR || \ + block == P_ARG_VV_TEST_D1 || \ + block == P_ARG_VV_ARG_ARG1_NVAR || \ + block == P_ARG_Y_VV_TEST_D1 || \ + block == P_ARG_Y_VV_ARG_Y_ARG1_NVAR + +#define MULTIPLE_DESTINY_VBLOCK_ND0(block) \ + block == GET_LIST_GLIST_NONVAR || \ + block == GET_ATOM_GATOM_NONVAR || \ + block == GET_STRUCT_GSTRUCT_NONVAR || \ + block == GET_FLOAT_GFLOAT_NONVAR || \ + block == GL_VOID_VARX_GLIST_VOID_VARX_READ || \ + block == GL_VOID_VARY_GLIST_VOID_VARY_READ || \ + block == UNIFY_ATOM_UATOM_NONVAR || \ + block == UNIFY_L_ATOM_ULATOM_NONVAR || \ + block == UNIFY_LIST_READMODE || \ + block == UNIFY_L_LIST_READMODE || \ + block == UNIFY_STRUCT_READMODE || \ + block == UNIFY_L_STRUC_READMODE + +#define MULTIPLE_DESTINY_VBLOCK_ND1(block) \ + block == P_ARG_CV_ARG_ARG2_VC_NVAR + +#define MULTIPLE_DESTINY_VBLOCK_ND0_ND1(block) \ + block == GET_X_VAL_GVALX_NONVAR_NONVAR || \ + block == GET_Y_VAL_GVALY_NONVAR_NONVAR || \ + block == CALL_BFUNC_XX_CALL_BFUNC_XX2_NVAR_INT || \ + block == CALL_BFUNC_YX_CALL_BFUNC_YX2_NVAR_INT || \ + block == CALL_BFUNC_XY_CALL_BFUNC_XY2_NVAR_INT || \ + block == CALL_BFUNC_YY_CALL_BFUNC_YY2_NVAR_INT || \ + block == P_DIF_DIF_NVAR1_NVAR2 || \ + block == P_EQ_P_EQ_NVAR1_NVAR2 || \ + block == P_ARG_VV_ARG_ARG2_NVAR || \ + block == P_ARG_Y_VV_ARG_Y_ARG2_NVAR + +#define MULTIPLE_DESTINY_VBLOCK_D0_ND1(block) \ + block == GET_X_VAL_GVALX_VAR_NONVAR || \ + block == GET_Y_VAL_GVALY_VAR_NONVAR || \ + block == P_EQ_P_EQ_VAR1_NVAR2 + +static inline int +found_entry(char* key, yamop* p) { + int i = 0; + while (i < p->u.jhc.jh->tcc.cf->nentries && strcmp(p->u.jhc.jh->tcc.cf->entries[i], key)) { + i++; + } + if (i == p->u.jhc.jh->tcc.cf->nentries) return 0; + return 1; +} + +static inline void +emit_blocks_buf (BlocksContext* mt, short nident, char buf[], yamop* p) { + BlocksContext* prevblock = NULL; + char* tmp = (char*)malloc(2048*sizeof(char)); + int i; + //yamop* lastp = lastop_of(p); + short foundlast = 0; + //CELL oldp; + short first = 1; + char *lastlabel = (char*)malloc(1024*sizeof(char)); + while (mt) { + /*if (foundlast) { + if (oldp != mt->thisp) break; + } + if (mt->thisp == (CELL)lastp) { + foundlast = 1; + oldp = mt->thisp; + }*/ + if (mt->blockty == SIMPLE_ENTRY) { + //if ((YAP_BBs)mt->u.eb.id == IF_NOT_THEN_INSTINIT) { strcpy(buf, ""); break; } + p->u.jhc.jh->tcc.cf->emit = 1; + i = 0; + /*while (i < p->u.jhc.jh->cf->nemited) { + if (!strcmp(p->u.jhc.jh->cf->emited_blocks[i], mt->u.eb.label_entry)) { + p->u.jhc.jh->cf->emit = 0; + break; + } + i += 1; + }*/ + if (p->u.jhc.jh->tcc.cf->emit) { + { + p->u.jhc.jh->tcc.cf->leastonce = 1; + p->u.jhc.jh->tcc.cf->nemited += 1; + p->u.jhc.jh->tcc.cf->emited_blocks = (char**)realloc(p->u.jhc.jh->tcc.cf->emited_blocks, p->u.jhc.jh->tcc.cf->nemited*sizeof(char*)); + p->u.jhc.jh->tcc.cf->emited_blocks[p->u.jhc.jh->tcc.cf->nemited-1] = (char*)malloc(1024*sizeof(char)); + strcpy(p->u.jhc.jh->tcc.cf->emited_blocks[p->u.jhc.jh->tcc.cf->nemited-1], mt->u.eb.label_entry); + } + strcpy(lastlabel, mt->u.eb.label_entry); + if (first) { + sprintf(tmp, "%s:\n{\n", mt->u.eb.label_entry); + first = 0; + } + else sprintf(tmp, "}\n\n%s:\n{\n", mt->u.eb.label_entry); + strcat(buf, tmp); +#if YAP_DBG_PREDS + sprintf(tmp, "print_block((YAP_BBs)%ld, ON_NATIVE);\n", (Int)mt->u.eb.id); + strcat(buf, tmp); +#endif + sprint_block((YAP_BBs)mt->u.eb.id, &tmp); + strcat(buf, tmp); + if (mt->u.eb.label_destiny) { + if (strcmp(mt->u.eb.label_destiny, "")) { + if (found_entry(mt->u.eb.label_destiny, p)) { + sprintf(tmp, "goto %s;\n", mt->u.eb.label_destiny); + } else { + sprintf(tmp, "SUCCESSBACK();\n"); + } + strcat(buf, tmp); + } + } + } + } + else if (mt->blockty == SIMPLE) { + if (p->u.jhc.jh->tcc.cf->emit && (prevblock->u.sb.id != PUT_X_VAL_INSTINIT || mt->u.sb.id != YAAM_DEREF_BODY_D0PT0)) { + Int printif = 0; + if ((YAP_BBs)mt->u.sb.id == YAAM_DEREF_BODY_D0PT0 || (YAP_BBs)mt->u.sb.id == YAAM_DEREF_BODY_D0PT1 || + (YAP_BBs)mt->u.sb.id == YAAM_DEREF_BODY_D0S_SREG || (YAP_BBs)mt->u.sb.id == YAAM_DEREF_BODY_D1PT0 || + (YAP_BBs)mt->u.sb.id == YAAM_DEREF_BODY_D1PT1) { + sprintf(tmp, "/* address = 0x%lX */ ", mt->thisp); + strcat(buf, tmp); + } + if ((YAP_BBs)mt->u.sb.id == CUT_COROUTINING || (YAP_BBs)mt->u.sb.id == CUT_T_COROUTINING || (YAP_BBs)mt->u.sb.id == CUT_E_COROUTINING) { + sprintf(tmp, "#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wunused-value\"\n"); + strcat(buf, tmp); + } +#if YAP_DBG_PREDS + sprintf(tmp, "print_block((YAP_BBs)%ld, ON_NATIVE);\n", (Int)mt->u.sb.id); + strcat(buf, tmp); +#endif + sprint_block((YAP_BBs)mt->u.sb.id, &tmp); + strcat(buf, tmp); + if ((YAP_BBs)mt->u.sb.id == CUT_COROUTINING || (YAP_BBs)mt->u.sb.id == CUT_T_COROUTINING || (YAP_BBs)mt->u.sb.id == CUT_E_COROUTINING) { + sprintf(tmp, "#pragma clang diagnostic pop\n"); + strcat(buf, tmp); + } + if(mt->u.sb.label_destiny) { + if (strcmp(mt->u.sb.label_destiny, "")) { + if (foundlast) { + sprintf(tmp, "SUCCESSBACK();\n"); + strcat(buf, tmp); + } + else { + if (found_entry(mt->u.sb.label_destiny, p)) { + if ( + (YAP_BBs)mt->u.sb.id != NoStackExecute_Exception && + (YAP_BBs)mt->u.sb.id != NoStackDExecute_Exception && + (YAP_BBs)mt->u.sb.id != NoStackCall_Exception && + (YAP_BBs)mt->u.sb.id != NoStackDeallocate_Exception && + (YAP_BBs)mt->u.sb.id != NoStackCut_Exception && + (YAP_BBs)mt->u.sb.id != NoStackCutT_Exception && + (YAP_BBs)mt->u.sb.id != NoStackCutE_Exception && + (YAP_BBs)mt->u.sb.id != NoStackCommitX_Exception && + (YAP_BBs)mt->u.sb.id != NoStackCommitY_Exception && + (YAP_BBs)mt->u.sb.id != NoStackEither_Exception && + (YAP_BBs)mt->u.sb.id != NoStackPExecute_Exception && + (YAP_BBs)mt->u.sb.id != NoStackPExecute2_Exception && + (YAP_BBs)mt->u.sb.id != NoStackPTExecute_Exception) + { + sprintf(tmp, "goto %s;\n", mt->u.sb.label_destiny); + strcat(buf, tmp); + } + } else { + sprintf(tmp, "SUCCESSBACK();\n"); + strcat(buf, tmp); + } + } + } + } + if (printif) { + sprintf(tmp, "}\nelse SUCCESSBACK();\n"); + strcat(buf, tmp); + } + //if (mt->u.sb.id == DEXECUTE_END_END) break; + } + } + else if (mt->blockty == CONDITIONAL_HEADER) { + if (p->u.jhc.jh->tcc.cf->emit) { + if (mt->u.kb._if->next && !(mt->u.kb._else->next)) + emit_blocks_buf(mt->u.kb._if, nident+1, buf, p); + else if (!(mt->u.kb._if->next) && mt->u.kb._else->next) + emit_blocks_buf(mt->u.kb._else, nident+1, buf, p); + else if (mt->u.kb._if->next && mt->u.kb._else->next) { + sprintf(tmp, "if (%s) {\n", mt->u.kb.exp); + strcat(buf, tmp); + emit_blocks_buf(mt->u.kb._if, nident+1, buf, p); + if (p->u.jhc.jh->tcc.cf->printlabel) { + sprintf(tmp, "}\nelse {\n%s:;\n", p->u.jhc.jh->tcc.cf->clabel); + p->u.jhc.jh->tcc.cf->printlabel = 0; + } + else { + sprintf(tmp, "}\nelse {\n"); + } + strcat(buf, tmp); + emit_blocks_buf(mt->u.kb._else, nident+1, buf, p); + sprintf(tmp, "}\n"); + strcat(buf, tmp); + } + } + } + else if (mt->blockty == MULTIPLE_DESTINY) { + Int printif = 0; + if (p->u.jhc.jh->tcc.cf->emit) { +#if YAP_DBG_PREDS + sprintf(tmp, "print_block((YAP_BBs)%ld, ON_NATIVE);\n", (Int)mt->u.mdb.id); + strcat(buf, tmp); +#endif + sprint_block((YAP_BBs)mt->u.mdb.id, &tmp); + strcat(buf, tmp); + if(mt->u.mdb.nfaillabels > 0) { + sprintf(tmp, "if (FAILED) {\n"); + strcat(buf, tmp); + for (i = 0; i < mt->u.mdb.nfaillabels; i++) { + sprintf(tmp, " if ((UInt)(*_PREG) == 0x%lX) goto %s;\n", + mt->u.mdb.faildestiny.p[i], mt->u.mdb.faildestiny.labels[i]); + strcat(buf, tmp); + } + sprintf(tmp, "}\n"); + strcat(buf, tmp); + } + if(mt->u.mdb.ndest > 0) { + /*if ((YAP_BBs)mt->u.mdb.id == DEXECUTE_END_END && (CELL)lastp == mt->thisp) { + sprintf(tmp, "SUCCESSBACK();\n"); + strcat(buf, tmp); + break; + } + else {*/ + //if (found_entry(mt->u.mdb.destiny.labels[0]), p) { + sprintf(tmp, "if ((UInt)(*_PREG) == 0x%lX) goto %s;\n", mt->u.mdb.destiny.p[0], mt->u.mdb.destiny.labels[0]); + //} else { + //sprintf(tmp, "if ((UInt)(*_PREG) == 0x%lX) {\n SUCCESSBACK();\n}\n", mt->u.mdb.destiny.p[0]); + //} + strcat(buf, tmp); + //if ((YAP_BBs)mt->u.mdb.id == PROCCEED_END || (YAP_BBs)mt->u.mdb.id == DEXECUTE_END_END) { + int i; + for (i = 1; i < mt->u.mdb.ndest; i++) { + if (found_entry(mt->u.mdb.destiny.labels[i], p)) { + //if (strcmp(lastlabel, mt->u.mdb.destiny.labels[i])) { + sprintf(tmp, "if ((UInt)(*_PREG) == 0x%lX) goto %s;\n", + mt->u.mdb.destiny.p[i], mt->u.mdb.destiny.labels[i]); + //} + } else { + sprintf(tmp, "if ((UInt)(*_PREG) == 0x%lX) SUCCESSBACK();\n", mt->u.mdb.destiny.p[i]); + } + strcat(buf, tmp); + } + //} + //int k = 0; + //while (k < mt->u.mdb.ndest && Yap_op_from_opcode(((yamop*)(mt->u.mdb.destiny.p[k]))->opc) != _jit_handler) { k++; } + //if (k == mt->u.mdb.ndest) { + sprintf(tmp, "SUCCESSBACK();\n"); + //} + //else { + //sprintf(tmp, "else {\n SUCCESS();\n}\n"); + //} + strcat(buf, tmp); + //} + } + else { + sprintf(tmp, "SUCCESSBACK();\n\n"); + strcat(buf, tmp); + } + if (printif) { + sprintf(tmp, "}\nelse SUCCESSBACK();\n"); + strcat(buf, tmp); + } + } + } + prevblock = mt; + mt = (BlocksContext*)mt->next; + } + free(lastlabel); + free(tmp); +} + +static inline void +fill_entries(BlocksContext* mt, yamop** p) { + while (mt) { + if (mt->blockty == SIMPLE_ENTRY) { + (*p)->u.jhc.jh->tcc.cf->nentries += 1; + (*p)->u.jhc.jh->tcc.cf->entries = (char**)realloc((*p)->u.jhc.jh->tcc.cf->entries, (*p)->u.jhc.jh->tcc.cf->nentries*sizeof(char*)); + (*p)->u.jhc.jh->tcc.cf->entries[(*p)->u.jhc.jh->tcc.cf->nentries-1] = (char*)malloc(1024*sizeof(char)); + strcpy((*p)->u.jhc.jh->tcc.cf->entries[(*p)->u.jhc.jh->tcc.cf->nentries-1], mt->u.eb.label_entry); + } + mt = (BlocksContext*)mt->next; + } +} + +#if YAP_STAT_PREDS +#if YAP_DBG_PREDS +const char* cfile_header_for_trace = "#include \n#include \n#include \n#include \n#include \n\nextern CELL nnexec;\nextern int IUnify_complex(CELL*, CELL*, CELL*);\nextern int iequ_complex(CELL*, CELL*, CELL*);\nextern void print_preg(yamop*);\nextern NativeContext* NativeArea;\nextern yamop* HREADPREG;\nextern CELL BLOCK;\nextern CELL BLOCKADDRESS;\nextern CELL FAILED;\n\nvoid* clause(yamop**, yamop**, CELL**, void*[], void*[]);\n\nvoid* clause(yamop** _PREG, yamop** _CPREG, CELL** _SREG, void* external_labels[], void* OpAddress[]) {\nNativeArea->runs[(*_PREG)->u.jhc.jh->caa.naddress] += 1;\n\n\0"; +#else /* YAP_DBG_PREDS */ +const char* cfile_header_for_trace = "#include \n#include \n#include \n#include \n#include \n\nextern CELL nnexec;\nextern int IUnify_complex(CELL*, CELL*, CELL*);\nextern int iequ_complex(CELL*, CELL*, CELL*);\nextern void print_preg(yamop*);\nextern NativeContext* NativeArea;\nextern yamop* HREADPREG;\nextern CELL BLOCK;\nextern CELL BLOCKADDRESS;\nextern CELL FAILED;\n\nvoid* clause(yamop**, yamop**, CELL**, void*[], void*[]);\n\nvoid* clause(yamop** _PREG, yamop** _CPREG, CELL** _SREG, void* external_labels[], void* OpAddress[]) {\nNativeArea->runs[(*_PREG)->u.jhc.jh->caa.naddress] += 1;\n\n\0"; +#endif /* YAP_DBG_PREDS */ +#else /* YAP_STAT_PREDS */ +#if YAP_DBG_PREDS +const char* cfile_header_for_trace = "#include \n#include \n#include \n#include \n#include \n\nextern CELL nnexec;\nextern int IUnify_complex(CELL*, CELL*, CELL*);\nextern int iequ_complex(CELL*, CELL*, CELL*);\nextern void print_preg(yamop*);\nextern NativeContext* NativeArea;\nextern yamop* HREADPREG;\nextern CELL BLOCK;\nextern CELL BLOCKADDRESS;\nextern CELL FAILED;\n\nvoid* clause(yamop**, yamop**, CELL**, void*[], void*[]);\n\nvoid* clause(yamop** _PREG, yamop** _CPREG, CELL** _SREG, void* external_labels[], void* OpAddress[]) {\n\n\0"; +#else /* YAP_DBG_PREDS */ +const char* cfile_header_for_trace = "#include \n#include \n#include \n#include \n#include \n\nextern CELL nnexec;\nextern int IUnify_complex(CELL*, CELL*, CELL*);\nextern int iequ_complex(CELL*, CELL*, CELL*);\nextern void print_preg(yamop*);\nextern NativeContext* NativeArea;\nextern yamop* HREADPREG;\nextern CELL BLOCK;\nextern CELL BLOCKADDRESS;\nextern CELL FAILED;\n\nvoid* clause(yamop**, yamop**, CELL**, void*[], void*[]);\n\nvoid* clause(yamop** _PREG, yamop** _CPREG, CELL** _SREG, void* external_labels[], void* OpAddress[]) {\n\n\0"; +#endif /* YAP_DBG_PREDS */ +#endif /* YAP_STAT_PREDS */ +const char* cfile_end_for_trace = " | clang -O0 -DCUT_C=1 -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEBUG=1 -DDEPTH_LIMIT=1 -DTABLING=1 -DHAVE_CONFIG_H -D_YAP_NOT_INSTALLED_=1 -D_NATIVE=1 -I. -I./H -I./include -I./os -I./OPTYap -I./BEAM -I./MYDDAS -I./HPP -xc -c - -o - -emit-llvm\0"; +/*const char* cfile_end = " | clang -O0 -DCUT_C=1 -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEBUG=1 -DDEPTH_LIMIT=1 -DTABLING=1 -DHAVE_CONFIG_H -D_YAP_NOT_INSTALLED_=1 -D_NATIVE=1 -I. -I./H -I./include -I./os -I./OPTYap -I./BEAM -I./MYDDAS -I./HPP -emit-llvm -xc -c - -o\0";*/ + +static inline Int +emit_intermediate_for_trace (TraceContext *tt, CELL *tsize, char **cmd, yamop* p) { + int i; + if (tt) { + p->u.jhc.jh->tcc.cf->entries = NULL; + p->u.jhc.jh->tcc.cf->nentries = 0; + fill_entries(tt->bc, &p); + p->u.jhc.jh->tcc.cf->clabel = (char*)malloc(1024*sizeof(char)); + p->u.jhc.jh->tcc.cf->labelidx = 0; + p->u.jhc.jh->tcc.cf->printlabel = 0; + p->u.jhc.jh->tcc.cf->emited_blocks = NULL; + p->u.jhc.jh->tcc.cf->nemited = 0; + char *buf = (char*)malloc(0x100000*sizeof(char)); + strcpy(buf, ""); + emit_blocks_buf(tt->bc, 0, buf, p); + { + long int tracesize = strlen(cfile_header_for_trace) + strlen(buf); + if (tracesize > 0x1FBD0 || *tsize == tracesize || ((long int)(*tsize * 0.002 + *tsize)) > tracesize) { + for (i = 0; i < p->u.jhc.jh->tcc.cf->nemited; i++) + free(p->u.jhc.jh->tcc.cf->emited_blocks[i]); + free(p->u.jhc.jh->tcc.cf->emited_blocks); + free(buf); + free(p->u.jhc.jh->tcc.cf->clabel); + int i; + for (i = 0; i < p->u.jhc.jh->tcc.cf->nentries; i++) + free(p->u.jhc.jh->tcc.cf->entries[i]); + free(p->u.jhc.jh->tcc.cf->entries); + return 0; + } + *tsize = tracesize; + } + *cmd = (char*)malloc(0x100000*sizeof(char)); + if (strcmp(buf, "")) { + strcpy(*cmd, cfile_header_for_trace); + strcat(*cmd, buf); + strcat(*cmd, "}\n\n}"); + } else { strcpy(*cmd, ""); } + for (i = 0; i < p->u.jhc.jh->tcc.cf->nemited; i++) + free(p->u.jhc.jh->tcc.cf->emited_blocks[i]); + free(p->u.jhc.jh->tcc.cf->emited_blocks); +#if YAP_DBG_PREDS + if (ExpEnv.debug_struc.pprint_intermediate.print_to_std) { + if (strcmp((char*)ExpEnv.debug_struc.pprint_intermediate.std_name, "STDOUT") == 0) + fprintf(stdout, "%s%s}\n\n}", cfile_header_for_trace, buf); + else if (strcmp((char*)ExpEnv.debug_struc.pprint_intermediate.std_name, "STDERR") == 0) + fprintf(stderr, "%s%s}\n\n}", cfile_header_for_trace, buf); + } + if (ExpEnv.debug_struc.pprint_intermediate.print_to_file) { + char filename[1024]; + sprintf(filename, "%s%ld.c", (char*)ExpEnv.debug_struc.pprint_intermediate.file_name, p->u.jhc.jh->caa.naddress); + FILE *out = fopen(filename, "w"); + fprintf(out, "%s%s}\n\n}", cfile_header_for_trace, buf); + fclose(out); + } +#endif +/* + This block print the trace. + + char filename[1024]; + sprintf(filename, "trace%ld.c", global); + FILE *out = fopen(filename, "w"); + fprintf(out, "%s%s}\n\n}", cfile_header_for_trace, buf); + fclose(out); +*/ + free(buf); + free(p->u.jhc.jh->tcc.cf->clabel); + int i; + for (i = 0; i < p->u.jhc.jh->tcc.cf->nentries; i++) + free(p->u.jhc.jh->tcc.cf->entries[i]); + free(p->u.jhc.jh->tcc.cf->entries); + return strlen(*cmd); + } + return 0; +} + +void emit_intermediate_for_trace_dbg (TraceContext*, yamop*); + +void +emit_intermediate_for_trace_dbg (TraceContext *tt, yamop* p) { + char *buf; + CELL x; + emit_intermediate_for_trace(tt, &x, &buf, p); + fprintf(stdout, "%s%s}\n\n}", cfile_header_for_trace, buf); +} + +#include "nextof.hpp" + +const char* cfile_header_for_clause = "#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nextern CELL nnexec;\nextern int IUnify_complex(CELL*, CELL*, CELL*);\nextern int iequ_complex(CELL*, CELL*, CELL*);\nextern void print_preg(yamop*);\nextern NativeContext* NativeArea;\nextern yamop* HREADPREG;\nextern CELL BLOCK;\nextern CELL BLOCKADDRESS;\nextern CELL FAILED;\n\nvoid* clause(yamop**, yamop**, CELL**, void*[], void*[]);\n\nvoid* clause(yamop** _PREG, yamop** _CPREG, CELL** _SREG, void* external_labels[], void* OpAddress[]) {\n\0"; +const char* cfile_end_for_clause = " | clang -O0 -DCUT_C=1 -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEBUG=1 -DDEPTH_LIMIT=1 -DTABLING=1 -DHAVE_CONFIG_H -D_YAP_NOT_INSTALLED_=1 -D_NATIVE=1 -I. -I./H -I./include -I./os -I./OPTYap -I./BEAM -I./MYDDAS -I./HPP -xc -c - -o - -emit-llvm\0"; +/*const char* cfile_end = " | clang -O0 -DCUT_C=1 -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEBUG=1 -DDEPTH_LIMIT=1 -DTABLING=1 -DHAVE_CONFIG_H -D_YAP_NOT_INSTALLED_=1 -D_NATIVE=1 -I. -I./H -I./include -I./os -I./OPTYap -I./BEAM -I./MYDDAS -I./HPP -emit-llvm -xc -c - -o\0";*/ + +#define ENTRY_HAS_WRITED_CPART(entry) \ + entry == _unify_x_var || \ + entry == _unify_l_x_var || \ + entry == _unify_x_var2 || \ + entry == _unify_l_x_var2 || \ + entry == _unify_y_var || \ + entry == _unify_l_y_var || \ + entry == _unify_x_val || \ + entry == _unify_l_x_val || \ + entry == _unify_x_loc || \ + entry == _unify_l_x_loc || \ + entry == _unify_atom || \ + entry == _unify_l_atom || \ + entry == _unify_void || \ + entry == _unify_n_voids || \ + entry == _unify_l_n_voids || \ + entry == _unify_l_list || \ + entry == _unify_struct || \ + entry == _unify_l_struc || \ + entry == _unify_l_float || \ + entry == _save_pair_x + +#define SET_ADDRESS_R() \ + strcat(buf, "static void *NOp_Address_R[] = { "); \ + for (i = 0; i < nentries-1; i++) { \ + strcat(buf, "&&"); \ + sprint_op(tmpbuf, "lbl", entries[i], ""); \ + strcat(buf, tmpbuf); \ + strcat(buf, ", "); \ + } \ + strcat(buf, "&&"); \ + sprint_op(tmpbuf, "lbl", entries[nentries-1], ""); \ + strcat(buf, tmpbuf); \ + strcat(buf, " };\n\n"); + +#define SET_ADDRESS_W() \ + strcat(buf, "static void *NOp_Address_W[] = { "); \ + for (i = 0; i < nentries-1; i++) { \ + strcat(buf, "&&"); \ + sprint_op(tmpbuf, "lbl", entries[i], "_write"); \ + strcat(buf, tmpbuf); \ + strcat(buf, ", "); \ + } \ + strcat(buf, "&&"); \ + sprint_op(tmpbuf, "lbl", entries[nentries-1], "_write"); \ + strcat(buf, tmpbuf); \ + strcat(buf, " };\n\n"); + +static inline Int +fe(op_numbers k, op_numbers* e, COUNT n) { + int i = 0; + while (i < n && e[i] != k) i++; + if (i == n) return -1; + return i; +} + +static inline Int +emit_intermediate_for_clause (yamop *p, char **cmd) { + yamop *tmp = p; + yamop *next; + op_numbers* entries = NULL; + COUNT i, nentries = 0; + while (1) { + op_numbers op = Yap_op_from_opcode(p->opc); + if (fe(op, entries, nentries) == -1) { + nentries += 1; + entries = (op_numbers*)realloc(entries, nentries*sizeof(op_numbers)); + entries[nentries-1] = op; + } + if (op == _execute || op == _dexecute || op == _procceed || op == _fcall || op == _call || op == _execute_cpred) break; + if (op == _either) { + NextOf(&p); + } + else if (op == _cut || op == _cut_t || op == _cut_e || op == _commit_b_x || op == _commit_b_y || op == _p_functor) { + NextOf(&p); + NextOf(&p); + } + NextOf(&p); + } + p = tmp; + while (1) { + next = p; + if (Yap_op_from_opcode(next->opc) == _either) { + NextOf(&next); + } + else if (Yap_op_from_opcode(next->opc) == _cut || Yap_op_from_opcode(next->opc) == _cut_t || Yap_op_from_opcode(next->opc) == _cut_e || Yap_op_from_opcode(next->opc) == _commit_b_x || Yap_op_from_opcode(next->opc) == _commit_b_y || Yap_op_from_opcode(next->opc) == _p_functor) { + NextOf(&next); + NextOf(&next); + } + NextOf(&next); + if (Yap_op_from_opcode(p->opc) == _execute || Yap_op_from_opcode(p->opc) == _dexecute || Yap_op_from_opcode(p->opc) == _procceed || Yap_op_from_opcode(p->opc) == _fcall || Yap_op_from_opcode(p->opc) == _call || Yap_op_from_opcode(p->opc) == _execute_cpred) { + p->next_native_r = p->next_native_w = -1; + break; + } + else { + op_numbers op = Yap_op_from_opcode(next->opc); + p->next_native_r = p->next_native_w = fe(op, entries, nentries); + } + if (Yap_op_from_opcode(p->opc) == _either) { + NextOf(&p); + } + else if (Yap_op_from_opcode(p->opc) == _cut || Yap_op_from_opcode(p->opc) == _cut_t || Yap_op_from_opcode(p->opc) == _cut_e || Yap_op_from_opcode(p->opc) == _commit_b_x || Yap_op_from_opcode(p->opc) == _commit_b_y || Yap_op_from_opcode(p->opc) == _p_functor) { + NextOf(&p); + NextOf(&p); + } + NextOf(&p); + } + /*p = tmp; + while(1){ + op_numbers op = Yap_op_from_opcode(p->opc); + print_op("", op, " -- "); + printf("%ld\n", p->next_native_r); + if (op == _execute || op == _dexecute || op == _procceed || op == _fcall || op == _call || op == _execute_cpred) break; + if (op == _either) { + NextOf(&p); + } + else if (op == _cut || op == _cut_t || op == _cut_e || op == _commit_b_x || op == _commit_b_y || op == _p_functor) { + NextOf(&p); + NextOf(&p); + } + NextOf(&p); + }*/ + + char buf[2097152]; + char tmpbuf[1024]; + strcpy(buf, ""); + SET_ADDRESS_R(); + SET_ADDRESS_W(); + strcat(buf, "\n"); + + for (i = 0; i < nentries; i++) { + /* read part */ + sprint_op(tmpbuf, "lbl", entries[i], ""); + strcat(buf, tmpbuf); + strcat(buf, ":\n{\n"); + sprint_op(tmpbuf, " CELL idx = (*_PREG)->next_native_r;\n ", entries[i], "_instinit;\n"); + strcat(buf, tmpbuf); + //sprintf(tmpbuf, " if (idx != -1) goto *NOp_Address[idx];\n else BACK();\n"); + //strcat(buf, tmpbuf); + strcat(buf, "}\n\n"); + + /* written part */ + if (ENTRY_HAS_WRITED_CPART(entries[i])) { + sprint_op(tmpbuf, "lbl", entries[i], "_write"); + strcat(buf, tmpbuf); + strcat(buf, ":\n{\n"); + /*{ + strcpy(tmplbl, tmpbuf); + sprintf(tmpbuf, " printf(\\\"%s!! -- \\\");\n", tmplbl); + strcat(buf, tmpbuf); + sprintf(tmpbuf, " print_op(\\\"\\\", Yap_op_from_opcode((*_PREG)->opc), \\\"!!\\\n\\\");\n"); + strcat(buf, tmpbuf); + }*/ + sprint_op(tmpbuf, " CELL idx = (*_PREG)->next_native_w;\n ", entries[i], "_write_instinit;\n"); + strcat(buf, tmpbuf); + //sprintf(tmpbuf, " if (idx != -1) goto *NOp_Address[idx];\n else BACK();\n"); + //strcat(buf, tmpbuf); + strcat(buf, "}\n\n"); + } + else { + sprint_op(tmpbuf, "lbl", entries[i], "_write:;\n\n"); + strcat(buf, tmpbuf); + } + } + + *cmd = (char*)malloc(2097152*sizeof(char)); + //strcpy(*cmd, "echo \""); + strcpy(*cmd, cfile_header_for_clause); + strcat(*cmd, buf); + strcat(*cmd, "BACK();\n}"); + //strcat(*cmd, cfile_end_for_clause); + +#if YAP_DBG_PREDS + if (ExpEnv.debug_struc.pprint_intermediate.print_to_std) { + if (strcmp((char*)ExpEnv.debug_struc.pprint_intermediate.std_name, "STDOUT") == 0) + fprintf(stdout, "%s%s}\n\n}", cfile_header_for_clause, buf); + else if (strcmp((char*)ExpEnv.debug_struc.pprint_intermediate.std_name, "STDERR") == 0) + fprintf(stderr, "%s%s}\n\n}", cfile_header_for_clause, buf); + } + if (ExpEnv.debug_struc.pprint_intermediate.print_to_file) { + char filename[1024]; + sprintf(filename, "%s%ld.c", (char*)ExpEnv.debug_struc.pprint_intermediate.file_name, p->u.jhc.jh->caa.naddress); + FILE *out = fopen(filename, "w"); + if (out) { + fprintf(out, "%s%s}\n\n}", cfile_header_for_trace, buf); + fclose(out); + free(*cmd); + return 1; + } + free(*cmd); + return 0; + } +#endif +} + +static inline void* +recompile(void *pt) +{ + yamop* p = (yamop*)pt; + +#if YAP_STAT_PREDS + struct rusage rustart, ruend; + getrusage(RUSAGE_SELF, &rustart); +#endif + Int v = emit_intermediate_for_trace(IntermediatecodeArea->area.t[p->u.jhc.jh->caa.taddress], &(IntermediatecodeArea->area.t[p->u.jhc.jh->caa.taddress]->tracesize), &(p->u.jhc.jh->tcc.cmd), p); + if (v) { +#if YAP_DBG_PREDS + if (ExpEnv.debug_struc.pprint_me.at_recompilation != 0 && ExpEnv.debug_struc.pprint_me.at_recompilation != 0x1) { + fprintf(stderr, "%s:%d\n", __FILE__, __LINE__); + fprintf(stderr, "%s", (char*)ExpEnv.debug_struc.pprint_me.at_recompilation); + } +#endif +#if YAP_STAT_PREDS + NativeArea->area.nrecomp[p->u.jhc.jh->caa.naddress] += 1; + NativeArea->area.native_size_bytes[p->u.jhc.jh->caa.naddress] = (CELL*)realloc(NativeArea->area.native_size_bytes[p->u.jhc.jh->caa.naddress], NativeArea->area.nrecomp[p->u.jhc.jh->caa.naddress]*sizeof(CELL)); + NativeArea->area.trace_size_bytes[p->u.jhc.jh->caa.naddress] = (CELL*)realloc(NativeArea->area.trace_size_bytes[p->u.jhc.jh->caa.naddress], NativeArea->area.nrecomp[p->u.jhc.jh->caa.naddress]*sizeof(CELL)); + NativeArea->area.trace_size_bytes[p->u.jhc.jh->caa.naddress][NativeArea->area.nrecomp[p->u.jhc.jh->caa.naddress]-1] = v; +#endif + NativeArea->area.p[p->u.jhc.jh->caa.naddress] = call_JIT_Compiler(J, p); + IntermediatecodeArea->area.isactive[p->u.jhc.jh->caa.taddress] = 0; +#if YAP_STAT_PREDS + getrusage(RUSAGE_SELF, &ruend); + NativeArea->area.compilation_time[p->u.jhc.jh->caa.naddress] = (double*)realloc(NativeArea->area.compilation_time[p->u.jhc.jh->caa.naddress], NativeArea->area.nrecomp[p->u.jhc.jh->caa.naddress]*sizeof(double)); + NativeArea->area.compilation_time[p->u.jhc.jh->caa.naddress][NativeArea->area.nrecomp[p->u.jhc.jh->caa.naddress]-1] = + (((double)ruend.ru_utime.tv_sec - (double)rustart.ru_utime.tv_sec) + ((double)ruend.ru_utime.tv_usec - (double)rustart.ru_utime.tv_usec) / 1000000.0); +#endif + } + return NULL; +} + +static inline void* +compile(void *pt) +{ + yamop* p = (yamop*)pt; + +#if YAP_STAT_PREDS + struct rusage rustart, ruend; + getrusage(RUSAGE_SELF, &rustart); +#endif + p->u.jhc.jh->caa.naddress = NativeArea->n; + Int v = emit_intermediate_for_trace(IntermediatecodeArea->area.t[p->u.jhc.jh->caa.taddress], &(IntermediatecodeArea->area.t[p->u.jhc.jh->caa.taddress]->tracesize), &(p->u.jhc.jh->tcc.cmd), p); + if (v) { +#if YAP_DBG_PREDS + if (ExpEnv.debug_struc.pprint_me.at_compilation != 0 && ExpEnv.debug_struc.pprint_me.at_compilation != 0x1) { + fprintf(stderr, "%s:%d\n", __FILE__, __LINE__); + fprintf(stderr, "%s", (char*)ExpEnv.debug_struc.pprint_me.at_compilation); + } +#endif + NativeArea->area.p = (void**)realloc(NativeArea->area.p, (NativeArea->n+1)*sizeof(void*)); + NativeArea->area.ok = (COUNT*)realloc(NativeArea->area.ok, (NativeArea->n+1)*sizeof(COUNT)); + NativeArea->area.pc = (CELL*)realloc(NativeArea->area.pc, (NativeArea->n+1)*sizeof(CELL)); +#if YAP_STAT_PREDS + NativeArea->area.nrecomp = (COUNT*)realloc(NativeArea->area.nrecomp, (NativeArea->n+1)*sizeof(COUNT)); + NativeArea->area.nrecomp[p->u.jhc.jh->caa.naddress] = 1; + NativeArea->area.compilation_time = (double**)realloc(NativeArea->area.compilation_time, (NativeArea->n+1)*sizeof(double*)); + NativeArea->area.native_size_bytes = (CELL**)realloc(NativeArea->area.native_size_bytes, (NativeArea->n+1)*sizeof(CELL*)); + NativeArea->area.native_size_bytes[p->u.jhc.jh->caa.naddress] = (CELL*)malloc(NativeArea->area.nrecomp[p->u.jhc.jh->caa.naddress]*sizeof(CELL)); + NativeArea->area.trace_size_bytes = (CELL**)realloc(NativeArea->area.trace_size_bytes, (NativeArea->n+1)*sizeof(CELL*)); + NativeArea->area.trace_size_bytes[p->u.jhc.jh->caa.naddress] = (CELL*)malloc(NativeArea->area.nrecomp[p->u.jhc.jh->caa.naddress]*sizeof(CELL)); + NativeArea->area.trace_size_bytes[p->u.jhc.jh->caa.naddress][NativeArea->area.nrecomp[p->u.jhc.jh->caa.naddress]-1] = v; + NativeArea->runs = (COUNT*)realloc(NativeArea->runs, (NativeArea->n+1)*sizeof(COUNT)); + NativeArea->t_runs = (double*)realloc(NativeArea->t_runs, (NativeArea->n+1)*sizeof(double)); + NativeArea->success = (COUNT*)realloc(NativeArea->success, (NativeArea->n+1)*sizeof(COUNT)); +#endif + NativeArea->area.ok[p->u.jhc.jh->caa.naddress] = 0; +#if YAP_STAT_PREDS + NativeArea->success[p->u.jhc.jh->caa.naddress] = 0; + NativeArea->runs[p->u.jhc.jh->caa.naddress] = 0; + NativeArea->t_runs[p->u.jhc.jh->caa.naddress] = 0.0; +#endif + NativeArea->n += 1; + NativeArea->area.p[p->u.jhc.jh->caa.naddress] = call_JIT_Compiler(J, p); + NativeArea->area.ok[p->u.jhc.jh->caa.naddress] = 1; + NativeArea->area.pc[p->u.jhc.jh->caa.naddress] = (CELL)p; +#if YAP_STAT_PREDS + getrusage(RUSAGE_SELF, &ruend); + NativeArea->area.compilation_time[p->u.jhc.jh->caa.naddress] = (double*)malloc(NativeArea->area.nrecomp[p->u.jhc.jh->caa.naddress]*sizeof(double)); + NativeArea->area.compilation_time[p->u.jhc.jh->caa.naddress][NativeArea->area.nrecomp[p->u.jhc.jh->caa.naddress]-1] = + (((double)ruend.ru_utime.tv_sec - (double)rustart.ru_utime.tv_sec) + ((double)ruend.ru_utime.tv_usec - (double)rustart.ru_utime.tv_usec) / 1000000.0); +#endif + } + else { + p->u.jhc.jh->caa.naddress = -1; + } + IntermediatecodeArea->area.isactive[p->u.jhc.jh->caa.taddress] = 0; + return NULL; +} + +#endif /*_NATIVE */ diff --git a/JIT/HPP/yaam_misc.h b/JIT/HPP/yaam_misc.h index 2cc5a9052..b1920371b 100644 --- a/JIT/HPP/yaam_misc.h +++ b/JIT/HPP/yaam_misc.h @@ -5,7 +5,7 @@ GONext(); \ } \ else { \ - PP = (*_PREG)->y_u.p.p; \ + PP = (*_PREG)->u.p.p; \ PELOCK(3, PP); \ (*_PREG) = NEXTOP((*_PREG), p); \ GONext(); \ @@ -35,7 +35,7 @@ #if MULTIPLE_STACKS #define ALLOC_FOR_LOGICAL_PRED_MULTIPLE_STACKS \ - LogUpdClause *cl = (*_PREG)->y_u.L.ClBase; + LogUpdClause *cl = (*_PREG)->u.L.ClBase; #if PARALLEL_YAP #define ALLOC_FOR_LOGICAL_PRED_MULTIPLE_STACKS_PARALLEL \ PredEntry *ap = cl->ClPred; @@ -47,7 +47,7 @@ PP = NULL; #else #define ALLOC_FOR_LOGICAL_PRED_NOMULTIPLE_STACKS_INIT \ - LogUpdClause *cl = (LogUpdClause *)(*_PREG)->y_u.L.ClBase; + LogUpdClause *cl = (LogUpdClause *)(*_PREG)->u.L.ClBase; #define ALLOC_FOR_LOGICAL_PRED_NOMULTIPLE_STACKS_IF \ if (!(cl->ClFlags & InUseMask)) { \ @@ -562,13 +562,13 @@ #ifdef DEPTH_LIMIT #define ENSURE_SPACE_INSTINIT \ { \ - Int sz = (*_PREG)->y_u.Osbpa.i; \ - UInt arity = (*_PREG)->y_u.Osbpa.p->ArityOfPE; \ + Int sz = (*_PREG)->u.Osbpa.i; \ + UInt arity = (*_PREG)->u.Osbpa.p->ArityOfPE; \ if (Unsigned(HR) + sz > Unsigned(YREG)-CreepFlag) { \ YENV[E_CP] = (CELL) (*_C(*_PREG)); \ YENV[E_E] = (CELL) ENV; \ YENV[E_DEPTH] = DEPTH; \ - SET_ASP(YREG, (*_PREG)->y_u.Osbpa.s); \ + SET_ASP(YREG, (*_PREG)->u.Osbpa.s); \ (*_PREG) = NEXTOP((*_PREG),Osbpa); \ saveregs(); \ setregs(); \ @@ -580,12 +580,12 @@ #else /* DEPTH_LIMIT */ #define ENSURE_SPACE_INSTINIT \ { \ - Int sz = (*_PREG)->y_u.Osbpa.i; \ - UInt arity = (*_PREG)->y_u.Osbpa.p->ArityOfPE; \ + Int sz = (*_PREG)->u.Osbpa.i; \ + UInt arity = (*_PREG)->u.Osbpa.p->ArityOfPE; \ if (Unsigned(HR) + sz > Unsigned(YREG)-CreepFlag) { \ YENV[E_CP] = (CELL) (*_C(*_PREG)); \ YENV[E_E] = (CELL) ENV; \ - SET_ASP(YREG, (*_PREG)->y_u.Osbpa.s); \ + SET_ASP(YREG, (*_PREG)->u.Osbpa.s); \ (*_PREG) = NEXTOP((*_PREG),Osbpa); \ saveregs(); \ setregs(); \ @@ -599,7 +599,7 @@ #define ENSURE_SPACE_END #define JUMP_INSTINIT \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ JMPNext(); #define MOVE_BACK_INSTINIT \ @@ -620,7 +620,7 @@ #define EITHER_POST_COROUTINING \ register CELL d0; \ register choiceptr pt1; \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); #ifdef FROZEN_STACKS @@ -644,7 +644,7 @@ #define EITHER_POST_FROZEN_YSBA \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); #ifdef YAPOR @@ -658,7 +658,7 @@ GONext(); #define OR_ELSE_INSTINIT \ - HR = HBREG = PROTECT_FROZEN_H(B); \ + HR = HRBREG = PROTECT_FROZEN_H(B); \ ENV = B->cp_env; \ B->cp_cp = (*_PREG); @@ -672,11 +672,11 @@ #ifdef YAPOR #define OR_ELSE_YAPOR \ - SCH_new_alternative((*_PREG), (*_PREG)->y_u.Osblp.l); + SCH_new_alternative((*_PREG), (*_PREG)->u.Osblp.l); #endif #define OR_ELSE_END \ - B->cp_ap = (*_PREG)->y_u.Osblp.l; \ + B->cp_ap = (*_PREG)->u.Osblp.l; \ (*_PREG) = NEXTOP((*_PREG), Osblp); \ YREG = (CELL *) B->cp_a1; \ GONext(); @@ -687,7 +687,7 @@ #ifdef YAPOR #define OR_LAST_IFOK_INIT \ - HR = HBREG = PROTECT_FROZEN_H(pt0); \ + H = HRBREG = PROTECT_FROZEN_H(pt0); \ YREG = (CELL *) pt0->cp_a1; \ ENV = pt0->cp_env; @@ -702,7 +702,7 @@ #define OR_LAST_NOIF_INIT \ B = pt0->cp_b; \ - HR = PROTECT_FROZEN_H(pt0); \ + H = PROTECT_FROZEN_H(pt0); \ YREG = (CELL *) pt0->cp_a1; \ ENV = pt0->cp_env; @@ -855,7 +855,7 @@ JMPNext(); #define EXPAND_CLAUSES_INSTINIT \ - PredEntry *pe = (*_PREG)->y_u.sssllp.p; \ + PredEntry *pe = (*_PREG)->u.sssllp.p; \ yamop *pt0; \ SET_ASP(YREG, E_CB*sizeof(CELL)); @@ -909,7 +909,7 @@ } \ else { \ HR[d0 + 2] = AbsAppl(HR); \ - *HR = (CELL) pe->FunctorOfPred; \ + *H = (CELL) pe->FunctorOfPred; \ HR++; \ pt1 = XREGS + 1; \ for (; d0 > 0; --d0) { \ @@ -921,14 +921,14 @@ (pt0) = (CELL *)(d1); \ (d1) = *(CELL *)(d1); \ if(!IsVarTerm(d1)) { \ - *HR++ = d1; \ + *H++ = d1; \ setHwithd1 = 1; \ break; \ } \ } \ if (setHwithd1) { continue; } \ if (pt0 <= HR) { \ - *HR++ = (CELL)pt0; \ + *H++ = (CELL)pt0; \ } else { \ d1 = Unsigned(HR); \ RESET_VARIABLE(HR); \ @@ -937,7 +937,7 @@ } \ } \ else { \ - *HR++ = d1; \ + *H++ = d1; \ } \ } \ } \ @@ -972,7 +972,7 @@ } \ else { \ HR[d0 + 2] = AbsAppl(HR); \ - *HR = (CELL) pe->FunctorOfPred; \ + *H = (CELL) pe->FunctorOfPred; \ HR++; \ pt1 = XREGS + 1; \ for (; d0 > 0; --d0) { \ @@ -984,14 +984,14 @@ (pt0) = (CELL *)(d1); \ (d1) = *(CELL *)(d1); \ if(!IsVarTerm(d1)) { \ - *HR++ = d1; \ + *H++ = d1; \ setHwithd1 = 1; \ break; \ } \ } \ if (setHwithd1) { continue; } \ if (pt0 <= HR) { \ - *HR++ = (CELL)pt0; \ + *H++ = (CELL)pt0; \ } else { \ d1 = Unsigned(HR); \ RESET_VARIABLE(HR); \ @@ -1000,7 +1000,7 @@ } \ } \ else { \ - *HR++ = d1; \ + *H++ = d1; \ } \ } \ } \ @@ -1034,7 +1034,7 @@ } \ else { \ HR[d0 + 2] = AbsAppl(HR); \ - *HR = (CELL) pe->FunctorOfPred; \ + *H = (CELL) pe->FunctorOfPred; \ HR++; \ pt1 = XREGS + 1; \ for (; d0 > 0; --d0) { \ @@ -1046,14 +1046,14 @@ (pt0) = (CELL *)(d1); \ (d1) = *(CELL *)(d1); \ if(!IsVarTerm(d1)) { \ - *HR++ = d1; \ + *H++ = d1; \ setHwithd1 = 1; \ break; \ } \ } \ if (setHwithd1) { continue; } \ if (pt0 <= HR) { \ - *HR++ = (CELL)pt0; \ + *H++ = (CELL)pt0; \ } else { \ d1 = Unsigned(HR); \ RESET_VARIABLE(HR); \ @@ -1062,7 +1062,7 @@ } \ } \ else { \ - *HR++ = d1; \ + *H++ = d1; \ } \ } \ } \ @@ -1097,7 +1097,7 @@ } \ else { \ HR[d0 + 2] = AbsAppl(HR); \ - *HR = (CELL) pe->FunctorOfPred; \ + *H = (CELL) pe->FunctorOfPred; \ HR++; \ pt1 = XREGS + 1; \ for (; d0 > 0; --d0) { \ @@ -1109,14 +1109,14 @@ (pt0) = (CELL *)(d1); \ (d1) = *(CELL *)(d1); \ if(!IsVarTerm(d1)) { \ - *HR++ = d1; \ + *H++ = d1; \ setHwithd1 = 1; \ break; \ } \ } \ if (setHwithd1) { continue; } \ if (pt0 <= HR) { \ - *HR++ = (CELL)pt0; \ + *H++ = (CELL)pt0; \ } else { \ d1 = Unsigned(HR); \ RESET_VARIABLE(HR); \ @@ -1125,7 +1125,7 @@ } \ } \ else { \ - *HR++ = d1; \ + *H++ = d1; \ } \ } \ } \ @@ -1206,7 +1206,7 @@ HR[1] = MkAtomTerm((Atom)(pe->FunctorOfPred)); #define SPY_PRED_D0ISNOZERO_INIT \ - *HR = (CELL) pe->FunctorOfPred; \ + *H = (CELL) pe->FunctorOfPred; \ HR[d0 + 2] = AbsAppl(HR); \ HR++; \ pt1 = XREGS + 1; @@ -1216,10 +1216,10 @@ d1 = *pt0; #define SPY_PRED_D0ISNOZERO_INSIDEFOR_DOSPY_NONVAR \ - *HR++ = d1; + *H++ = d1; #define SPY_PRED_D0ISNOZERO_INSIDEFOR_SAFEVAR \ - *HR++ = (CELL)pt0; + *H++ = (CELL)pt0; #define SPY_PRED_D0ISNOZERO_INSIDEFOR_UNSAFEVAR \ d1 = Unsigned(HR); \ @@ -1228,7 +1228,7 @@ Bind_Local(pt0, d1); #define SPY_PRED_POST_IFS \ - HR[0] = Yap_Module_Name(pe); \ + H[0] = Yap_Module_Name(pe); \ ARG1 = (Term) AbsPair(HR); \ HR += 2; \ PredEntry *pt0; diff --git a/JIT/HPP/yaam_misc_d.h b/JIT/HPP/yaam_misc_d.h index 974fa6a7b..6dc543eaa 100644 --- a/JIT/HPP/yaam_misc_d.h +++ b/JIT/HPP/yaam_misc_d.h @@ -6,7 +6,7 @@ GONext(); \ } \ else { \ - PP = (*_PREG)->y_u.p.p; \ + PP = (*_PREG)->u.p.p; \ PELOCK(3, PP); \ (*_PREG) = NEXTOP((*_PREG), p); \ GONext(); \ @@ -39,7 +39,7 @@ #if MULTIPLE_STACKS #define ALLOC_FOR_LOGICAL_PRED_MULTIPLE_STACKS \ - LogUpdClause *cl = (*_PREG)->y_u.L.ClBase; + LogUpdClause *cl = (*_PREG)->u.L.ClBase; #if PARALLEL_YAP #define ALLOC_FOR_LOGICAL_PRED_MULTIPLE_STACKS_PARALLEL \ PredEntry *ap = cl->ClPred; @@ -51,7 +51,7 @@ PP = NULL; #else #define ALLOC_FOR_LOGICAL_PRED_NOMULTIPLE_STACKS_INIT \ - LogUpdClause *cl = (LogUpdClause *)(*_PREG)->y_u.L.ClBase; + LogUpdClause *cl = (LogUpdClause *)(*_PREG)->u.L.ClBase; #define ALLOC_FOR_LOGICAL_PRED_NOMULTIPLE_STACKS_IF \ if (!(cl->ClFlags & InUseMask)) { \ @@ -583,13 +583,13 @@ #define ENSURE_SPACE_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ { \ - Int sz = (*_PREG)->y_u.Osbpa.i; \ - UInt arity = (*_PREG)->y_u.Osbpa.p->ArityOfPE; \ + Int sz = (*_PREG)->u.Osbpa.i; \ + UInt arity = (*_PREG)->u.Osbpa.p->ArityOfPE; \ if (Unsigned(HR) + sz > Unsigned(YREG)-CreepFlag) { \ YENV[E_CP] = (CELL) (*_C(*_PREG)); \ YENV[E_E] = (CELL) ENV; \ YENV[E_DEPTH] = DEPTH; \ - SET_ASP(YREG, (*_PREG)->y_u.Osbpa.s); \ + SET_ASP(YREG, (*_PREG)->u.Osbpa.s); \ (*_PREG) = NEXTOP((*_PREG),Osbpa); \ saveregs(); \ setregs(); \ @@ -602,12 +602,12 @@ #define ENSURE_SPACE_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ { \ - Int sz = (*_PREG)->y_u.Osbpa.i; \ - UInt arity = (*_PREG)->y_u.Osbpa.p->ArityOfPE; \ + Int sz = (*_PREG)->u.Osbpa.i; \ + UInt arity = (*_PREG)->u.Osbpa.p->ArityOfPE; \ if (Unsigned(HR) + sz > Unsigned(YREG)-CreepFlag) { \ YENV[E_CP] = (CELL) (*_C(*_PREG)); \ YENV[E_E] = (CELL) ENV; \ - SET_ASP(YREG, (*_PREG)->y_u.Osbpa.s); \ + SET_ASP(YREG, (*_PREG)->u.Osbpa.s); \ (*_PREG) = NEXTOP((*_PREG),Osbpa); \ saveregs(); \ setregs(); \ @@ -622,7 +622,7 @@ #define JUMP_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - (*_PREG) = (*_PREG)->y_u.l.l; \ + (*_PREG) = (*_PREG)->u.l.l; \ JMPNext(); #define MOVE_BACK_INSTINIT \ @@ -646,7 +646,7 @@ #define EITHER_POST_COROUTINING \ register CELL d0; \ register choiceptr pt1; \ - d0 = (*_PREG)->y_u.Osblp.s; \ + d0 = (*_PREG)->u.Osblp.s; \ pt1 = (choiceptr) ((char *) YREG + (yslot) d0); #ifdef FROZEN_STACKS @@ -670,7 +670,7 @@ #define EITHER_POST_FROZEN_YSBA \ pt1 = (choiceptr)(((CELL *) pt1)-1); \ *(CELL **) pt1 = YREG; \ - store_yaam_regs_for_either((*_PREG)->y_u.Osblp.l, (*_PREG)); \ + store_yaam_regs_for_either((*_PREG)->u.Osblp.l, (*_PREG)); \ (*_SREG) = (CELL *) (B = pt1); #ifdef YAPOR @@ -685,7 +685,7 @@ #define OR_ELSE_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - HR = HBREG = PROTECT_FROZEN_H(B); \ + HR = HRBREG = PROTECT_FROZEN_H(B); \ ENV = B->cp_env; \ B->cp_cp = (*_PREG); @@ -699,11 +699,11 @@ #ifdef YAPOR #define OR_ELSE_YAPOR \ - SCH_new_alternative((*_PREG), (*_PREG)->y_u.Osblp.l); + SCH_new_alternative((*_PREG), (*_PREG)->u.Osblp.l); #endif #define OR_ELSE_END \ - B->cp_ap = (*_PREG)->y_u.Osblp.l; \ + B->cp_ap = (*_PREG)->u.Osblp.l; \ (*_PREG) = NEXTOP((*_PREG), Osblp); \ YREG = (CELL *) B->cp_a1; \ GONext(); @@ -715,7 +715,7 @@ #ifdef YAPOR #define OR_LAST_IFOK_INIT \ - HR = HBREG = PROTECT_FROZEN_H(pt0); \ + H = HRBREG = PROTECT_FROZEN_H(pt0); \ YREG = (CELL *) pt0->cp_a1; \ ENV = pt0->cp_env; @@ -730,7 +730,7 @@ #define OR_LAST_NOIF_INIT \ B = pt0->cp_b; \ - HR = PROTECT_FROZEN_H(pt0); \ + H = PROTECT_FROZEN_H(pt0); \ YREG = (CELL *) pt0->cp_a1; \ ENV = pt0->cp_env; @@ -889,7 +889,7 @@ #define EXPAND_CLAUSES_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - PredEntry *pe = (*_PREG)->y_u.sssllp.p; \ + PredEntry *pe = (*_PREG)->u.sssllp.p; \ yamop *pt0; \ SET_ASP(YREG, E_CB*sizeof(CELL)); @@ -944,7 +944,7 @@ } \ else { \ HR[d0 + 2] = AbsAppl(HR); \ - *HR = (CELL) pe->FunctorOfPred; \ + *H = (CELL) pe->FunctorOfPred; \ HR++; \ pt1 = XREGS + 1; \ for (; d0 > 0; --d0) { \ @@ -956,14 +956,14 @@ (pt0) = (CELL *)(d1); \ (d1) = *(CELL *)(d1); \ if(!IsVarTerm(d1)) { \ - *HR++ = d1; \ + *H++ = d1; \ setHwithd1 = 1; \ break; \ } \ } \ if (setHwithd1) { continue; } \ if (pt0 <= HR) { \ - *HR++ = (CELL)pt0; \ + *H++ = (CELL)pt0; \ } else { \ d1 = Unsigned(HR); \ RESET_VARIABLE(HR); \ @@ -972,7 +972,7 @@ } \ } \ else { \ - *HR++ = d1; \ + *H++ = d1; \ } \ } \ } \ @@ -1008,7 +1008,7 @@ } \ else { \ HR[d0 + 2] = AbsAppl(HR); \ - *HR = (CELL) pe->FunctorOfPred; \ + *H = (CELL) pe->FunctorOfPred; \ HR++; \ pt1 = XREGS + 1; \ for (; d0 > 0; --d0) { \ @@ -1020,14 +1020,14 @@ (pt0) = (CELL *)(d1); \ (d1) = *(CELL *)(d1); \ if(!IsVarTerm(d1)) { \ - *HR++ = d1; \ + *H++ = d1; \ setHwithd1 = 1; \ break; \ } \ } \ if (setHwithd1) { continue; } \ if (pt0 <= HR) { \ - *HR++ = (CELL)pt0; \ + *H++ = (CELL)pt0; \ } else { \ d1 = Unsigned(HR); \ RESET_VARIABLE(HR); \ @@ -1036,7 +1036,7 @@ } \ } \ else { \ - *HR++ = d1; \ + *H++ = d1; \ } \ } \ } \ @@ -1071,7 +1071,7 @@ } \ else { \ HR[d0 + 2] = AbsAppl(HR); \ - *HR = (CELL) pe->FunctorOfPred; \ + *H = (CELL) pe->FunctorOfPred; \ HR++; \ pt1 = XREGS + 1; \ for (; d0 > 0; --d0) { \ @@ -1083,14 +1083,14 @@ (pt0) = (CELL *)(d1); \ (d1) = *(CELL *)(d1); \ if(!IsVarTerm(d1)) { \ - *HR++ = d1; \ + *H++ = d1; \ setHwithd1 = 1; \ break; \ } \ } \ if (setHwithd1) { continue; } \ if (pt0 <= HR) { \ - *HR++ = (CELL)pt0; \ + *H++ = (CELL)pt0; \ } else { \ d1 = Unsigned(HR); \ RESET_VARIABLE(HR); \ @@ -1099,7 +1099,7 @@ } \ } \ else { \ - *HR++ = d1; \ + *H++ = d1; \ } \ } \ } \ @@ -1135,7 +1135,7 @@ } \ else { \ HR[d0 + 2] = AbsAppl(HR); \ - *HR = (CELL) pe->FunctorOfPred; \ + *H = (CELL) pe->FunctorOfPred; \ HR++; \ pt1 = XREGS + 1; \ for (; d0 > 0; --d0) { \ @@ -1147,14 +1147,14 @@ (pt0) = (CELL *)(d1); \ (d1) = *(CELL *)(d1); \ if(!IsVarTerm(d1)) { \ - *HR++ = d1; \ + *H++ = d1; \ setHwithd1 = 1; \ break; \ } \ } \ if (setHwithd1) { continue; } \ if (pt0 <= HR) { \ - *HR++ = (CELL)pt0; \ + *H++ = (CELL)pt0; \ } else { \ d1 = Unsigned(HR); \ RESET_VARIABLE(HR); \ @@ -1163,7 +1163,7 @@ } \ } \ else { \ - *HR++ = d1; \ + *H++ = d1; \ } \ } \ } \ @@ -1245,7 +1245,7 @@ HR[1] = MkAtomTerm((Atom)(pe->FunctorOfPred)); #define SPY_PRED_D0ISNOZERO_INIT \ - *HR = (CELL) pe->FunctorOfPred; \ + *H = (CELL) pe->FunctorOfPred; \ HR[d0 + 2] = AbsAppl(HR); \ HR++; \ pt1 = XREGS + 1; @@ -1255,10 +1255,10 @@ d1 = *pt0; #define SPY_PRED_D0ISNOZERO_INSIDEFOR_DOSPY_NONVAR \ - *HR++ = d1; + *H++ = d1; #define SPY_PRED_D0ISNOZERO_INSIDEFOR_SAFEVAR \ - *HR++ = (CELL)pt0; + *H++ = (CELL)pt0; #define SPY_PRED_D0ISNOZERO_INSIDEFOR_UNSAFEVAR \ d1 = Unsigned(HR); \ @@ -1267,7 +1267,7 @@ Bind_Local(pt0, d1); #define SPY_PRED_POST_IFS \ - HR[0] = Yap_Module_Name(pe); \ + H[0] = Yap_Module_Name(pe); \ ARG1 = (Term) AbsPair(HR); \ HR += 2; \ PredEntry *pt0; diff --git a/JIT/HPP/yaam_pop.h b/JIT/HPP/yaam_pop.h index 59bb53ce5..6a6669f43 100644 --- a/JIT/HPP/yaam_pop.h +++ b/JIT/HPP/yaam_pop.h @@ -1,7 +1,7 @@ #define POP_N_INSTINIT \ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ - d0 = (*_PREG)->y_u.os.s; \ + d0 = (*_PREG)->u.os.s; \ SP = (CELL *) (((char *) SP) + d0); \ d0 = SP[0]; \ if (d0) { \ diff --git a/JIT/HPP/yaam_pop_d.h b/JIT/HPP/yaam_pop_d.h index 14b2aea14..b4fe7c0f0 100644 --- a/JIT/HPP/yaam_pop_d.h +++ b/JIT/HPP/yaam_pop_d.h @@ -2,7 +2,7 @@ print_instruction((*_PREG), ON_NATIVE); \ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ - d0 = (*_PREG)->y_u.os.s; \ + d0 = (*_PREG)->u.os.s; \ SP = (CELL *) (((char *) SP) + d0); \ d0 = SP[0]; \ if (d0) { \ diff --git a/JIT/HPP/yaam_primitive_predicates.h b/JIT/HPP/yaam_primitive_predicates.h index 06a6dbe90..0a8edd300 100644 --- a/JIT/HPP/yaam_primitive_predicates.h +++ b/JIT/HPP/yaam_primitive_predicates.h @@ -1,20 +1,20 @@ #define P_ATOM_X_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xl.x); + d0 = XREG((*_PREG)->u.xl.x); #define P_ATOM_X_ATOM \ (*_PREG) = NEXTOP((*_PREG), xl); \ GONext(); \ #define P_ATOM_X_NOATOM \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_ATOM_Y_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - pt0 = YREG + (*_PREG)->y_u.yl.y; \ + pt0 = YREG + (*_PREG)->u.yl.y; \ d0 = *pt0; #define P_ATOM_Y_IFOK \ @@ -22,34 +22,34 @@ GONext(); #define P_ATOM_Y_NOIF \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_ATOM_Y_END \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_ATOMIC_X_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xl.x); + d0 = XREG((*_PREG)->u.xl.x); #define P_ATOMIC_X_NONVAR \ (*_PREG) = NEXTOP((*_PREG), xl); \ GONext(); #define P_ATOMIC_X_VAR \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_ATOMIC_X_END \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_ATOMIC_Y_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - pt0 = YREG + (*_PREG)->y_u.yl.y; \ + pt0 = YREG + (*_PREG)->u.yl.y; \ d0 = *pt0; #define P_ATOMIC_Y_NONVAR \ @@ -57,35 +57,35 @@ GONext(); #define P_ATOMIC_Y_VAR \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_ATOMIC_Y_END \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_INTEGER_X_INSTINIT \ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xl.x); \ + d0 = XREG((*_PREG)->u.xl.x); \ #define P_INTEGER_X_INTEGER_X_NVAR_OK \ (*_PREG) = NEXTOP((*_PREG), xl); \ GONext(); #define P_INTEGER_X_INTEGER_X_NVAR_NOOK \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_INTEGER_X_INTEGER_X_UNK \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_INTEGER_Y_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - pt0 = YREG + (*_PREG)->y_u.yl.y; \ + pt0 = YREG + (*_PREG)->u.yl.y; \ d0 = *pt0; #define P_INTEGER_Y_INTEGER_Y_NVAR_OK \ @@ -93,30 +93,30 @@ GONext(); #define P_INTEGER_Y_INTEGER_Y_NVAR_NOOK \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_INTEGER_Y_INTEGER_Y_UNK \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_NONVAR_X_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xl.x); + d0 = XREG((*_PREG)->u.xl.x); #define P_NONVAR_X_NONVAR \ (*_PREG) = NEXTOP((*_PREG), xl); \ GONext(); #define P_NONVAR_X_NONONVAR \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_NONVAR_Y_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - pt0 = YREG + (*_PREG)->y_u.yl.y; \ + pt0 = YREG + (*_PREG)->u.yl.y; \ d0 = *pt0; #define P_NONVAR_Y_NONVAR \ @@ -124,13 +124,13 @@ GONext(); #define P_NONVAR_Y_NONONVAR \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_NUMBER_X_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xl.x); + d0 = XREG((*_PREG)->u.xl.x); #define P_NUMBER_X_INT \ (*_PREG) = NEXTOP((*_PREG), xl); \ @@ -141,21 +141,21 @@ GONext(); #define P_NUMBER_X_FUNCTORDEFAULT \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_NUMBER_X_POST_IF \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_NUMBER_X_NUMBER_X_UNK \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_NUMBER_Y_INSTINIT \ register CELL d0; \ register CELL *pt0; \ - pt0 = YREG + (*_PREG)->y_u.yl.y; \ + pt0 = YREG + (*_PREG)->u.yl.y; \ d0 = *pt0; #define P_NUMBER_Y_INT \ @@ -167,24 +167,24 @@ GONext(); #define P_NUMBER_Y_FUNCTORDEFAULT \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_NUMBER_Y_POST_IF \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_NUMBER_Y_NUMBER_Y_UNK \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_VAR_X_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xl.x); + d0 = XREG((*_PREG)->u.xl.x); #define P_VAR_X_NONVAR \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_VAR_X_VAR \ @@ -194,11 +194,11 @@ #define P_VAR_Y_INSTINIT \ register CELL d0; \ register CELL *pt0; \ - pt0 = YREG + (*_PREG)->y_u.yl.y; \ + pt0 = YREG + (*_PREG)->u.yl.y; \ d0 = *pt0; #define P_VAR_Y_NONVAR \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_VAR_Y_VAR \ @@ -208,24 +208,24 @@ #define P_DB_REF_X_INSTINIT \ register CELL d0; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xl.x); + d0 = XREG((*_PREG)->u.xl.x); #define P_DB_REF_X_DBREF \ (*_PREG) = NEXTOP((*_PREG), xl); \ GONext(); #define P_DB_REF_X_NODBREF \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_DB_REF_X_DBREF_X_UNK \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_DB_REF_Y_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - pt0 = YREG + (*_PREG)->y_u.yl.y; \ + pt0 = YREG + (*_PREG)->u.yl.y; \ d0 = *pt0; #define P_DB_REF_Y_DBREF \ @@ -233,34 +233,34 @@ GONext(); #define P_DB_REF_Y_NODBREF \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_DB_REF_Y_DBREF_Y_UNK \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_PRIMITIVE_X_INSTINIT \ register CELL d0; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xl.x); + d0 = XREG((*_PREG)->u.xl.x); #define P_PRIMITIVE_X_PRIMITIVE \ (*_PREG) = NEXTOP((*_PREG), xl); \ GONext(); #define P_PRIMITIVE_X_NOPRIMITIVE \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_PRIMITIVE_X_PRIMI_X_UNK \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_PRIMITIVE_Y_INSTINIT \ register CELL d0; \ register CELL *pt0; \ - pt0 = YREG + (*_PREG)->y_u.yl.y; \ + pt0 = YREG + (*_PREG)->u.yl.y; \ d0 = *pt0; #define P_PRIMITIVE_Y_PRIMITIVE \ @@ -268,24 +268,24 @@ GONext(); #define P_PRIMITIVE_Y_NOPRIMITIVE \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_PRIMITIVE_Y_PRIMI_Y_UNK \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_COMPOUND_X_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xl.x); + d0 = XREG((*_PREG)->u.xl.x); #define P_COMPOUND_X_PAIR \ (*_PREG) = NEXTOP((*_PREG), xl); \ GONext(); #define P_COMPOUND_X_APPL_IFOK \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_COMPOUND_X_APPL \ @@ -293,17 +293,17 @@ GONext(); #define P_COMPOUND_X_NOAPPL \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_COMPOUND_X_COMPOUND_X_UNK \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_COMPOUND_Y_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - pt0 = YREG + (*_PREG)->y_u.yl.y; \ + pt0 = YREG + (*_PREG)->u.yl.y; \ d0 = *pt0; #define P_COMPOUND_Y_PAIR \ @@ -311,7 +311,7 @@ GONext(); #define P_COMPOUND_Y_APPL_IFOK \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_COMPOUND_Y_APPL \ @@ -319,34 +319,34 @@ GONext(); #define P_COMPOUND_Y_NOAPPL \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_COMPOUND_Y_COMPOUND_Y_UNK \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_FLOAT_X_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xl.x); + d0 = XREG((*_PREG)->u.xl.x); #define P_FLOAT_X_FLOAT \ (*_PREG) = NEXTOP((*_PREG), xl); \ GONext(); #define P_FLOAT_X_POST_IF \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_FLOAT_X_FLOAT_X_UNK \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_FLOAT_Y_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - pt0 = YREG + (*_PREG)->y_u.yl.y; \ + pt0 = YREG + (*_PREG)->u.yl.y; \ d0 = *pt0; #define P_FLOAT_Y_FLOAT \ @@ -354,26 +354,26 @@ GONext(); #define P_FLOAT_Y_POST_IF \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_FLOAT_Y_FLOAT_Y_UNK \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_PLUS_VV_INSTINIT \ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxx.x1); + d0 = XREG((*_PREG)->u.xxx.x1); #define P_PLUS_VV_PLUS_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_PLUS_VV_PLUS_VV_NVAR_NVAR_INT \ if (!IsIntTerm(d0) || !IsIntTerm(d1)) { BACK(); } \ d0 = MkIntegerTerm(IntOfTerm(d0) + IntOfTerm(d1)); \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -381,7 +381,7 @@ saveregs(); \ d0 = p_plus(Yap_Eval(d0), Yap_Eval(d1)); \ setregs(); \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -401,12 +401,12 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); \ - Int d1 = (*_PREG)->y_u.xxn.c; + d0 = XREG((*_PREG)->u.xxn.xi); \ + Int d1 = (*_PREG)->u.xxn.c; #define P_PLUS_VC_PLUS_VC_NVAR_INT \ d0 = MkIntegerTerm(IntOfTerm(d0) + d1); \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); @@ -414,13 +414,13 @@ saveregs(); \ d0 = p_plus(Yap_Eval(d0), MkIntegerTerm(d1)); \ setregs(); \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); #define P_PLUS_VC_PLUS_VC_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is A + " Int_FORMAT, (*_PREG)->y_u.xxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is A + " Int_FORMAT, (*_PREG)->u.xxn.c); \ setregs(); \ FAIL(); @@ -428,15 +428,15 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxx.x1); + d0 = XREG((*_PREG)->u.yxx.x1); #define P_PLUS_Y_VV_PLUS_Y_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_PLUS_Y_VV_PLUS_Y_VV_NVAR_NVAR_INT \ if (!IsIntTerm(d0) || !IsIntTerm(d1)) { BACK(); } \ d0 = MkIntegerTerm(IntOfTerm(d0) + IntOfTerm(d1)); \ - pt0 = YREG + (*_PREG)->y_u.yxx.y; \ + pt0 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -445,7 +445,7 @@ saveregs(); \ d0 = p_plus(Yap_Eval(d0), Yap_Eval(d1)); \ setregs(); \ - pt0 = YREG + (*_PREG)->y_u.yxx.y; \ + pt0 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -466,12 +466,12 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); \ - Int d1 = (*_PREG)->y_u.yxn.c; + d0 = XREG((*_PREG)->u.yxn.xi); \ + Int d1 = (*_PREG)->u.yxn.c; #define P_PLUS_Y_VC_PLUS_Y_VC_NVAR_INT \ d0 = MkIntegerTerm(IntOfTerm(d0) + d1); \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -480,14 +480,14 @@ saveregs(); \ d0 = p_plus(Yap_Eval(d0), MkIntegerTerm(d1)); \ setregs(); \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); #define P_PLUS_Y_VC_PLUS_Y_VC_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is A + " Int_FORMAT, (*_PREG)->y_u.yxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is A + " Int_FORMAT, (*_PREG)->u.yxn.c); \ setregs(); \ FAIL(); @@ -495,15 +495,15 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxx.x1); + d0 = XREG((*_PREG)->u.xxx.x1); #define P_MINUS_VV_MINUS_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_MINUS_VV_MINUS_VV_NVAR_NVAR_INT \ if (!IsIntTerm(d0) || !IsIntTerm(d1)) { BACK(); } \ d0 = MkIntegerTerm(IntOfTerm(d0) - IntOfTerm(d1)); \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -511,7 +511,7 @@ saveregs(); \ d0 = p_minus(Yap_Eval(d0), Yap_Eval(d1)); \ setregs(); \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -530,12 +530,12 @@ #define P_MINUS_CV_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); \ - Int d1 = (*_PREG)->y_u.xxn.c; + d0 = XREG((*_PREG)->u.xxn.xi); \ + Int d1 = (*_PREG)->u.xxn.c; #define P_MINUS_CV_MINUS_CV_NVAR_INT \ d0 = MkIntegerTerm(d1 - IntOfTerm(d0)); \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); @@ -543,23 +543,23 @@ saveregs(); \ d0 = p_minus(MkIntegerTerm(d1),Yap_Eval(d0)); \ setregs(); \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); #define P_MINUS_CV_MINUS_CV_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "-A", (*_PREG)->y_u.xxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "-A", (*_PREG)->u.xxn.c); \ setregs(); \ FAIL(); #define P_MINUS_Y_VV_INSTINIT \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxx.x1); + d0 = XREG((*_PREG)->u.yxx.x1); #define P_MINUS_Y_VV_MINUS_Y_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_MINUS_Y_VV_INTTERM \ d0 = MkIntegerTerm(IntOfTerm(d0) - IntOfTerm(d1)); @@ -576,7 +576,7 @@ FAIL(); #define P_MINUS_Y_VV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxx.y; \ + pt0 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -596,10 +596,10 @@ #define P_MINUS_Y_CV_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); + d0 = XREG((*_PREG)->u.yxn.xi); #define P_MINUS_Y_CV_MINUS_Y_CV_NVAR \ - Int d1 = (*_PREG)->y_u.yxn.c; + Int d1 = (*_PREG)->u.yxn.c; #define P_MINUS_Y_CV_INTTERM \ d0 = MkIntegerTerm(d1 - IntOfTerm(d0)); @@ -616,14 +616,14 @@ FAIL(); #define P_MINUS_Y_CV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); #define P_MINUS_Y_CV_MINUS_Y_CV_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "-A", (*_PREG)->y_u.yxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "-A", (*_PREG)->u.yxn.c); \ setregs(); \ FAIL(); @@ -631,15 +631,15 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xxx.x1); + d0 = XREG((*_PREG)->u.xxx.x1); #define P_TIMES_VV_TIMES_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_TIMES_VV_TIMES_VV_NVAR_NVAR_INT \ if (!IsIntTerm(d0) || !IsIntTerm(d1)) { BACK(); } \ d0 = times_int(IntOfTerm(d0), IntOfTerm(d1)); \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -647,7 +647,7 @@ saveregs(); \ d0 = p_times(Yap_Eval(d0), Yap_Eval(d1)); \ setregs(); \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -667,12 +667,12 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); \ - Int d1 = (*_PREG)->y_u.xxn.c; + d0 = XREG((*_PREG)->u.xxn.xi); \ + Int d1 = (*_PREG)->u.xxn.c; #define P_TIMES_VC_TIMES_VC_NVAR_INT \ d0 = times_int(IntOfTerm(d0), d1); \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); @@ -680,23 +680,23 @@ saveregs(); \ d0 = p_times(Yap_Eval(d0), MkIntegerTerm(d1)); \ setregs(); \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); #define P_TIMES_VC_TIMES_VC_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is A* " Int_FORMAT, (*_PREG)->y_u.xxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is A* " Int_FORMAT, (*_PREG)->u.xxn.c); \ setregs(); \ FAIL(); #define P_TIMES_Y_VV_INSTINIT \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxx.x1); + d0 = XREG((*_PREG)->u.yxx.x1); #define P_TIMES_Y_VV_TIMES_Y_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_TIMES_Y_VV_INTTERM \ d0 = times_int(IntOfTerm(d0), IntOfTerm(d1)); @@ -713,7 +713,7 @@ FAIL(); #define P_TIMES_Y_VV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxx.y; \ + pt0 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -734,12 +734,12 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); \ - Int d1 = (*_PREG)->y_u.yxn.c; + d0 = XREG((*_PREG)->u.yxn.xi); \ + Int d1 = (*_PREG)->u.yxn.c; #define P_TIMES_Y_VC_TIMES_Y_VC_NVAR_INT \ d0 = times_int(IntOfTerm(d0), d1); \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -748,20 +748,20 @@ saveregs(); \ d0 = p_times(Yap_Eval(d0), MkIntegerTerm(d1)); \ setregs(); \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); #define P_TIMES_Y_VC_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); #define P_TIMES_Y_VC_TIMES_Y_VC_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is A* " Int_FORMAT, (*_PREG)->y_u.yxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is A* " Int_FORMAT, (*_PREG)->u.yxn.c); \ setregs(); \ FAIL(); @@ -769,10 +769,10 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxx.x1); + d0 = XREG((*_PREG)->u.xxx.x1); #define P_DIV_VV_DIV_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_DIV_VV_DIV_VV_NVAR_NVAR_INT \ BLOCK = (CELL)P_DIV_VV_DIV_VV_NVAR_NVAR_INT; \ @@ -787,7 +787,7 @@ } \ else { \ d0 = MkIntTerm(IntOfTerm(d0) / div); \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); \ } @@ -796,7 +796,7 @@ saveregs(); \ d0 = p_div(Yap_Eval(d0), Yap_Eval(d1)); \ setregs(); \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -815,10 +815,10 @@ #define P_DIV_VC_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); + d0 = XREG((*_PREG)->u.xxn.xi); #define P_DIV_VC_DIV_VC_NVAR \ - Int d1 = (*_PREG)->y_u.xxn.c; + Int d1 = (*_PREG)->u.xxn.c; #define P_DIV_VC_INTTERM \ d0 = MkIntTerm(IntOfTerm(d0) / d1); @@ -835,7 +835,7 @@ FAIL(); #define P_DIV_VC_NVAR_END \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); @@ -848,10 +848,10 @@ #define P_DIV_CV_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); + d0 = XREG((*_PREG)->u.xxn.xi); #define P_DIV_CV_DIV_CV_NVAR \ - Int d1 = (*_PREG)->y_u.xxn.c; + Int d1 = (*_PREG)->u.xxn.c; #define P_DIV_CV_INTTERM_INIT \ Int div = IntOfTerm(d0); @@ -876,23 +876,23 @@ FAIL(); #define P_DIV_CV_NVAR_END \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); #define P_DIV_CV_DIV_CV_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "// A", (*_PREG)->y_u.xxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "// A", (*_PREG)->u.xxn.c); \ setregs(); \ FAIL(); #define P_DIV_Y_VV_INSTINIT \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxx.x1); + d0 = XREG((*_PREG)->u.yxx.x1); #define P_DIV_Y_VV_DIV_Y_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_DIV_Y_VV_INTTERM_INIT \ Int div = IntOfTerm(d1); @@ -918,7 +918,7 @@ FAIL(); #define P_DIV_Y_VV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxx.y; \ + pt0 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -938,10 +938,10 @@ #define P_DIV_Y_VC_INSTINIT \ register CELL d0; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); + d0 = XREG((*_PREG)->u.yxn.xi); #define P_DIV_Y_VC_DIV_Y_VC_NVAR \ - Int d1 = (*_PREG)->y_u.yxn.c; + Int d1 = (*_PREG)->u.yxn.c; #define P_DIV_Y_VC_INTTERM \ d0 = MkIntTerm(IntOfTerm(d0)/d1); @@ -958,7 +958,7 @@ FAIL(); #define P_DIV_Y_VC_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -972,10 +972,10 @@ #define P_DIV_Y_CV_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); + d0 = XREG((*_PREG)->u.yxn.xi); #define P_DIV_Y_CV_DIV_Y_CV_NVAR \ - Int d1 = (*_PREG)->y_u.yxn.c; + Int d1 = (*_PREG)->u.yxn.c; #define P_DIV_Y_CV_INTTERM_INIT \ Int div = IntOfTerm(d0); @@ -1001,14 +1001,14 @@ FAIL(); #define P_DIV_Y_CV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); #define P_DIV_Y_CV_DIV_Y_CV_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "// A", (*_PREG)->y_u.yxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "// A", (*_PREG)->u.yxn.c); \ setregs(); \ FAIL(); @@ -1016,15 +1016,15 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxx.x1); + d0 = XREG((*_PREG)->u.xxx.x1); #define P_AND_VV_AND_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_AND_VV_AND_VV_NVAR_NVAR_INT \ if (!IsIntTerm(d0) || !IsIntTerm(d1)) { BACK(); } \ d0 = MkIntegerTerm(IntOfTerm(d0) & IntOfTerm(d1)); \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -1032,7 +1032,7 @@ saveregs(); \ d0 = p_and(Yap_Eval(d0), Yap_Eval(d1)); \ setregs(); \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -1052,12 +1052,12 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); \ - Int d1 = (*_PREG)->y_u.xxn.c; + d0 = XREG((*_PREG)->u.xxn.xi); \ + Int d1 = (*_PREG)->u.xxn.c; #define P_AND_VC_AND_VC_NVAR_INT \ d0 = MkIntegerTerm(IntOfTerm(d0) & d1); \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); @@ -1065,23 +1065,23 @@ saveregs(); \ d0 = p_and(Yap_Eval(d0), MkIntegerTerm(d1)); \ setregs(); \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); #define P_AND_VC_AND_VC_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is A /\\ " Int_FORMAT , (*_PREG)->y_u.xxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is A /\\ " Int_FORMAT , (*_PREG)->u.xxn.c); \ setregs(); \ FAIL(); #define P_AND_Y_VV_INSTINIT \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxx.x1); + d0 = XREG((*_PREG)->u.yxx.x1); #define P_AND_Y_VV_AND_Y_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_AND_Y_VV_INTTERM \ d0 = MkIntegerTerm(IntOfTerm(d0) & IntOfTerm(d1)); @@ -1098,7 +1098,7 @@ FAIL(); #define P_AND_Y_VV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxx.y; \ + pt0 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -1118,10 +1118,10 @@ #define P_AND_Y_VC_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); + d0 = XREG((*_PREG)->u.yxn.xi); #define P_AND_Y_VC_AND_Y_VC_NVAR \ - Int d1 = (*_PREG)->y_u.yxn.c; + Int d1 = (*_PREG)->u.yxn.c; #define P_AND_Y_VC_INTTERM \ d0 = MkIntegerTerm(IntOfTerm(d0) & d1); @@ -1138,24 +1138,24 @@ FAIL(); #define P_AND_Y_VC_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); #define P_AND_Y_VC_AND_Y_VC_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is A /\\ " Int_FORMAT , (*_PREG)->y_u.yxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is A /\\ " Int_FORMAT , (*_PREG)->u.yxn.c); \ setregs(); \ FAIL(); #define P_OR_VV_INSTINIT \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxx.x1); + d0 = XREG((*_PREG)->u.xxx.x1); #define P_OR_VV_OR_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_OR_VV_INTTERM \ d0 = MkIntegerTerm(IntOfTerm(d0) | IntOfTerm(d1)); @@ -1172,7 +1172,7 @@ FAIL(); #define P_OR_VV_NVAR_END \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -1191,10 +1191,10 @@ #define P_OR_VC_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); + d0 = XREG((*_PREG)->u.xxn.xi); #define P_OR_VC_OR_VC_NVAR \ - Int d1 = (*_PREG)->y_u.xxn.c; + Int d1 = (*_PREG)->u.xxn.c; #define P_OR_VC_INTTERM \ d0 = MkIntegerTerm(IntOfTerm(d0) | d1); @@ -1210,23 +1210,23 @@ FAIL(); #define P_OR_VC_NVAR_END \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); #define P_OR_VC_OR_VC_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is A \\/ " Int_FORMAT , (*_PREG)->y_u.xxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is A \\/ " Int_FORMAT , (*_PREG)->u.xxn.c); \ setregs(); \ FAIL(); #define P_OR_Y_VV_INSTINIT \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxx.x1); + d0 = XREG((*_PREG)->u.yxx.x1); #define P_OR_Y_VV_OR_Y_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_OR_Y_VV_INTTERM \ d0 = MkIntegerTerm(IntOfTerm(d0) | IntOfTerm(d1)); @@ -1243,7 +1243,7 @@ FAIL(); #define P_OR_Y_VV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxx.y; \ + pt0 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -1263,10 +1263,10 @@ #define P_OR_Y_VC_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); + d0 = XREG((*_PREG)->u.yxn.xi); #define P_OR_Y_VC_OR_Y_VC_NVAR \ - Int d1 = (*_PREG)->y_u.yxn.c; + Int d1 = (*_PREG)->u.yxn.c; #define P_OR_Y_VC_INTTERM \ d0 = MkIntegerTerm(IntOfTerm(d0) | d1); @@ -1283,24 +1283,24 @@ FAIL(); #define P_OR_Y_VC_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); #define P_OR_Y_VC_OR_Y_VC_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is A \\/ " Int_FORMAT , (*_PREG)->y_u.yxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is A \\/ " Int_FORMAT , (*_PREG)->u.yxn.c); \ setregs(); \ FAIL(); #define P_SLL_VV_INSTINIT \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxx.x1); + d0 = XREG((*_PREG)->u.xxx.x1); #define P_SLL_VV_SLL_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_SLL_VV_INTTERM_INIT \ Int i2 = IntOfTerm(d1); @@ -1323,7 +1323,7 @@ FAIL(); #define P_SLL_VV_NVAR_END \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -1342,10 +1342,10 @@ #define P_SLL_VC_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); + d0 = XREG((*_PREG)->u.xxn.xi); #define P_SLL_VC_SLL_VC_NVAR \ - Int d1 = (*_PREG)->y_u.xxn.c; + Int d1 = (*_PREG)->u.xxn.c; #define P_SLL_VC_INTTERM \ d0 = do_sll(IntOfTerm(d0), (Int)d1); @@ -1362,7 +1362,7 @@ FAIL(); #define P_SLL_VC_NVAR_END \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); @@ -1376,8 +1376,8 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); \ - Int d1 = (*_PREG)->y_u.xxn.c; + d0 = XREG((*_PREG)->u.xxn.xi); \ + Int d1 = (*_PREG)->u.xxn.c; #define P_SLL_CV_SLL_CV_NVAR_INT \ Int i2 = IntOfTerm(d0); \ @@ -1386,7 +1386,7 @@ } else { \ d0 = do_sll(d1,i2); \ } \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); @@ -1394,7 +1394,7 @@ saveregs(); \ d0 = p_sll(MkIntegerTerm(d1), Yap_Eval(d0)); \ setregs(); \ - XREG((*_PREG->y_u.xxn.x) = d0; \ + XREG((*_PREG->u.xxn.x) = d0; \ (*_PREG = NEXTOP((*_PREG, xxn); \ GONext(); @@ -1407,10 +1407,10 @@ #define P_SLL_Y_VV_INSTINIT \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxx.x1); + d0 = XREG((*_PREG)->u.yxx.x1); #define P_SLL_Y_VV_SLL_Y_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_SLL_Y_VV_INTTERM_INIT \ Int i2 = IntOfTerm(d1); @@ -1433,7 +1433,7 @@ FAIL(); #define P_SLL_Y_VV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxx.y; \ + pt0 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -1453,10 +1453,10 @@ #define P_SLL_Y_VC_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); + d0 = XREG((*_PREG)->u.yxn.xi); #define P_SLL_Y_VC_SLL_Y_VC_NVAR \ - Int d1 = (*_PREG)->y_u.yxn.c; + Int d1 = (*_PREG)->u.yxn.c; #define P_SLL_Y_VC_INTTERM \ d0 = do_sll(IntOfTerm(d0), Yap_Eval(d1)); @@ -1473,7 +1473,7 @@ FAIL(); #define P_SLL_Y_VC_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -1487,10 +1487,10 @@ #define P_SLL_Y_CV_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); + d0 = XREG((*_PREG)->u.yxn.xi); #define P_SLL_Y_CV_SLL_Y_CV_NVAR \ - Int d1 = (*_PREG)->y_u.yxn.c; + Int d1 = (*_PREG)->u.yxn.c; #define P_SLL_Y_CV_INTTERM_INIT \ Int i2 = IntOfTerm(d0); @@ -1513,7 +1513,7 @@ FAIL(); #define P_SLL_Y_CV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -1527,10 +1527,10 @@ #define P_SLR_VV_INSTINIT \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxx.x1); + d0 = XREG((*_PREG)->u.xxx.x1); #define P_SLR_VV_SLR_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_SLR_VV_INTTERM_INIT \ Int i2 = IntOfTerm(d1); @@ -1553,7 +1553,7 @@ FAIL(); #define P_SLR_VV_NVAR_END \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -1573,12 +1573,12 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); \ - Int d1 = (*_PREG)->y_u.xxn.c; + d0 = XREG((*_PREG)->u.xxn.xi); \ + Int d1 = (*_PREG)->u.xxn.c; #define P_SLR_VC_SLR_VC_NVAR_INT \ d0 = MkIntTerm(SLR(IntOfTerm(d0), d1)); \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); @@ -1586,7 +1586,7 @@ saveregs(); \ d0 = p_slr(Yap_Eval(d0), MkIntegerTerm(d1)); \ setregs(); \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); @@ -1599,10 +1599,10 @@ #define P_SLR_CV_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); + d0 = XREG((*_PREG)->u.xxn.xi); #define P_SLR_CV_SLR_CV_NVAR \ - Int d1 = (*_PREG)->y_u.xxn.c; + Int d1 = (*_PREG)->u.xxn.c; #define P_SLR_CV_INTTERM_INIT \ Int i2 = IntOfTerm(d0); @@ -1625,7 +1625,7 @@ FAIL(); #define P_SLR_CV_NVAR_END \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); @@ -1638,10 +1638,10 @@ #define P_SLR_Y_VV_INSTINIT \ register CELL d0, d1; \ register CELL8 pt0; \ - d0 = XREG((*_PREG)->y_u.yxx.x1); + d0 = XREG((*_PREG)->u.yxx.x1); #define P_SLR_Y_VV_SLR_Y_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_SLR_Y_VV_INTTERM_INIT \ Int i2 = IntOfTerm(d1); @@ -1664,7 +1664,7 @@ FAIL(); #define P_SLR_Y_VV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxx.y; \ + pt0 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -1684,10 +1684,10 @@ #define P_SLR_Y_VC_INSTINIT \ register CELL d0; \ register CELL8 pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); + d0 = XREG((*_PREG)->u.yxn.xi); #define P_SLR_Y_VC_SLR_Y_VC_NVAR \ - Int d1 = (*_PREG)->y_u.yxn.c; + Int d1 = (*_PREG)->u.yxn.c; #define P_SLR_Y_VC_INTTERM \ d0 = MkIntTerm(SLR(IntOfTerm(d0), d1)); @@ -1704,7 +1704,7 @@ FAIL(); #define P_SLR_Y_VC_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -1717,10 +1717,10 @@ #define P_SLR_Y_CV_INSTINIT \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); + d0 = XREG((*_PREG)->u.yxn.xi); #define P_SLR_Y_CV_SLR_Y_CV_NVAR \ - Int d1 = (*_PREG)->y_u.yxn.c; + Int d1 = (*_PREG)->u.yxn.c; #define P_SLR_Y_CV_INTTERM_INIT \ Int i2 = IntOfTerm(d0); @@ -1743,7 +1743,7 @@ FAIL(); #define P_SLR_Y_CV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -1758,17 +1758,17 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.plxxs.x1); + d0 = XREG((*_PREG)->u.plxxs.x1); #define CALL_BFUNC_XX_CALL_BFUNC_XX_NVAR \ - d1 = XREG((*_PREG)->y_u.plxxs.x2); + d1 = XREG((*_PREG)->u.plxxs.x2); #define CALL_BFUNC_XX_CALL_BFUNC_XX2_NVAR_INT \ BLOCK = (CELL)CALL_BFUNC_XX_CALL_BFUNC_XX2_NVAR_INT; \ if (IsIntTerm(d0) && IsIntTerm(d1)) { \ COUNT flags; \ Int v = IntOfTerm(d0) - IntOfTerm(d1); \ - flags = (*_PREG)->y_u.plxxs.flags; \ + flags = (*_PREG)->u.plxxs.flags; \ if (v > 0) { \ if (flags & GT_OK_IN_CMP) { \ yamop *nextp = NEXTOP((*_PREG), plxxs); \ @@ -1776,7 +1776,7 @@ ALWAYS_GONext(); \ } \ else { \ - yamop *nextp = (*_PREG)->y_u.plxxs.f; \ + yamop *nextp = (*_PREG)->u.plxxs.f; \ (*_PREG) = nextp; \ ALWAYS_GONext(); \ } \ @@ -1788,7 +1788,7 @@ ALWAYS_GONext(); \ } \ else { \ - yamop *nextp = (*_PREG)->y_u.plxxs.f; \ + yamop *nextp = (*_PREG)->u.plxxs.f; \ (*_PREG) = nextp; \ ALWAYS_GONext(); \ } \ @@ -1800,7 +1800,7 @@ ALWAYS_GONext(); \ } \ else { \ - yamop *nextp = (*_PREG)->y_u.plxxs.f; \ + yamop *nextp = (*_PREG)->u.plxxs.f; \ (*_PREG) = nextp; \ ALWAYS_GONext(); \ } \ @@ -1809,7 +1809,7 @@ #define CALL_BFUNC_XX_CALL_BFUNC_XX2_NVAR_NOINT \ BLOCK = (CELL)CALL_BFUNC_XX_CALL_BFUNC_XX2_NVAR_NOINT; \ - CmpPredicate f = (*_PREG)->y_u.plxxs.p->cs.d_code; \ + CmpPredicate f = (*_PREG)->u.plxxs.p->cs.d_code; \ saveregs(); \ d0 = (CELL) (f) (d0,d1); \ setregs(); \ @@ -1817,7 +1817,7 @@ JMPNext(); \ } \ else if (!d0) { \ - (*_PREG) = (*_PREG)->y_u.plxxs.f; \ + (*_PREG) = (*_PREG)->u.plxxs.f; \ JMPNext(); \ } \ else { \ @@ -1832,8 +1832,8 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0; \ - pt0 = YREG + (*_PREG)->y_u.plxys.y; \ - d1 = XREG((*_PREG)->y_u.plxys.x); \ + pt0 = YREG + (*_PREG)->u.plxys.y; \ + d1 = XREG((*_PREG)->u.plxys.x); \ d0 = *pt0; #define CALL_BFUNC_YX_CALL_BFUNC_YX2_NVAR_INT \ @@ -1841,13 +1841,13 @@ if (IsIntTerm(d0) && IsIntTerm(d1)) { \ int flags; \ Int v = IntOfTerm(d0) - IntOfTerm(d1); \ - flags = (*_PREG)->y_u.plxys.flags; \ + flags = (*_PREG)->u.plxys.flags; \ if (v > 0) { \ if (flags & GT_OK_IN_CMP) { \ (*_PREG) = NEXTOP((*_PREG), plxys); \ JMPNext(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ JMPNext(); \ } \ } else if (v < 0) { \ @@ -1855,7 +1855,7 @@ (*_PREG) = NEXTOP((*_PREG), plxys); \ JMPNext(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ JMPNext(); \ } \ } else { \ @@ -1863,7 +1863,7 @@ (*_PREG) = NEXTOP((*_PREG), plxys); \ JMPNext(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ JMPNext(); \ } \ } \ @@ -1871,13 +1871,13 @@ #define CALL_BFUNC_YX_CALL_BFUNC_YX2_NVAR_NOINT \ BLOCK = (CELL)CALL_BFUNC_YX_CALL_BFUNC_YX2_NVAR_NOINT; \ - CmpPredicate f = (*_PREG)->y_u.plxys.p->cs.d_code; \ + CmpPredicate f = (*_PREG)->u.plxys.p->cs.d_code; \ saveregs(); \ d0 = (CELL) (f) (d0,d1); \ setregs(); \ if (!d0 || (*_PREG) == FAILCODE) { \ if ((*_PREG) != FAILCODE) { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ } \ JMPNext(); \ } \ @@ -1893,8 +1893,8 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0; \ - pt0 = YREG + (*_PREG)->y_u.plxys.y; \ - d0 = XREG((*_PREG)->y_u.plxys.x); \ + pt0 = YREG + (*_PREG)->u.plxys.y; \ + d0 = XREG((*_PREG)->u.plxys.x); \ d1 = *pt0; #define CALL_BFUNC_XY_CALL_BFUNC_XY2_NVAR_INT \ @@ -1902,13 +1902,13 @@ if (IsIntTerm(d0) && IsIntTerm(d1)) { \ int flags; \ Int v = IntOfTerm(d0) - IntOfTerm(d1); \ - flags = (*_PREG)->y_u.plxys.flags; \ + flags = (*_PREG)->u.plxys.flags; \ if (v > 0) { \ if (flags & GT_OK_IN_CMP) { \ (*_PREG) = NEXTOP((*_PREG), plxys); \ JMPNext(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ JMPNext(); \ } \ } else if (v < 0) { \ @@ -1916,7 +1916,7 @@ (*_PREG) = NEXTOP((*_PREG), plxys); \ JMPNext(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ JMPNext(); \ } \ } else { \ @@ -1924,7 +1924,7 @@ (*_PREG) = NEXTOP((*_PREG), plxys); \ JMPNext(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ JMPNext(); \ } \ } \ @@ -1932,13 +1932,13 @@ #define CALL_BFUNC_XY_CALL_BFUNC_XY2_NVAR_NOINT \ BLOCK = (CELL)CALL_BFUNC_XY_CALL_BFUNC_XY2_NVAR_NOINT; \ - CmpPredicate f = (*_PREG)->y_u.plxys.p->cs.d_code; \ + CmpPredicate f = (*_PREG)->u.plxys.p->cs.d_code; \ saveregs(); \ d0 = (CELL) (f) (d0,d1); \ setregs(); \ if (!d0 || (*_PREG) == FAILCODE) { \ if ((*_PREG) != FAILCODE) { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ } \ JMPNext(); \ } \ @@ -1954,8 +1954,8 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - pt0 = YREG + (*_PREG)->y_u.plyys.y1; \ - pt1 = YREG + (*_PREG)->y_u.plyys.y2; \ + pt0 = YREG + (*_PREG)->u.plyys.y1; \ + pt1 = YREG + (*_PREG)->u.plyys.y2; \ d0 = *pt0; \ d1 = *pt1; @@ -1964,13 +1964,13 @@ if (IsIntTerm(d0) && IsIntTerm(d1)) { \ int flags; \ Int v = IntOfTerm(d0) - IntOfTerm(d1); \ - flags = (*_PREG)->y_u.plyys.flags; \ + flags = (*_PREG)->u.plyys.flags; \ if (v > 0) { \ if (flags & GT_OK_IN_CMP) { \ (*_PREG) = NEXTOP((*_PREG), plyys); \ JMPNext(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plyys.f; \ + (*_PREG) = (*_PREG)->u.plyys.f; \ JMPNext(); \ } \ } else if (v < 0) { \ @@ -1978,7 +1978,7 @@ (*_PREG) = NEXTOP((*_PREG), plyys); \ JMPNext(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plyys.f; \ + (*_PREG) = (*_PREG)->u.plyys.f; \ JMPNext(); \ } \ } else { \ @@ -1986,7 +1986,7 @@ (*_PREG) = NEXTOP((*_PREG), plyys); \ JMPNext(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plyys.f; \ + (*_PREG) = (*_PREG)->u.plyys.f; \ JMPNext(); \ } \ } \ @@ -1994,13 +1994,13 @@ #define CALL_BFUNC_YY_CALL_BFUNC_YY2_NVAR_NOINT \ BLOCK = (CELL)CALL_BFUNC_YY_CALL_BFUNC_YY2_NVAR_NOINT; \ - CmpPredicate f = (*_PREG)->y_u.plyys.p->cs.d_code; \ + CmpPredicate f = (*_PREG)->u.plyys.p->cs.d_code; \ saveregs(); \ d0 = (CELL) (f) (d0,d1); \ setregs(); \ if (!d0 || (*_PREG) == FAILCODE) { \ if ((*_PREG) != FAILCODE) { \ - (*_PREG) = (*_PREG)->y_u.plyys.f; \ + (*_PREG) = (*_PREG)->u.plyys.f; \ } \ JMPNext(); \ } \ @@ -2010,7 +2010,7 @@ } #define CALL_BFUNC_YY_NOINTTERM_NOFAILCODE \ - (*_PREG) = (*_PREG)->y_u.plyys.f; + (*_PREG) = (*_PREG)->u.plyys.f; #define CALL_BFUNC_YY_NOINTTERM_NOD0 \ JMPNext(); @@ -2038,16 +2038,16 @@ #ifdef LOW_LEVEL_TRACER #define P_ARG_VV_LOW_LEVEL_TRACER \ - HR[0] = XREG((*_PREG)->y_u.xxx.x1); \ - HR[1] = XREG((*_PREG)->y_u.xxx.x2); \ + H[0] = XREG((*_PREG)->u.xxx.x1); \ + H[1] = XREG((*_PREG)->u.xxx.x2); \ RESET_VARIABLE(HR+2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),H); #endif #define P_ARG_VV_TEST_D0 \ register CELL d0, d1; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xxx.x1); + d0 = XREG((*_PREG)->u.xxx.x1); #define P_ARG_VV_ARG_ARG1_NVAR \ FAILED = 0; \ @@ -2064,7 +2064,7 @@ #define P_ARG_VV_TEST_D1 \ if (!FAILED) { \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_ARG_VV_ARG_ARG2_NVAR \ BLOCK = (CELL)P_ARG_VV_ARG_ARG2_NVAR; \ @@ -2079,7 +2079,7 @@ YAAM_FAIL; \ } \ else { \ - XREG((*_PREG)->y_u.xxx.x) = pt0[d0]; \ + XREG((*_PREG)->u.xxx.x) = pt0[d0]; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); \ } \ @@ -2096,7 +2096,7 @@ YAAM_FAIL; \ } \ else { \ - XREG((*_PREG)->y_u.xxx.x) = pt0[d0-1]; \ + XREG((*_PREG)->u.xxx.x) = pt0[d0-1]; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); \ } \ @@ -2124,19 +2124,19 @@ #ifdef LOW_LEVEL_TRACER #define P_ARG_CV_LOW_LEVEL_TRACER \ CELL *Ho = HR; \ - Term t = MkIntegerTerm((*_PREG)->y_u.xxn.c); \ - HR[0] = t; \ - HR[1] = XREG((*_PREG)->y_u.xxn.xi); \ + Term t = MkIntegerTerm((*_PREG)->u.xxn.c); \ + H[0] = t; \ + H[1] = XREG((*_PREG)->u.xxn.xi); \ RESET_VARIABLE(HR+2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); \ - HR = Ho; + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),H); \ + H = HRo; #endif #define P_ARG_CV_TEST_D1 \ register CELL d0, d1; \ register CELL *pt0; \ - d0 = (*_PREG)->y_u.xxn.c; \ - d1 = XREG((*_PREG)->y_u.xxn.xi); + d0 = (*_PREG)->u.xxn.c; \ + d1 = XREG((*_PREG)->u.xxn.xi); #define P_ARG_CV_ARG_ARG2_VC_NVAR \ BLOCK = (CELL)P_ARG_CV_ARG_ARG2_VC_NVAR; \ @@ -2152,7 +2152,7 @@ YAAM_FAIL; \ } \ else { \ - XREG((*_PREG)->y_u.xxn.x) = pt0[d0]; \ + XREG((*_PREG)->u.xxn.x) = pt0[d0]; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); \ } \ @@ -2169,7 +2169,7 @@ YAAM_FAIL; \ } \ else { \ - XREG((*_PREG)->y_u.xxn.x) = pt0[d0-1]; \ + XREG((*_PREG)->u.xxn.x) = pt0[d0-1]; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); \ } \ @@ -2189,17 +2189,17 @@ #ifdef LOW_LEVEL_TRACER #define P_ARG_Y_VV_LOW_LEVEL_TRACER \ - HR[0] = XREG((*_PREG)->y_u.yxx.x1); \ - HR[1] = XREG((*_PREG)->y_u.yxx.x2); \ - HR[2] = YREG[(*_PREG)->y_u.yxx.y]; \ + H[0] = XREG((*_PREG)->u.yxx.x1); \ + H[1] = XREG((*_PREG)->u.yxx.x2); \ + H[2] = YREG[(*_PREG)->u.yxx.y]; \ RESET_VARIABLE(HR+2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),H); #endif #define P_ARG_Y_VV_TEST_D0 \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.yxx.x1); + d0 = XREG((*_PREG)->u.yxx.x1); #define P_ARG_Y_VV_ARG_Y_ARG1_NVAR \ FAILED = 0; \ @@ -2216,7 +2216,7 @@ #define P_ARG_Y_VV_TEST_D1 \ if (!FAILED) { \ - d1 = XREG((*_PREG)->y_u.yxx.x2); + d1 = XREG((*_PREG)->u.yxx.x2); #define P_ARG_Y_VV_ARG_Y_ARG2_NVAR \ BLOCK = (CELL)P_ARG_Y_VV_ARG_Y_ARG2_NVAR; \ @@ -2231,7 +2231,7 @@ YAAM_FAIL; \ } \ else { \ - pt1 = YREG + (*_PREG)->y_u.yxx.y; \ + pt1 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt1,pt0[d0]); \ GONext(); \ @@ -2249,7 +2249,7 @@ YAAM_FAIL; \ } \ else { \ - pt1 = YREG + (*_PREG)->y_u.yxx.y; \ + pt1 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt1,pt0[d0-1]); \ GONext(); \ @@ -2277,27 +2277,27 @@ #ifdef LOW_LEVEL_TRACER #define P_ARG_Y_CV_LOW_LEVEL_TRACER \ CELL *Ho = HR; \ - Term t = MkIntegerTerm((*_PREG)->y_u.yxn.c); \ - HR[0] = t; \ - HR[1] = XREG((*_PREG)->y_u.yxn.xi); \ - HR[2] = YREG[(*_PREG)->y_u.yxn.y]; \ + Term t = MkIntegerTerm((*_PREG)->u.yxn.c); \ + H[0] = t; \ + H[1] = XREG((*_PREG)->u.yxn.xi); \ + H[2] = YREG[(*_PREG)->u.yxn.y]; \ RESET_VARIABLE(HR+2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); \ - HR = Ho; + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),H); \ + H = HRo; #endif #define P_ARG_Y_CV_TEST_D1 \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = (*_PREG)->y_u.yxn.c; \ - d1 = XREG((*_PREG)->y_u.yxn.xi); + d0 = (*_PREG)->u.yxn.c; \ + d1 = XREG((*_PREG)->u.yxn.xi); #define P_ARG_Y_CV_D1APPL_INIT \ pt0 = RepAppl(d1); \ d1 = *pt0; #define P_ARG_Y_CV_D1APPL_END \ - pt1 = YREG + (*_PREG)->y_u.yxn.y; \ + pt1 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt1,pt0[d0]); \ GONext(); @@ -2312,7 +2312,7 @@ setregs(); #define P_ARG_Y_CV_D1PAIR_END \ - pt1 = YREG + (*_PREG)->y_u.yxn.y; \ + pt1 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt1,pt0[d0-1]); \ GONext(); @@ -2328,18 +2328,18 @@ #ifdef LOW_LEVEL_TRACER #define P_FUNC2S_VV_LOW_LEVEL_TRACER \ RESET_VARIABLE(HR); \ - HR[1] = XREG((*_PREG)->y_u.xxx.x1); \ - HR[2] = XREG((*_PREG)->y_u.xxx.x2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + H[1] = XREG((*_PREG)->u.xxx.x1); \ + H[2] = XREG((*_PREG)->u.xxx.x2); \ + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),H); #endif #define P_FUNC2S_TEST_D0 \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.xxx.x1); + d0 = XREG((*_PREG)->u.xxx.x1); #define P_FUNC2S_VV_TEST_D1 \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_FUNC2S_VV_D1INT \ d1 = IntegerOfTerm(d1); @@ -2367,8 +2367,8 @@ RESET_VARIABLE(HR); \ RESET_VARIABLE(HR+1); \ d0 = AbsPair(HR); \ - HR += 2; \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + H += 2; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xxx),Osbpp),l); \ GONext(); @@ -2402,13 +2402,13 @@ pt1++; #define P_FUNC2S_VV_SECONDIFOK_END \ - HR = pt1; \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + H = pt1; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xxx),Osbpp),l); \ GONext(); #define P_FUNC2S_VV_THIRDIFOK \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xxx),Osbpp),l); \ GONext(); @@ -2435,16 +2435,16 @@ #ifdef LOW_LEVEL_TRACER #define P_FUNC2S_CV_LOW_LEVEL_TRACER \ RESET_VARIABLE(HR); \ - HR[1] = (*_PREG)->y_u.xxc.c; \ - HR[2] = XREG((*_PREG)->y_u.xxc.xi); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + H[1] = (*_PREG)->u.xxc.c; \ + H[2] = XREG((*_PREG)->u.xxc.xi); \ + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),H); #endif #define P_FUNC2S_CV_TEST_D1 \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = (*_PREG)->y_u.xxc.c; \ - d1 = XREG((*_PREG)->y_u.xxc.xi); + d0 = (*_PREG)->u.xxc.c; \ + d1 = XREG((*_PREG)->u.xxc.xi); #define P_FUNC2S_CV_D1INT \ d1 = IntegerOfTerm(d1); @@ -2466,8 +2466,8 @@ RESET_VARIABLE(HR); \ RESET_VARIABLE(HR+1); \ d0 = AbsPair(HR); \ - HR += 2; \ - XREG((*_PREG)->y_u.xxc.x) = d0; \ + H += 2; \ + XREG((*_PREG)->u.xxc.x) = d0; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xxc),Osbpp),l); \ GONext(); @@ -2501,13 +2501,13 @@ pt1++; #define P_FUNC2S_CV_D1GREATER_END \ - HR = pt1; \ - XREG((*_PREG)->y_u.xxc.x) = d0; \ + H = pt1; \ + XREG((*_PREG)->u.xxc.x) = d0; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xxc),Osbpp),l); \ GONext(); #define P_FUNC2S_CV_D1ISZERO \ - XREG((*_PREG)->y_u.xxc.x) = d0; \ + XREG((*_PREG)->u.xxc.x) = d0; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xxc),Osbpp),l); \ GONext(); @@ -2529,21 +2529,21 @@ #define P_FUNC2S_VC_LOW_LEVEL_TRACER \ Term ti; \ CELL *hi = HR; \ - ti = MkIntegerTerm((*_PREG)->y_u.xxn.c); \ + ti = MkIntegerTerm((*_PREG)->u.xxn.c); \ RESET_VARIABLE(HR); \ - HR[1] = XREG((*_PREG)->y_u.xxn.xi); \ - HR[2] = ti; \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); \ - HR = hi; + H[1] = XREG((*_PREG)->u.xxn.xi); \ + H[2] = ti; \ + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),H); \ + H = hi; #endif #define P_FUNC2S_VC_TEST_D0 \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); + d0 = XREG((*_PREG)->u.xxn.xi); #define P_FUNC2S_VC_FUNC2S_NVAR_VC \ - d1 = (*_PREG)->y_u.xxn.c; + d1 = (*_PREG)->u.xxn.c; #define P_FUNC2S_VC_D0NOATOMIC \ saveregs(); \ @@ -2555,13 +2555,13 @@ RESET_VARIABLE(HR); \ RESET_VARIABLE(HR+1); \ d0 = AbsPair(HR); \ - HR += 2; \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + H += 2; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xxn),Osbpp),l); \ GONext(); #define P_FUNC2S_VC_D1ISZERO \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xxn),Osbpp),l); \ GONext(); @@ -2596,7 +2596,7 @@ #define P_FUNC2S_VC_END1 \ HR = pt1; \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xxn),Osbpp),l); \ GONext(); @@ -2611,18 +2611,18 @@ #ifdef LOW_LEVEL_TRACER #define P_FUNC2S_Y_VV_LOW_LEVEL_TRACER \ RESET_VARIABLE(HR); \ - HR[1] = XREG((*_PREG)->y_u.yxx.x1); \ - HR[2] = XREG((*_PREG)->y_u.yxx.x2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + H[1] = XREG((*_PREG)->u.yxx.x1); \ + H[2] = XREG((*_PREG)->u.yxx.x2); \ + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),H); #endif #define P_FUNC2S_Y_VV_TEST_D0 \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.yxx.x1); + d0 = XREG((*_PREG)->u.yxx.x1); #define P_FUNC2S_Y_VV_TEST_D1 \ - d1 = XREG((*_PREG)->y_u.yxx.x2); + d1 = XREG((*_PREG)->u.yxx.x2); #define P_FUNC2S_Y_VV_D1INT \ d1 = IntegerOfTerm(d1); @@ -2650,8 +2650,8 @@ RESET_VARIABLE(HR); \ RESET_VARIABLE(HR+1); \ d0 = AbsPair(HR); \ - HR += 2; \ - pt1 = YREG + (*_PREG)->y_u.yxx.y; \ + H += 2; \ + pt1 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yxx),Osbpp),l); \ INITIALIZE_PERMVAR(pt1,d0); \ GONext(); @@ -2686,14 +2686,14 @@ pt1++; #define P_FUNC2S_Y_VV_D1GREATER_END \ - HR = pt1; \ - pt1 = YREG + (*_PREG)->y_u.yxx.y; \ + H = pt1; \ + pt1 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yxx),Osbpp),l); \ INITIALIZE_PERMVAR(pt1,d0); \ GONext(); #define P_FUNC2S_Y_VV_D1ISZERO \ - pt1 = YREG + (*_PREG)->y_u.yxx.y; \ + pt1 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yxx),Osbpp),l); \ INITIALIZE_PERMVAR(pt1,d0); \ GONext(); @@ -2721,16 +2721,16 @@ #ifdef LOW_LEVEL_TRACER #define P_FUNC2S_Y_CV_LOW_LEVEL_TRACER \ RESET_VARIABLE(HR); \ - HR[1] = (*_PREG)->y_u.yxn.c; \ - HR[2] = XREG((*_PREG)->y_u.yxn.xi); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + H[1] = (*_PREG)->u.yxn.c; \ + H[2] = XREG((*_PREG)->u.yxn.xi); \ + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),H); #endif #define P_FUNC2S_Y_CV_TEST_D1 \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = (*_PREG)->y_u.yxn.c; \ - d1 = XREG((*_PREG)->y_u.yxn.xi); + d0 = (*_PREG)->u.yxn.c; \ + d1 = XREG((*_PREG)->u.yxn.xi); #define P_FUNC2S_Y_CV_D1INT \ d1 = IntegerOfTerm(d1); @@ -2752,8 +2752,8 @@ RESET_VARIABLE(HR); \ RESET_VARIABLE(HR+1); \ d0 = AbsPair(HR); \ - HR += 2; \ - pt1 = YREG + (*_PREG)->y_u.yxn.y; \ + H += 2; \ + pt1 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yxn),Osbpp),l); \ INITIALIZE_PERMVAR(pt1,d0); \ GONext(); @@ -2788,14 +2788,14 @@ pt1++; #define P_FUNC2S_Y_CV_D1GREATER_END \ - HR = pt1; \ - pt1 = YREG + (*_PREG)->y_u.yxn.y; \ + H = pt1; \ + pt1 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yxn),Osbpp),l); \ INITIALIZE_PERMVAR(pt1,d0); \ GONext(); #define P_FUNC2S_Y_CV_D1ISZERO \ - pt1 = YREG + (*_PREG)->y_u.yxn.y; \ + pt1 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yxn),Osbpp),l); \ INITIALIZE_PERMVAR(pt1,d0); \ GONext(); @@ -2818,21 +2818,21 @@ #define P_FUNC2S_Y_VC_LOW_LEVEL_TRACER \ Term ti; \ CELL *hi = HR; \ - ti = MkIntegerTerm((Int)((*_PREG)->y_u.yxn.c)); \ + ti = MkIntegerTerm((Int)((*_PREG)->u.yxn.c)); \ RESET_VARIABLE(HR); \ - HR[1] = XREG((*_PREG)->y_u.yxn.xi); \ - HR[2] = ti; \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); \ - HR = hi; + H[1] = XREG((*_PREG)->u.yxn.xi); \ + H[2] = ti; \ + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),H); \ + H = hi; #endif #define P_FUNC2S_Y_VC_TEST_D0 \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); + d0 = XREG((*_PREG)->u.yxn.xi); #define P_FUNC2S_Y_VC_FUNC2S_Y_NVAR_VC \ - d1 = (*_PREG)->y_u.yxn.c; + d1 = (*_PREG)->u.yxn.c; #define P_FUNC2S_Y_VC_D0NOATOMIC \ saveregs(); \ @@ -2844,14 +2844,14 @@ RESET_VARIABLE(HR); \ RESET_VARIABLE(HR+1); \ d0 = AbsPair(HR); \ - HR += 2; \ - pt1 = YREG + (*_PREG)->y_u.yxn.y; \ + H += 2; \ + pt1 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yxn),Osbpp),l); \ INITIALIZE_PERMVAR(pt1,d0); \ GONext(); #define P_FUNC2S_Y_VC_D1ISZERO \ - pt1 = YREG + (*_PREG)->y_u.yxn.y; \ + pt1 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yxn),Osbpp),l); \ INITIALIZE_PERMVAR(pt1,d0); \ GONext(); @@ -2893,7 +2893,7 @@ #define P_FUNC2S_Y_VC_END1 \ HR = pt1; \ - pt1 = YREG + (*_PREG)->y_u.yxn.y; \ + pt1 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yxn),Osbpp),l); \ INITIALIZE_PERMVAR(pt1,d0); \ GONext(); @@ -2908,42 +2908,42 @@ #ifdef LOW_LEVEL_TRACER #define P_FUNC2F_XX_LOW_LEVEL_TRACER \ - HR[0] = XREG((*_PREG)->y_u.xxx.x); \ + H[0] = XREG((*_PREG)->u.xxx.x); \ RESET_VARIABLE(HR+1); \ RESET_VARIABLE(HR+2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),H); #endif #define P_FUNC2F_XX_TEST_D0 \ register CELL d0; \ register CELL* pt1; \ - d0 = XREG((*_PREG)->y_u.xxx.x); + d0 = XREG((*_PREG)->u.xxx.x); #define P_FUNC2F_XX_D0APPL \ Functor d1 = FunctorOfTerm(d0); #define P_FUNC2F_XX_D0APPL_D1EXTFUNC \ - XREG((*_PREG)->y_u.xxx.x1) = d0; \ - XREG((*_PREG)->y_u.xxx.x2) = MkIntTerm(0); \ + XREG((*_PREG)->u.xxx.x1) = d0; \ + XREG((*_PREG)->u.xxx.x2) = MkIntTerm(0); \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); #define P_FUNC2F_XX_D0APPL_END \ - XREG((*_PREG)->y_u.xxx.x1) = MkAtomTerm(NameOfFunctor(d1)); \ - XREG((*_PREG)->y_u.xxx.x2) = MkIntegerTerm(ArityOfFunctor(d1)); \ + XREG((*_PREG)->u.xxx.x1) = MkAtomTerm(NameOfFunctor(d1)); \ + XREG((*_PREG)->u.xxx.x2) = MkIntegerTerm(ArityOfFunctor(d1)); \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); #define P_FUNC2F_XX_D0PAIR \ - XREG((*_PREG)->y_u.xxx.x1) = TermDot; \ - XREG((*_PREG)->y_u.xxx.x2) = MkIntTerm(2); \ + XREG((*_PREG)->u.xxx.x1) = TermDot; \ + XREG((*_PREG)->u.xxx.x2) = MkIntTerm(2); \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); #define P_FUNC2F_XX_D0NOCOMPOUND \ - XREG((*_PREG)->y_u.xxx.x1) = d0; \ - XREG((*_PREG)->y_u.xxx.x2) = MkIntTerm(0); \ + XREG((*_PREG)->u.xxx.x1) = d0; \ + XREG((*_PREG)->u.xxx.x2) = MkIntTerm(0); \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -2957,43 +2957,43 @@ #ifdef LOW_LEVEL_TRACER #define P_FUNC2F_XY_LOW_LEVEL_TRACER \ - HR[0] = XREG((*_PREG)->y_u.xxy.x); \ + H[0] = XREG((*_PREG)->u.xxy.x); \ RESET_VARIABLE(HR+1); \ RESET_VARIABLE(HR+2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),H); #endif #define P_FUNC2F_XY_TEST_D0 \ register CELL d0; \ register CELL *pt1; \ - d0 = XREG((*_PREG)->y_u.xxy.x); + d0 = XREG((*_PREG)->u.xxy.x); #define P_FUNC2F_XY_D0APPL \ Functor d1 = FunctorOfTerm(d0); \ - CELL *pt0 = YREG+(*_PREG)->y_u.xxy.y2; + CELL *pt0 = YREG+(*_PREG)->u.xxy.y2; #define P_FUNC2F_XY_D0APPL_D1EXTFUNC \ - XREG((*_PREG)->y_u.xxy.x1) = d0; \ + XREG((*_PREG)->u.xxy.x1) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxy); \ INITIALIZE_PERMVAR(pt0, MkIntTerm(0)); \ GONext(); #define P_FUNC2F_XY_D0APPL_END \ - XREG((*_PREG)->y_u.xxy.x1) = MkAtomTerm(NameOfFunctor(d1)); \ + XREG((*_PREG)->u.xxy.x1) = MkAtomTerm(NameOfFunctor(d1)); \ (*_PREG) = NEXTOP((*_PREG), xxy); \ INITIALIZE_PERMVAR(pt0, MkIntegerTerm(ArityOfFunctor(d1))); \ GONext(); #define P_FUNC2F_XY_D0PAIR \ - CELL *pt0 = YREG+(*_PREG)->y_u.xxy.y2; \ - XREG((*_PREG)->y_u.xxy.x1) = TermDot; \ + CELL *pt0 = YREG+(*_PREG)->u.xxy.y2; \ + XREG((*_PREG)->u.xxy.x1) = TermDot; \ (*_PREG) = NEXTOP((*_PREG), xxy); \ INITIALIZE_PERMVAR(pt0, MkIntTerm(2)); \ GONext(); #define P_FUNC2F_XY_D0NOCOMPOUND \ - CELL *pt0 = YREG+(*_PREG)->y_u.xxy.y2; \ - XREG((*_PREG)->y_u.xxy.x1) = d0; \ + CELL *pt0 = YREG+(*_PREG)->u.xxy.y2; \ + XREG((*_PREG)->u.xxy.x1) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxy); \ INITIALIZE_PERMVAR(pt0, MkIntTerm(0)); \ GONext(); @@ -3008,43 +3008,43 @@ #ifdef LOW_LEVEL_TRACER #define P_FUNC2F_YX_LOW_LEVEL_TRACER \ - HR[0] = XREG((*_PREG)->y_u.yxx.x2); \ + H[0] = XREG((*_PREG)->u.yxx.x2); \ RESET_VARIABLE(HR+1); \ RESET_VARIABLE(HR+2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),H); #endif #define P_FUNC2F_YX_TEST_D0 \ register CELL d0; \ register CELL *pt1; \ - d0 = XREG((*_PREG)->y_u.yxx.x2); + d0 = XREG((*_PREG)->u.yxx.x2); #define P_FUNC2F_YX_D0APPL \ Functor d1 = FunctorOfTerm(d0); \ - CELL *pt0 = YREG+(*_PREG)->y_u.yxx.y; + CELL *pt0 = YREG+(*_PREG)->u.yxx.y; #define P_FUNC2F_YX_D0APPL_D1EXTFUNC \ - XREG((*_PREG)->y_u.yxx.x1) = MkIntTerm(0); \ + XREG((*_PREG)->u.yxx.x1) = MkIntTerm(0); \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0, d0); \ GONext(); #define P_FUNC2F_YX_D0APPL_END \ - XREG((*_PREG)->y_u.yxx.x1) = MkIntegerTerm(ArityOfFunctor(d1)); \ + XREG((*_PREG)->u.yxx.x1) = MkIntegerTerm(ArityOfFunctor(d1)); \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0, MkAtomTerm(NameOfFunctor(d1))); \ GONext(); #define P_FUNC2F_YX_D0PAIR \ - CELL *pt0 = YREG+(*_PREG)->y_u.yxx.y; \ - XREG((*_PREG)->y_u.yxx.x1) = MkIntTerm(2); \ + CELL *pt0 = YREG+(*_PREG)->u.yxx.y; \ + XREG((*_PREG)->u.yxx.x1) = MkIntTerm(2); \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0 ,TermDot); \ GONext(); #define P_FUNC2F_YX_D0NOCOMPOUND \ - CELL *pt0 = YREG+(*_PREG)->y_u.yxx.y; \ - XREG((*_PREG)->y_u.yxx.x1) = MkIntTerm(0); \ + CELL *pt0 = YREG+(*_PREG)->u.yxx.y; \ + XREG((*_PREG)->u.yxx.x1) = MkIntTerm(0); \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0, d0); \ GONext(); @@ -3059,20 +3059,20 @@ #ifdef LOW_LEVEL_TRACER #define P_FUNC2F_YY_LOW_LEVEL_TRACER \ - HR[0] = XREG((*_PREG)->y_u.yyx.x); \ + H[0] = XREG((*_PREG)->u.yyx.x); \ RESET_VARIABLE(HR+1); \ RESET_VARIABLE(HR+2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),H); #endif #define P_FUNC2F_YY_TEST_D0 \ register CELL d0; \ - d0 = XREG((*_PREG)->y_u.yyx.x); + d0 = XREG((*_PREG)->u.yyx.x); #define P_FUNC2F_YY_D0APPL \ Functor d1 = FunctorOfTerm(d0); \ - CELL *pt0 = YREG+(*_PREG)->y_u.yyx.y1; \ - CELL *pt1 = YREG+(*_PREG)->y_u.yyx.y2; + CELL *pt0 = YREG+(*_PREG)->u.yyx.y1; \ + CELL *pt1 = YREG+(*_PREG)->u.yyx.y2; #define P_FUNC2F_YY_D0APPL_D1EXTFUNC \ (*_PREG) = NEXTOP((*_PREG), yyx); \ @@ -3087,16 +3087,16 @@ GONext(); #define P_FUNC2F_YY_D0PAIR \ - CELL *pt0 = YREG+(*_PREG)->y_u.yyx.y1; \ - CELL *pt1 = YREG+(*_PREG)->y_u.yyx.y2; \ + CELL *pt0 = YREG+(*_PREG)->u.yyx.y1; \ + CELL *pt1 = YREG+(*_PREG)->u.yyx.y2; \ (*_PREG) = NEXTOP((*_PREG), yyx); \ INITIALIZE_PERMVAR(pt0, TermDot); \ INITIALIZE_PERMVAR(pt1, MkIntTerm(2)); \ GONext(); #define P_FUNC2F_YY_D0NOCOMPOUND \ - CELL *pt0 = YREG+(*_PREG)->y_u.yyx.y1; \ - CELL *pt1 = YREG+(*_PREG)->y_u.yyx.y2; \ + CELL *pt0 = YREG+(*_PREG)->u.yyx.y1; \ + CELL *pt1 = YREG+(*_PREG)->u.yyx.y2; \ (*_PREG) = NEXTOP((*_PREG), yyx); \ INITIALIZE_PERMVAR(pt0, d0); \ INITIALIZE_PERMVAR(pt1, MkIntTerm(0)); \ diff --git a/JIT/HPP/yaam_primitive_predicates_d.h b/JIT/HPP/yaam_primitive_predicates_d.h index 9a4e295f3..c364c362f 100644 --- a/JIT/HPP/yaam_primitive_predicates_d.h +++ b/JIT/HPP/yaam_primitive_predicates_d.h @@ -2,21 +2,21 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xl.x); + d0 = XREG((*_PREG)->u.xl.x); #define P_ATOM_X_ATOM \ (*_PREG) = NEXTOP((*_PREG), xl); \ GONext(); \ #define P_ATOM_X_NOATOM \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_ATOM_Y_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - pt0 = YREG + (*_PREG)->y_u.yl.y; \ + pt0 = YREG + (*_PREG)->u.yl.y; \ d0 = *pt0; #define P_ATOM_Y_IFOK \ @@ -24,36 +24,36 @@ GONext(); #define P_ATOM_Y_NOIF \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_ATOM_Y_END \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_ATOMIC_X_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xl.x); + d0 = XREG((*_PREG)->u.xl.x); #define P_ATOMIC_X_NONVAR \ (*_PREG) = NEXTOP((*_PREG), xl); \ GONext(); #define P_ATOMIC_X_VAR \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_ATOMIC_X_END \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_ATOMIC_Y_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - pt0 = YREG + (*_PREG)->y_u.yl.y; \ + pt0 = YREG + (*_PREG)->u.yl.y; \ d0 = *pt0; #define P_ATOMIC_Y_NONVAR \ @@ -61,11 +61,11 @@ GONext(); #define P_ATOMIC_Y_VAR \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_ATOMIC_Y_END \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_INTEGER_X_INSTINIT \ @@ -73,25 +73,25 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xl.x); \ + d0 = XREG((*_PREG)->u.xl.x); \ #define P_INTEGER_X_INTEGER_X_NVAR_OK \ (*_PREG) = NEXTOP((*_PREG), xl); \ GONext(); #define P_INTEGER_X_INTEGER_X_NVAR_NOOK \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_INTEGER_X_INTEGER_X_UNK \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_INTEGER_Y_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - pt0 = YREG + (*_PREG)->y_u.yl.y; \ + pt0 = YREG + (*_PREG)->u.yl.y; \ d0 = *pt0; #define P_INTEGER_Y_INTEGER_Y_NVAR_OK \ @@ -99,32 +99,32 @@ GONext(); #define P_INTEGER_Y_INTEGER_Y_NVAR_NOOK \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_INTEGER_Y_INTEGER_Y_UNK \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_NONVAR_X_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xl.x); + d0 = XREG((*_PREG)->u.xl.x); #define P_NONVAR_X_NONVAR \ (*_PREG) = NEXTOP((*_PREG), xl); \ GONext(); #define P_NONVAR_X_NONONVAR \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_NONVAR_Y_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - pt0 = YREG + (*_PREG)->y_u.yl.y; \ + pt0 = YREG + (*_PREG)->u.yl.y; \ d0 = *pt0; #define P_NONVAR_Y_NONVAR \ @@ -132,14 +132,14 @@ GONext(); #define P_NONVAR_Y_NONONVAR \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_NUMBER_X_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xl.x); + d0 = XREG((*_PREG)->u.xl.x); #define P_NUMBER_X_INT \ (*_PREG) = NEXTOP((*_PREG), xl); \ @@ -150,22 +150,22 @@ GONext(); #define P_NUMBER_X_FUNCTORDEFAULT \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_NUMBER_X_POST_IF \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_NUMBER_X_NUMBER_X_UNK \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_NUMBER_Y_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL *pt0; \ - pt0 = YREG + (*_PREG)->y_u.yl.y; \ + pt0 = YREG + (*_PREG)->u.yl.y; \ d0 = *pt0; #define P_NUMBER_Y_INT \ @@ -177,25 +177,25 @@ GONext(); #define P_NUMBER_Y_FUNCTORDEFAULT \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_NUMBER_Y_POST_IF \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_NUMBER_Y_NUMBER_Y_UNK \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_VAR_X_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xl.x); + d0 = XREG((*_PREG)->u.xl.x); #define P_VAR_X_NONVAR \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_VAR_X_VAR \ @@ -206,11 +206,11 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL *pt0; \ - pt0 = YREG + (*_PREG)->y_u.yl.y; \ + pt0 = YREG + (*_PREG)->u.yl.y; \ d0 = *pt0; #define P_VAR_Y_NONVAR \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_VAR_Y_VAR \ @@ -221,25 +221,25 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xl.x); + d0 = XREG((*_PREG)->u.xl.x); #define P_DB_REF_X_DBREF \ (*_PREG) = NEXTOP((*_PREG), xl); \ GONext(); #define P_DB_REF_X_NODBREF \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_DB_REF_X_DBREF_X_UNK \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_DB_REF_Y_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - pt0 = YREG + (*_PREG)->y_u.yl.y; \ + pt0 = YREG + (*_PREG)->u.yl.y; \ d0 = *pt0; #define P_DB_REF_Y_DBREF \ @@ -247,36 +247,36 @@ GONext(); #define P_DB_REF_Y_NODBREF \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_DB_REF_Y_DBREF_Y_UNK \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_PRIMITIVE_X_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xl.x); + d0 = XREG((*_PREG)->u.xl.x); #define P_PRIMITIVE_X_PRIMITIVE \ (*_PREG) = NEXTOP((*_PREG), xl); \ GONext(); #define P_PRIMITIVE_X_NOPRIMITIVE \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_PRIMITIVE_X_PRIMI_X_UNK \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_PRIMITIVE_Y_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL *pt0; \ - pt0 = YREG + (*_PREG)->y_u.yl.y; \ + pt0 = YREG + (*_PREG)->u.yl.y; \ d0 = *pt0; #define P_PRIMITIVE_Y_PRIMITIVE \ @@ -284,25 +284,25 @@ GONext(); #define P_PRIMITIVE_Y_NOPRIMITIVE \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_PRIMITIVE_Y_PRIMI_Y_UNK \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_COMPOUND_X_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xl.x); + d0 = XREG((*_PREG)->u.xl.x); #define P_COMPOUND_X_PAIR \ (*_PREG) = NEXTOP((*_PREG), xl); \ GONext(); #define P_COMPOUND_X_APPL_IFOK \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_COMPOUND_X_APPL \ @@ -310,18 +310,18 @@ GONext(); #define P_COMPOUND_X_NOAPPL \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_COMPOUND_X_COMPOUND_X_UNK \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_COMPOUND_Y_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - pt0 = YREG + (*_PREG)->y_u.yl.y; \ + pt0 = YREG + (*_PREG)->u.yl.y; \ d0 = *pt0; #define P_COMPOUND_Y_PAIR \ @@ -329,7 +329,7 @@ GONext(); #define P_COMPOUND_Y_APPL_IFOK \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_COMPOUND_Y_APPL \ @@ -337,36 +337,36 @@ GONext(); #define P_COMPOUND_Y_NOAPPL \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_COMPOUND_Y_COMPOUND_Y_UNK \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_FLOAT_X_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xl.x); + d0 = XREG((*_PREG)->u.xl.x); #define P_FLOAT_X_FLOAT \ (*_PREG) = NEXTOP((*_PREG), xl); \ GONext(); #define P_FLOAT_X_POST_IF \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_FLOAT_X_FLOAT_X_UNK \ - (*_PREG) = (*_PREG)->y_u.xl.F; \ + (*_PREG) = (*_PREG)->u.xl.F; \ GONext(); #define P_FLOAT_Y_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - pt0 = YREG + (*_PREG)->y_u.yl.y; \ + pt0 = YREG + (*_PREG)->u.yl.y; \ d0 = *pt0; #define P_FLOAT_Y_FLOAT \ @@ -374,11 +374,11 @@ GONext(); #define P_FLOAT_Y_POST_IF \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_FLOAT_Y_FLOAT_Y_UNK \ - (*_PREG) = (*_PREG)->y_u.yl.F; \ + (*_PREG) = (*_PREG)->u.yl.F; \ GONext(); #define P_PLUS_VV_INSTINIT \ @@ -386,15 +386,15 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxx.x1); + d0 = XREG((*_PREG)->u.xxx.x1); #define P_PLUS_VV_PLUS_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_PLUS_VV_PLUS_VV_NVAR_NVAR_INT \ if (!IsIntTerm(d0) || !IsIntTerm(d1)) { BACK(); } \ d0 = MkIntegerTerm(IntOfTerm(d0) + IntOfTerm(d1)); \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -402,7 +402,7 @@ saveregs(); \ d0 = p_plus(Yap_Eval(d0), Yap_Eval(d1)); \ setregs(); \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -423,12 +423,12 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); \ - Int d1 = (*_PREG)->y_u.xxn.c; + d0 = XREG((*_PREG)->u.xxn.xi); \ + Int d1 = (*_PREG)->u.xxn.c; #define P_PLUS_VC_PLUS_VC_NVAR_INT \ d0 = MkIntegerTerm(IntOfTerm(d0) + d1); \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); @@ -436,13 +436,13 @@ saveregs(); \ d0 = p_plus(Yap_Eval(d0), MkIntegerTerm(d1)); \ setregs(); \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); #define P_PLUS_VC_PLUS_VC_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is A + " Int_FORMAT, (*_PREG)->y_u.xxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is A + " Int_FORMAT, (*_PREG)->u.xxn.c); \ setregs(); \ FAIL(); @@ -451,15 +451,15 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxx.x1); + d0 = XREG((*_PREG)->u.yxx.x1); #define P_PLUS_Y_VV_PLUS_Y_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_PLUS_Y_VV_PLUS_Y_VV_NVAR_NVAR_INT \ if (!IsIntTerm(d0) || !IsIntTerm(d1)) { BACK(); } \ d0 = MkIntegerTerm(IntOfTerm(d0) + IntOfTerm(d1)); \ - pt0 = YREG + (*_PREG)->y_u.yxx.y; \ + pt0 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -468,7 +468,7 @@ saveregs(); \ d0 = p_plus(Yap_Eval(d0), Yap_Eval(d1)); \ setregs(); \ - pt0 = YREG + (*_PREG)->y_u.yxx.y; \ + pt0 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -490,12 +490,12 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); \ - Int d1 = (*_PREG)->y_u.yxn.c; + d0 = XREG((*_PREG)->u.yxn.xi); \ + Int d1 = (*_PREG)->u.yxn.c; #define P_PLUS_Y_VC_PLUS_Y_VC_NVAR_INT \ d0 = MkIntegerTerm(IntOfTerm(d0) + d1); \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -504,14 +504,14 @@ saveregs(); \ d0 = p_plus(Yap_Eval(d0), MkIntegerTerm(d1)); \ setregs(); \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); #define P_PLUS_Y_VC_PLUS_Y_VC_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is A + " Int_FORMAT, (*_PREG)->y_u.yxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is A + " Int_FORMAT, (*_PREG)->u.yxn.c); \ setregs(); \ FAIL(); @@ -520,15 +520,15 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxx.x1); + d0 = XREG((*_PREG)->u.xxx.x1); #define P_MINUS_VV_MINUS_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_MINUS_VV_MINUS_VV_NVAR_NVAR_INT \ if (!IsIntTerm(d0) || !IsIntTerm(d1)) { BACK(); } \ d0 = MkIntegerTerm(IntOfTerm(d0) - IntOfTerm(d1)); \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -536,7 +536,7 @@ saveregs(); \ d0 = p_minus(Yap_Eval(d0), Yap_Eval(d1)); \ setregs(); \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -556,12 +556,12 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); \ - Int d1 = (*_PREG)->y_u.xxn.c; + d0 = XREG((*_PREG)->u.xxn.xi); \ + Int d1 = (*_PREG)->u.xxn.c; #define P_MINUS_CV_MINUS_CV_NVAR_INT \ d0 = MkIntegerTerm(d1 - IntOfTerm(d0)); \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); @@ -569,13 +569,13 @@ saveregs(); \ d0 = p_minus(MkIntegerTerm(d1),Yap_Eval(d0)); \ setregs(); \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); #define P_MINUS_CV_MINUS_CV_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "-A", (*_PREG)->y_u.xxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "-A", (*_PREG)->u.xxn.c); \ setregs(); \ FAIL(); @@ -583,10 +583,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxx.x1); + d0 = XREG((*_PREG)->u.yxx.x1); #define P_MINUS_Y_VV_MINUS_Y_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_MINUS_Y_VV_INTTERM \ d0 = MkIntegerTerm(IntOfTerm(d0) - IntOfTerm(d1)); @@ -603,7 +603,7 @@ FAIL(); #define P_MINUS_Y_VV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxx.y; \ + pt0 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -624,10 +624,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); + d0 = XREG((*_PREG)->u.yxn.xi); #define P_MINUS_Y_CV_MINUS_Y_CV_NVAR \ - Int d1 = (*_PREG)->y_u.yxn.c; + Int d1 = (*_PREG)->u.yxn.c; #define P_MINUS_Y_CV_INTTERM \ d0 = MkIntegerTerm(d1 - IntOfTerm(d0)); @@ -644,14 +644,14 @@ FAIL(); #define P_MINUS_Y_CV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); #define P_MINUS_Y_CV_MINUS_Y_CV_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "-A", (*_PREG)->y_u.yxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "-A", (*_PREG)->u.yxn.c); \ setregs(); \ FAIL(); @@ -660,15 +660,15 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xxx.x1); + d0 = XREG((*_PREG)->u.xxx.x1); #define P_TIMES_VV_TIMES_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_TIMES_VV_TIMES_VV_NVAR_NVAR_INT \ if (!IsIntTerm(d0) || !IsIntTerm(d1)) { BACK(); } \ d0 = times_int(IntOfTerm(d0), IntOfTerm(d1)); \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -676,7 +676,7 @@ saveregs(); \ d0 = p_times(Yap_Eval(d0), Yap_Eval(d1)); \ setregs(); \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -697,12 +697,12 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); \ - Int d1 = (*_PREG)->y_u.xxn.c; + d0 = XREG((*_PREG)->u.xxn.xi); \ + Int d1 = (*_PREG)->u.xxn.c; #define P_TIMES_VC_TIMES_VC_NVAR_INT \ d0 = times_int(IntOfTerm(d0), d1); \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); @@ -710,13 +710,13 @@ saveregs(); \ d0 = p_times(Yap_Eval(d0), MkIntegerTerm(d1)); \ setregs(); \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); #define P_TIMES_VC_TIMES_VC_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is A* " Int_FORMAT, (*_PREG)->y_u.xxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is A* " Int_FORMAT, (*_PREG)->u.xxn.c); \ setregs(); \ FAIL(); @@ -724,10 +724,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxx.x1); + d0 = XREG((*_PREG)->u.yxx.x1); #define P_TIMES_Y_VV_TIMES_Y_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_TIMES_Y_VV_INTTERM \ d0 = times_int(IntOfTerm(d0), IntOfTerm(d1)); @@ -744,7 +744,7 @@ FAIL(); #define P_TIMES_Y_VV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxx.y; \ + pt0 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -766,12 +766,12 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); \ - Int d1 = (*_PREG)->y_u.yxn.c; + d0 = XREG((*_PREG)->u.yxn.xi); \ + Int d1 = (*_PREG)->u.yxn.c; #define P_TIMES_Y_VC_TIMES_Y_VC_NVAR_INT \ d0 = times_int(IntOfTerm(d0), d1); \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -780,20 +780,20 @@ saveregs(); \ d0 = p_times(Yap_Eval(d0), MkIntegerTerm(d1)); \ setregs(); \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); #define P_TIMES_Y_VC_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); #define P_TIMES_Y_VC_TIMES_Y_VC_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is A* " Int_FORMAT, (*_PREG)->y_u.yxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is A* " Int_FORMAT, (*_PREG)->u.yxn.c); \ setregs(); \ FAIL(); @@ -802,10 +802,10 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxx.x1); + d0 = XREG((*_PREG)->u.xxx.x1); #define P_DIV_VV_DIV_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_DIV_VV_DIV_VV_NVAR_NVAR_INT \ BLOCK = (CELL)P_DIV_VV_DIV_VV_NVAR_NVAR_INT; \ @@ -820,7 +820,7 @@ } \ else { \ d0 = MkIntTerm(IntOfTerm(d0) / div); \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); \ } @@ -829,7 +829,7 @@ saveregs(); \ d0 = p_div(Yap_Eval(d0), Yap_Eval(d1)); \ setregs(); \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -849,10 +849,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); + d0 = XREG((*_PREG)->u.xxn.xi); #define P_DIV_VC_DIV_VC_NVAR \ - Int d1 = (*_PREG)->y_u.xxn.c; + Int d1 = (*_PREG)->u.xxn.c; #define P_DIV_VC_INTTERM \ d0 = MkIntTerm(IntOfTerm(d0) / d1); @@ -869,7 +869,7 @@ FAIL(); #define P_DIV_VC_NVAR_END \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); @@ -883,10 +883,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); + d0 = XREG((*_PREG)->u.xxn.xi); #define P_DIV_CV_DIV_CV_NVAR \ - Int d1 = (*_PREG)->y_u.xxn.c; + Int d1 = (*_PREG)->u.xxn.c; #define P_DIV_CV_INTTERM_INIT \ Int div = IntOfTerm(d0); @@ -911,13 +911,13 @@ FAIL(); #define P_DIV_CV_NVAR_END \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); #define P_DIV_CV_DIV_CV_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "// A", (*_PREG)->y_u.xxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "// A", (*_PREG)->u.xxn.c); \ setregs(); \ FAIL(); @@ -925,10 +925,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxx.x1); + d0 = XREG((*_PREG)->u.yxx.x1); #define P_DIV_Y_VV_DIV_Y_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_DIV_Y_VV_INTTERM_INIT \ Int div = IntOfTerm(d1); @@ -954,7 +954,7 @@ FAIL(); #define P_DIV_Y_VV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxx.y; \ + pt0 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -975,10 +975,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); + d0 = XREG((*_PREG)->u.yxn.xi); #define P_DIV_Y_VC_DIV_Y_VC_NVAR \ - Int d1 = (*_PREG)->y_u.yxn.c; + Int d1 = (*_PREG)->u.yxn.c; #define P_DIV_Y_VC_INTTERM \ d0 = MkIntTerm(IntOfTerm(d0)/d1); @@ -995,7 +995,7 @@ FAIL(); #define P_DIV_Y_VC_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -1010,10 +1010,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); + d0 = XREG((*_PREG)->u.yxn.xi); #define P_DIV_Y_CV_DIV_Y_CV_NVAR \ - Int d1 = (*_PREG)->y_u.yxn.c; + Int d1 = (*_PREG)->u.yxn.c; #define P_DIV_Y_CV_INTTERM_INIT \ Int div = IntOfTerm(d0); @@ -1039,14 +1039,14 @@ FAIL(); #define P_DIV_Y_CV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); #define P_DIV_Y_CV_DIV_Y_CV_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "// A", (*_PREG)->y_u.yxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is " Int_FORMAT "// A", (*_PREG)->u.yxn.c); \ setregs(); \ FAIL(); @@ -1055,15 +1055,15 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxx.x1); + d0 = XREG((*_PREG)->u.xxx.x1); #define P_AND_VV_AND_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_AND_VV_AND_VV_NVAR_NVAR_INT \ if (!IsIntTerm(d0) || !IsIntTerm(d1)) { BACK(); } \ d0 = MkIntegerTerm(IntOfTerm(d0) & IntOfTerm(d1)); \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -1071,7 +1071,7 @@ saveregs(); \ d0 = p_and(Yap_Eval(d0), Yap_Eval(d1)); \ setregs(); \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -1092,12 +1092,12 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); \ - Int d1 = (*_PREG)->y_u.xxn.c; + d0 = XREG((*_PREG)->u.xxn.xi); \ + Int d1 = (*_PREG)->u.xxn.c; #define P_AND_VC_AND_VC_NVAR_INT \ d0 = MkIntegerTerm(IntOfTerm(d0) & d1); \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); @@ -1105,13 +1105,13 @@ saveregs(); \ d0 = p_and(Yap_Eval(d0), MkIntegerTerm(d1)); \ setregs(); \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); #define P_AND_VC_AND_VC_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is A /\\ " Int_FORMAT , (*_PREG)->y_u.xxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is A /\\ " Int_FORMAT , (*_PREG)->u.xxn.c); \ setregs(); \ FAIL(); @@ -1119,10 +1119,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxx.x1); + d0 = XREG((*_PREG)->u.yxx.x1); #define P_AND_Y_VV_AND_Y_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_AND_Y_VV_INTTERM \ d0 = MkIntegerTerm(IntOfTerm(d0) & IntOfTerm(d1)); @@ -1139,7 +1139,7 @@ FAIL(); #define P_AND_Y_VV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxx.y; \ + pt0 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -1160,10 +1160,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); + d0 = XREG((*_PREG)->u.yxn.xi); #define P_AND_Y_VC_AND_Y_VC_NVAR \ - Int d1 = (*_PREG)->y_u.yxn.c; + Int d1 = (*_PREG)->u.yxn.c; #define P_AND_Y_VC_INTTERM \ d0 = MkIntegerTerm(IntOfTerm(d0) & d1); @@ -1180,14 +1180,14 @@ FAIL(); #define P_AND_Y_VC_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); #define P_AND_Y_VC_AND_Y_VC_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is A /\\ " Int_FORMAT , (*_PREG)->y_u.yxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is A /\\ " Int_FORMAT , (*_PREG)->u.yxn.c); \ setregs(); \ FAIL(); @@ -1195,10 +1195,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxx.x1); + d0 = XREG((*_PREG)->u.xxx.x1); #define P_OR_VV_OR_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_OR_VV_INTTERM \ d0 = MkIntegerTerm(IntOfTerm(d0) | IntOfTerm(d1)); @@ -1215,7 +1215,7 @@ FAIL(); #define P_OR_VV_NVAR_END \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -1235,10 +1235,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); + d0 = XREG((*_PREG)->u.xxn.xi); #define P_OR_VC_OR_VC_NVAR \ - Int d1 = (*_PREG)->y_u.xxn.c; + Int d1 = (*_PREG)->u.xxn.c; #define P_OR_VC_INTTERM \ d0 = MkIntegerTerm(IntOfTerm(d0) | d1); @@ -1254,13 +1254,13 @@ FAIL(); #define P_OR_VC_NVAR_END \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); #define P_OR_VC_OR_VC_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is A \\/ " Int_FORMAT , (*_PREG)->y_u.xxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is A \\/ " Int_FORMAT , (*_PREG)->u.xxn.c); \ setregs(); \ FAIL(); @@ -1268,10 +1268,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxx.x1); + d0 = XREG((*_PREG)->u.yxx.x1); #define P_OR_Y_VV_OR_Y_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_OR_Y_VV_INTTERM \ d0 = MkIntegerTerm(IntOfTerm(d0) | IntOfTerm(d1)); @@ -1288,7 +1288,7 @@ FAIL(); #define P_OR_Y_VV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxx.y; \ + pt0 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -1309,10 +1309,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); + d0 = XREG((*_PREG)->u.yxn.xi); #define P_OR_Y_VC_OR_Y_VC_NVAR \ - Int d1 = (*_PREG)->y_u.yxn.c; + Int d1 = (*_PREG)->u.yxn.c; #define P_OR_Y_VC_INTTERM \ d0 = MkIntegerTerm(IntOfTerm(d0) | d1); @@ -1329,14 +1329,14 @@ FAIL(); #define P_OR_Y_VC_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); #define P_OR_Y_VC_OR_Y_VC_UNK \ saveregs(); \ - Yap_NilError(INSTANTIATION_ERROR, "X is A \\/ " Int_FORMAT , (*_PREG)->y_u.yxn.c); \ + Yap_NilError(INSTANTIATION_ERROR, "X is A \\/ " Int_FORMAT , (*_PREG)->u.yxn.c); \ setregs(); \ FAIL(); @@ -1344,10 +1344,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxx.x1); + d0 = XREG((*_PREG)->u.xxx.x1); #define P_SLL_VV_SLL_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_SLL_VV_INTTERM_INIT \ Int i2 = IntOfTerm(d1); @@ -1370,7 +1370,7 @@ FAIL(); #define P_SLL_VV_NVAR_END \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -1390,10 +1390,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); + d0 = XREG((*_PREG)->u.xxn.xi); #define P_SLL_VC_SLL_VC_NVAR \ - Int d1 = (*_PREG)->y_u.xxn.c; + Int d1 = (*_PREG)->u.xxn.c; #define P_SLL_VC_INTTERM \ d0 = do_sll(IntOfTerm(d0), (Int)d1); @@ -1410,7 +1410,7 @@ FAIL(); #define P_SLL_VC_NVAR_END \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); @@ -1425,8 +1425,8 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); \ - Int d1 = (*_PREG)->y_u.xxn.c; + d0 = XREG((*_PREG)->u.xxn.xi); \ + Int d1 = (*_PREG)->u.xxn.c; #define P_SLL_CV_SLL_CV_NVAR_INT \ Int i2 = IntOfTerm(d0); \ @@ -1435,7 +1435,7 @@ } else { \ d0 = do_sll(d1,i2); \ } \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); @@ -1443,7 +1443,7 @@ saveregs(); \ d0 = p_sll(MkIntegerTerm(d1), Yap_Eval(d0)); \ setregs(); \ - XREG((*_PREG->y_u.xxn.x) = d0; \ + XREG((*_PREG->u.xxn.x) = d0; \ (*_PREG = NEXTOP((*_PREG, xxn); \ GONext(); @@ -1457,10 +1457,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxx.x1); + d0 = XREG((*_PREG)->u.yxx.x1); #define P_SLL_Y_VV_SLL_Y_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_SLL_Y_VV_INTTERM_INIT \ Int i2 = IntOfTerm(d1); @@ -1483,7 +1483,7 @@ FAIL(); #define P_SLL_Y_VV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxx.y; \ + pt0 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -1504,10 +1504,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); + d0 = XREG((*_PREG)->u.yxn.xi); #define P_SLL_Y_VC_SLL_Y_VC_NVAR \ - Int d1 = (*_PREG)->y_u.yxn.c; + Int d1 = (*_PREG)->u.yxn.c; #define P_SLL_Y_VC_INTTERM \ d0 = do_sll(IntOfTerm(d0), Yap_Eval(d1)); @@ -1524,7 +1524,7 @@ FAIL(); #define P_SLL_Y_VC_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -1539,10 +1539,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); + d0 = XREG((*_PREG)->u.yxn.xi); #define P_SLL_Y_CV_SLL_Y_CV_NVAR \ - Int d1 = (*_PREG)->y_u.yxn.c; + Int d1 = (*_PREG)->u.yxn.c; #define P_SLL_Y_CV_INTTERM_INIT \ Int i2 = IntOfTerm(d0); @@ -1565,7 +1565,7 @@ FAIL(); #define P_SLL_Y_CV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -1580,10 +1580,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxx.x1); + d0 = XREG((*_PREG)->u.xxx.x1); #define P_SLR_VV_SLR_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_SLR_VV_INTTERM_INIT \ Int i2 = IntOfTerm(d1); @@ -1606,7 +1606,7 @@ FAIL(); #define P_SLR_VV_NVAR_END \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -1627,12 +1627,12 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); \ - Int d1 = (*_PREG)->y_u.xxn.c; + d0 = XREG((*_PREG)->u.xxn.xi); \ + Int d1 = (*_PREG)->u.xxn.c; #define P_SLR_VC_SLR_VC_NVAR_INT \ d0 = MkIntTerm(SLR(IntOfTerm(d0), d1)); \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); @@ -1640,7 +1640,7 @@ saveregs(); \ d0 = p_slr(Yap_Eval(d0), MkIntegerTerm(d1)); \ setregs(); \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); @@ -1654,10 +1654,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); + d0 = XREG((*_PREG)->u.xxn.xi); #define P_SLR_CV_SLR_CV_NVAR \ - Int d1 = (*_PREG)->y_u.xxn.c; + Int d1 = (*_PREG)->u.xxn.c; #define P_SLR_CV_INTTERM_INIT \ Int i2 = IntOfTerm(d0); @@ -1680,7 +1680,7 @@ FAIL(); #define P_SLR_CV_NVAR_END \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); @@ -1694,10 +1694,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0, d1; \ register CELL8 pt0; \ - d0 = XREG((*_PREG)->y_u.yxx.x1); + d0 = XREG((*_PREG)->u.yxx.x1); #define P_SLR_Y_VV_SLR_Y_VV_NVAR \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_SLR_Y_VV_INTTERM_INIT \ Int i2 = IntOfTerm(d1); @@ -1720,7 +1720,7 @@ FAIL(); #define P_SLR_Y_VV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxx.y; \ + pt0 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -1741,10 +1741,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL8 pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); + d0 = XREG((*_PREG)->u.yxn.xi); #define P_SLR_Y_VC_SLR_Y_VC_NVAR \ - Int d1 = (*_PREG)->y_u.yxn.c; + Int d1 = (*_PREG)->u.yxn.c; #define P_SLR_Y_VC_INTTERM \ d0 = MkIntTerm(SLR(IntOfTerm(d0), d1)); @@ -1761,7 +1761,7 @@ FAIL(); #define P_SLR_Y_VC_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -1775,10 +1775,10 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); + d0 = XREG((*_PREG)->u.yxn.xi); #define P_SLR_Y_CV_SLR_Y_CV_NVAR \ - Int d1 = (*_PREG)->y_u.yxn.c; + Int d1 = (*_PREG)->u.yxn.c; #define P_SLR_Y_CV_INTTERM_INIT \ Int i2 = IntOfTerm(d0); @@ -1801,7 +1801,7 @@ FAIL(); #define P_SLR_Y_CV_NVAR_END \ - pt0 = YREG + (*_PREG)->y_u.yxn.y; \ + pt0 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt0,d0); \ GONext(); @@ -1817,17 +1817,17 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL* pt0; \ - d0 = XREG((*_PREG)->y_u.plxxs.x1); + d0 = XREG((*_PREG)->u.plxxs.x1); #define CALL_BFUNC_XX_CALL_BFUNC_XX_NVAR \ - d1 = XREG((*_PREG)->y_u.plxxs.x2); + d1 = XREG((*_PREG)->u.plxxs.x2); #define CALL_BFUNC_XX_CALL_BFUNC_XX2_NVAR_INT \ BLOCK = (CELL)CALL_BFUNC_XX_CALL_BFUNC_XX2_NVAR_INT; \ if (IsIntTerm(d0) && IsIntTerm(d1)) { \ COUNT flags; \ Int v = IntOfTerm(d0) - IntOfTerm(d1); \ - flags = (*_PREG)->y_u.plxxs.flags; \ + flags = (*_PREG)->u.plxxs.flags; \ if (v > 0) { \ if (flags & GT_OK_IN_CMP) { \ yamop *nextp = NEXTOP((*_PREG), plxxs); \ @@ -1835,7 +1835,7 @@ ALWAYS_GONext(); \ } \ else { \ - yamop *nextp = (*_PREG)->y_u.plxxs.f; \ + yamop *nextp = (*_PREG)->u.plxxs.f; \ (*_PREG) = nextp; \ ALWAYS_GONext(); \ } \ @@ -1847,7 +1847,7 @@ ALWAYS_GONext(); \ } \ else { \ - yamop *nextp = (*_PREG)->y_u.plxxs.f; \ + yamop *nextp = (*_PREG)->u.plxxs.f; \ (*_PREG) = nextp; \ ALWAYS_GONext(); \ } \ @@ -1859,7 +1859,7 @@ ALWAYS_GONext(); \ } \ else { \ - yamop *nextp = (*_PREG)->y_u.plxxs.f; \ + yamop *nextp = (*_PREG)->u.plxxs.f; \ (*_PREG) = nextp; \ ALWAYS_GONext(); \ } \ @@ -1868,7 +1868,7 @@ #define CALL_BFUNC_XX_CALL_BFUNC_XX2_NVAR_NOINT \ BLOCK = (CELL)CALL_BFUNC_XX_CALL_BFUNC_XX2_NVAR_NOINT; \ - CmpPredicate f = (*_PREG)->y_u.plxxs.p->cs.d_code; \ + CmpPredicate f = (*_PREG)->u.plxxs.p->cs.d_code; \ saveregs(); \ d0 = (CELL) (f) (d0,d1); \ setregs(); \ @@ -1876,7 +1876,7 @@ JMPNext(); \ } \ else if (!d0) { \ - (*_PREG) = (*_PREG)->y_u.plxxs.f; \ + (*_PREG) = (*_PREG)->u.plxxs.f; \ JMPNext(); \ } \ else { \ @@ -1892,8 +1892,8 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0; \ - pt0 = YREG + (*_PREG)->y_u.plxys.y; \ - d1 = XREG((*_PREG)->y_u.plxys.x); \ + pt0 = YREG + (*_PREG)->u.plxys.y; \ + d1 = XREG((*_PREG)->u.plxys.x); \ d0 = *pt0; #define CALL_BFUNC_YX_CALL_BFUNC_YX2_NVAR_INT \ @@ -1901,13 +1901,13 @@ if (IsIntTerm(d0) && IsIntTerm(d1)) { \ int flags; \ Int v = IntOfTerm(d0) - IntOfTerm(d1); \ - flags = (*_PREG)->y_u.plxys.flags; \ + flags = (*_PREG)->u.plxys.flags; \ if (v > 0) { \ if (flags & GT_OK_IN_CMP) { \ (*_PREG) = NEXTOP((*_PREG), plxys); \ JMPNext(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ JMPNext(); \ } \ } else if (v < 0) { \ @@ -1915,7 +1915,7 @@ (*_PREG) = NEXTOP((*_PREG), plxys); \ JMPNext(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ JMPNext(); \ } \ } else { \ @@ -1923,7 +1923,7 @@ (*_PREG) = NEXTOP((*_PREG), plxys); \ JMPNext(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ JMPNext(); \ } \ } \ @@ -1931,13 +1931,13 @@ #define CALL_BFUNC_YX_CALL_BFUNC_YX2_NVAR_NOINT \ BLOCK = (CELL)CALL_BFUNC_YX_CALL_BFUNC_YX2_NVAR_NOINT; \ - CmpPredicate f = (*_PREG)->y_u.plxys.p->cs.d_code; \ + CmpPredicate f = (*_PREG)->u.plxys.p->cs.d_code; \ saveregs(); \ d0 = (CELL) (f) (d0,d1); \ setregs(); \ if (!d0 || (*_PREG) == FAILCODE) { \ if ((*_PREG) != FAILCODE) { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ } \ JMPNext(); \ } \ @@ -1954,8 +1954,8 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0; \ - pt0 = YREG + (*_PREG)->y_u.plxys.y; \ - d0 = XREG((*_PREG)->y_u.plxys.x); \ + pt0 = YREG + (*_PREG)->u.plxys.y; \ + d0 = XREG((*_PREG)->u.plxys.x); \ d1 = *pt0; #define CALL_BFUNC_XY_CALL_BFUNC_XY2_NVAR_INT \ @@ -1963,13 +1963,13 @@ if (IsIntTerm(d0) && IsIntTerm(d1)) { \ int flags; \ Int v = IntOfTerm(d0) - IntOfTerm(d1); \ - flags = (*_PREG)->y_u.plxys.flags; \ + flags = (*_PREG)->u.plxys.flags; \ if (v > 0) { \ if (flags & GT_OK_IN_CMP) { \ (*_PREG) = NEXTOP((*_PREG), plxys); \ JMPNext(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ JMPNext(); \ } \ } else if (v < 0) { \ @@ -1977,7 +1977,7 @@ (*_PREG) = NEXTOP((*_PREG), plxys); \ JMPNext(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ JMPNext(); \ } \ } else { \ @@ -1985,7 +1985,7 @@ (*_PREG) = NEXTOP((*_PREG), plxys); \ JMPNext(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ JMPNext(); \ } \ } \ @@ -1993,13 +1993,13 @@ #define CALL_BFUNC_XY_CALL_BFUNC_XY2_NVAR_NOINT \ BLOCK = (CELL)CALL_BFUNC_XY_CALL_BFUNC_XY2_NVAR_NOINT; \ - CmpPredicate f = (*_PREG)->y_u.plxys.p->cs.d_code; \ + CmpPredicate f = (*_PREG)->u.plxys.p->cs.d_code; \ saveregs(); \ d0 = (CELL) (f) (d0,d1); \ setregs(); \ if (!d0 || (*_PREG) == FAILCODE) { \ if ((*_PREG) != FAILCODE) { \ - (*_PREG) = (*_PREG)->y_u.plxys.f; \ + (*_PREG) = (*_PREG)->u.plxys.f; \ } \ JMPNext(); \ } \ @@ -2016,8 +2016,8 @@ BLOCKADDRESS = (CELL)(*_PREG); \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - pt0 = YREG + (*_PREG)->y_u.plyys.y1; \ - pt1 = YREG + (*_PREG)->y_u.plyys.y2; \ + pt0 = YREG + (*_PREG)->u.plyys.y1; \ + pt1 = YREG + (*_PREG)->u.plyys.y2; \ d0 = *pt0; \ d1 = *pt1; @@ -2026,13 +2026,13 @@ if (IsIntTerm(d0) && IsIntTerm(d1)) { \ int flags; \ Int v = IntOfTerm(d0) - IntOfTerm(d1); \ - flags = (*_PREG)->y_u.plyys.flags; \ + flags = (*_PREG)->u.plyys.flags; \ if (v > 0) { \ if (flags & GT_OK_IN_CMP) { \ (*_PREG) = NEXTOP((*_PREG), plyys); \ JMPNext(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plyys.f; \ + (*_PREG) = (*_PREG)->u.plyys.f; \ JMPNext(); \ } \ } else if (v < 0) { \ @@ -2040,7 +2040,7 @@ (*_PREG) = NEXTOP((*_PREG), plyys); \ JMPNext(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plyys.f; \ + (*_PREG) = (*_PREG)->u.plyys.f; \ JMPNext(); \ } \ } else { \ @@ -2048,7 +2048,7 @@ (*_PREG) = NEXTOP((*_PREG), plyys); \ JMPNext(); \ } else { \ - (*_PREG) = (*_PREG)->y_u.plyys.f; \ + (*_PREG) = (*_PREG)->u.plyys.f; \ JMPNext(); \ } \ } \ @@ -2056,13 +2056,13 @@ #define CALL_BFUNC_YY_CALL_BFUNC_YY2_NVAR_NOINT \ BLOCK = (CELL)CALL_BFUNC_YY_CALL_BFUNC_YY2_NVAR_NOINT; \ - CmpPredicate f = (*_PREG)->y_u.plyys.p->cs.d_code; \ + CmpPredicate f = (*_PREG)->u.plyys.p->cs.d_code; \ saveregs(); \ d0 = (CELL) (f) (d0,d1); \ setregs(); \ if (!d0 || (*_PREG) == FAILCODE) { \ if ((*_PREG) != FAILCODE) { \ - (*_PREG) = (*_PREG)->y_u.plyys.f; \ + (*_PREG) = (*_PREG)->u.plyys.f; \ } \ JMPNext(); \ } \ @@ -2072,7 +2072,7 @@ } #define CALL_BFUNC_YY_NOINTTERM_NOFAILCODE \ - (*_PREG) = (*_PREG)->y_u.plyys.f; + (*_PREG) = (*_PREG)->u.plyys.f; #define CALL_BFUNC_YY_NOINTTERM_NOD0 \ JMPNext(); @@ -2102,16 +2102,16 @@ #ifdef LOW_LEVEL_TRACER #define P_ARG_VV_LOW_LEVEL_TRACER \ - HR[0] = XREG((*_PREG)->y_u.xxx.x1); \ - HR[1] = XREG((*_PREG)->y_u.xxx.x2); \ + H[0] = XREG((*_PREG)->u.xxx.x1); \ + H[1] = XREG((*_PREG)->u.xxx.x2); \ RESET_VARIABLE(HR+2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),H); #endif #define P_ARG_VV_TEST_D0 \ register CELL d0, d1; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.xxx.x1); + d0 = XREG((*_PREG)->u.xxx.x1); #define P_ARG_VV_ARG_ARG1_NVAR \ FAILED = 0; \ @@ -2128,7 +2128,7 @@ #define P_ARG_VV_TEST_D1 \ if (!FAILED) { \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_ARG_VV_ARG_ARG2_NVAR \ BLOCK = (CELL)P_ARG_VV_ARG_ARG2_NVAR; \ @@ -2143,7 +2143,7 @@ YAAM_FAIL; \ } \ else { \ - XREG((*_PREG)->y_u.xxx.x) = pt0[d0]; \ + XREG((*_PREG)->u.xxx.x) = pt0[d0]; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); \ } \ @@ -2160,7 +2160,7 @@ YAAM_FAIL; \ } \ else { \ - XREG((*_PREG)->y_u.xxx.x) = pt0[d0-1]; \ + XREG((*_PREG)->u.xxx.x) = pt0[d0-1]; \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); \ } \ @@ -2189,19 +2189,19 @@ #ifdef LOW_LEVEL_TRACER #define P_ARG_CV_LOW_LEVEL_TRACER \ CELL *Ho = HR; \ - Term t = MkIntegerTerm((*_PREG)->y_u.xxn.c); \ - HR[0] = t; \ - HR[1] = XREG((*_PREG)->y_u.xxn.xi); \ + Term t = MkIntegerTerm((*_PREG)->u.xxn.c); \ + H[0] = t; \ + H[1] = XREG((*_PREG)->u.xxn.xi); \ RESET_VARIABLE(HR+2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); \ - HR = Ho; + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),H); \ + H = HRo; #endif #define P_ARG_CV_TEST_D1 \ register CELL d0, d1; \ register CELL *pt0; \ - d0 = (*_PREG)->y_u.xxn.c; \ - d1 = XREG((*_PREG)->y_u.xxn.xi); + d0 = (*_PREG)->u.xxn.c; \ + d1 = XREG((*_PREG)->u.xxn.xi); #define P_ARG_CV_ARG_ARG2_VC_NVAR \ BLOCK = (CELL)P_ARG_CV_ARG_ARG2_VC_NVAR; \ @@ -2217,7 +2217,7 @@ YAAM_FAIL; \ } \ else { \ - XREG((*_PREG)->y_u.xxn.x) = pt0[d0]; \ + XREG((*_PREG)->u.xxn.x) = pt0[d0]; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); \ } \ @@ -2234,7 +2234,7 @@ YAAM_FAIL; \ } \ else { \ - XREG((*_PREG)->y_u.xxn.x) = pt0[d0-1]; \ + XREG((*_PREG)->u.xxn.x) = pt0[d0-1]; \ (*_PREG) = NEXTOP((*_PREG), xxn); \ GONext(); \ } \ @@ -2255,17 +2255,17 @@ #ifdef LOW_LEVEL_TRACER #define P_ARG_Y_VV_LOW_LEVEL_TRACER \ - HR[0] = XREG((*_PREG)->y_u.yxx.x1); \ - HR[1] = XREG((*_PREG)->y_u.yxx.x2); \ - HR[2] = YREG[(*_PREG)->y_u.yxx.y]; \ + H[0] = XREG((*_PREG)->u.yxx.x1); \ + H[1] = XREG((*_PREG)->u.yxx.x2); \ + H[2] = YREG[(*_PREG)->u.yxx.y]; \ RESET_VARIABLE(HR+2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),H); #endif #define P_ARG_Y_VV_TEST_D0 \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.yxx.x1); + d0 = XREG((*_PREG)->u.yxx.x1); #define P_ARG_Y_VV_ARG_Y_ARG1_NVAR \ FAILED = 0; \ @@ -2282,7 +2282,7 @@ #define P_ARG_Y_VV_TEST_D1 \ if (!FAILED) { \ - d1 = XREG((*_PREG)->y_u.yxx.x2); + d1 = XREG((*_PREG)->u.yxx.x2); #define P_ARG_Y_VV_ARG_Y_ARG2_NVAR \ BLOCK = (CELL)P_ARG_Y_VV_ARG_Y_ARG2_NVAR; \ @@ -2297,7 +2297,7 @@ YAAM_FAIL; \ } \ else { \ - pt1 = YREG + (*_PREG)->y_u.yxx.y; \ + pt1 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt1,pt0[d0]); \ GONext(); \ @@ -2315,7 +2315,7 @@ YAAM_FAIL; \ } \ else { \ - pt1 = YREG + (*_PREG)->y_u.yxx.y; \ + pt1 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt1,pt0[d0-1]); \ GONext(); \ @@ -2344,27 +2344,27 @@ #ifdef LOW_LEVEL_TRACER #define P_ARG_Y_CV_LOW_LEVEL_TRACER \ CELL *Ho = HR; \ - Term t = MkIntegerTerm((*_PREG)->y_u.yxn.c); \ - HR[0] = t; \ - HR[1] = XREG((*_PREG)->y_u.yxn.xi); \ - HR[2] = YREG[(*_PREG)->y_u.yxn.y]; \ + Term t = MkIntegerTerm((*_PREG)->u.yxn.c); \ + H[0] = t; \ + H[1] = XREG((*_PREG)->u.yxn.xi); \ + H[2] = YREG[(*_PREG)->u.yxn.y]; \ RESET_VARIABLE(HR+2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),HR); \ - HR = Ho; + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorArg,0)),H); \ + H = HRo; #endif #define P_ARG_Y_CV_TEST_D1 \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = (*_PREG)->y_u.yxn.c; \ - d1 = XREG((*_PREG)->y_u.yxn.xi); + d0 = (*_PREG)->u.yxn.c; \ + d1 = XREG((*_PREG)->u.yxn.xi); #define P_ARG_Y_CV_D1APPL_INIT \ pt0 = RepAppl(d1); \ d1 = *pt0; #define P_ARG_Y_CV_D1APPL_END \ - pt1 = YREG + (*_PREG)->y_u.yxn.y; \ + pt1 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt1,pt0[d0]); \ GONext(); @@ -2379,7 +2379,7 @@ setregs(); #define P_ARG_Y_CV_D1PAIR_END \ - pt1 = YREG + (*_PREG)->y_u.yxn.y; \ + pt1 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP((*_PREG), yxn); \ INITIALIZE_PERMVAR(pt1,pt0[d0-1]); \ GONext(); @@ -2395,18 +2395,18 @@ #ifdef LOW_LEVEL_TRACER #define P_FUNC2S_VV_LOW_LEVEL_TRACER \ RESET_VARIABLE(HR); \ - HR[1] = XREG((*_PREG)->y_u.xxx.x1); \ - HR[2] = XREG((*_PREG)->y_u.xxx.x2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + H[1] = XREG((*_PREG)->u.xxx.x1); \ + H[2] = XREG((*_PREG)->u.xxx.x2); \ + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),H); #endif #define P_FUNC2S_TEST_D0 \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.xxx.x1); + d0 = XREG((*_PREG)->u.xxx.x1); #define P_FUNC2S_VV_TEST_D1 \ - d1 = XREG((*_PREG)->y_u.xxx.x2); + d1 = XREG((*_PREG)->u.xxx.x2); #define P_FUNC2S_VV_D1INT \ d1 = IntegerOfTerm(d1); @@ -2434,8 +2434,8 @@ RESET_VARIABLE(HR); \ RESET_VARIABLE(HR+1); \ d0 = AbsPair(HR); \ - HR += 2; \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + H += 2; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xxx),Osbpp),l); \ GONext(); @@ -2469,13 +2469,13 @@ pt1++; #define P_FUNC2S_VV_SECONDIFOK_END \ - HR = pt1; \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + H = pt1; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xxx),Osbpp),l); \ GONext(); #define P_FUNC2S_VV_THIRDIFOK \ - XREG((*_PREG)->y_u.xxx.x) = d0; \ + XREG((*_PREG)->u.xxx.x) = d0; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xxx),Osbpp),l); \ GONext(); @@ -2503,16 +2503,16 @@ #ifdef LOW_LEVEL_TRACER #define P_FUNC2S_CV_LOW_LEVEL_TRACER \ RESET_VARIABLE(HR); \ - HR[1] = (*_PREG)->y_u.xxc.c; \ - HR[2] = XREG((*_PREG)->y_u.xxc.xi); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + H[1] = (*_PREG)->u.xxc.c; \ + H[2] = XREG((*_PREG)->u.xxc.xi); \ + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),H); #endif #define P_FUNC2S_CV_TEST_D1 \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = (*_PREG)->y_u.xxc.c; \ - d1 = XREG((*_PREG)->y_u.xxc.xi); + d0 = (*_PREG)->u.xxc.c; \ + d1 = XREG((*_PREG)->u.xxc.xi); #define P_FUNC2S_CV_D1INT \ d1 = IntegerOfTerm(d1); @@ -2534,8 +2534,8 @@ RESET_VARIABLE(HR); \ RESET_VARIABLE(HR+1); \ d0 = AbsPair(HR); \ - HR += 2; \ - XREG((*_PREG)->y_u.xxc.x) = d0; \ + H += 2; \ + XREG((*_PREG)->u.xxc.x) = d0; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xxc),Osbpp),l); \ GONext(); @@ -2569,13 +2569,13 @@ pt1++; #define P_FUNC2S_CV_D1GREATER_END \ - HR = pt1; \ - XREG((*_PREG)->y_u.xxc.x) = d0; \ + H = pt1; \ + XREG((*_PREG)->u.xxc.x) = d0; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xxc),Osbpp),l); \ GONext(); #define P_FUNC2S_CV_D1ISZERO \ - XREG((*_PREG)->y_u.xxc.x) = d0; \ + XREG((*_PREG)->u.xxc.x) = d0; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xxc),Osbpp),l); \ GONext(); @@ -2598,21 +2598,21 @@ #define P_FUNC2S_VC_LOW_LEVEL_TRACER \ Term ti; \ CELL *hi = HR; \ - ti = MkIntegerTerm((*_PREG)->y_u.xxn.c); \ + ti = MkIntegerTerm((*_PREG)->u.xxn.c); \ RESET_VARIABLE(HR); \ - HR[1] = XREG((*_PREG)->y_u.xxn.xi); \ - HR[2] = ti; \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); \ - HR = hi; + H[1] = XREG((*_PREG)->u.xxn.xi); \ + H[2] = ti; \ + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),H); \ + H = hi; #endif #define P_FUNC2S_VC_TEST_D0 \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.xxn.xi); + d0 = XREG((*_PREG)->u.xxn.xi); #define P_FUNC2S_VC_FUNC2S_NVAR_VC \ - d1 = (*_PREG)->y_u.xxn.c; + d1 = (*_PREG)->u.xxn.c; #define P_FUNC2S_VC_D0NOATOMIC \ saveregs(); \ @@ -2624,13 +2624,13 @@ RESET_VARIABLE(HR); \ RESET_VARIABLE(HR+1); \ d0 = AbsPair(HR); \ - HR += 2; \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + H += 2; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xxn),Osbpp),l); \ GONext(); #define P_FUNC2S_VC_D1ISZERO \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xxn),Osbpp),l); \ GONext(); @@ -2665,7 +2665,7 @@ #define P_FUNC2S_VC_END1 \ HR = pt1; \ - XREG((*_PREG)->y_u.xxn.x) = d0; \ + XREG((*_PREG)->u.xxn.x) = d0; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), xxn),Osbpp),l); \ GONext(); @@ -2681,18 +2681,18 @@ #ifdef LOW_LEVEL_TRACER #define P_FUNC2S_Y_VV_LOW_LEVEL_TRACER \ RESET_VARIABLE(HR); \ - HR[1] = XREG((*_PREG)->y_u.yxx.x1); \ - HR[2] = XREG((*_PREG)->y_u.yxx.x2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + H[1] = XREG((*_PREG)->u.yxx.x1); \ + H[2] = XREG((*_PREG)->u.yxx.x2); \ + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),H); #endif #define P_FUNC2S_Y_VV_TEST_D0 \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.yxx.x1); + d0 = XREG((*_PREG)->u.yxx.x1); #define P_FUNC2S_Y_VV_TEST_D1 \ - d1 = XREG((*_PREG)->y_u.yxx.x2); + d1 = XREG((*_PREG)->u.yxx.x2); #define P_FUNC2S_Y_VV_D1INT \ d1 = IntegerOfTerm(d1); @@ -2720,8 +2720,8 @@ RESET_VARIABLE(HR); \ RESET_VARIABLE(HR+1); \ d0 = AbsPair(HR); \ - HR += 2; \ - pt1 = YREG + (*_PREG)->y_u.yxx.y; \ + H += 2; \ + pt1 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yxx),Osbpp),l); \ INITIALIZE_PERMVAR(pt1,d0); \ GONext(); @@ -2756,14 +2756,14 @@ pt1++; #define P_FUNC2S_Y_VV_D1GREATER_END \ - HR = pt1; \ - pt1 = YREG + (*_PREG)->y_u.yxx.y; \ + H = pt1; \ + pt1 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yxx),Osbpp),l); \ INITIALIZE_PERMVAR(pt1,d0); \ GONext(); #define P_FUNC2S_Y_VV_D1ISZERO \ - pt1 = YREG + (*_PREG)->y_u.yxx.y; \ + pt1 = YREG + (*_PREG)->u.yxx.y; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yxx),Osbpp),l); \ INITIALIZE_PERMVAR(pt1,d0); \ GONext(); @@ -2792,16 +2792,16 @@ #ifdef LOW_LEVEL_TRACER #define P_FUNC2S_Y_CV_LOW_LEVEL_TRACER \ RESET_VARIABLE(HR); \ - HR[1] = (*_PREG)->y_u.yxn.c; \ - HR[2] = XREG((*_PREG)->y_u.yxn.xi); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + H[1] = (*_PREG)->u.yxn.c; \ + H[2] = XREG((*_PREG)->u.yxn.xi); \ + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),H); #endif #define P_FUNC2S_Y_CV_TEST_D1 \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = (*_PREG)->y_u.yxn.c; \ - d1 = XREG((*_PREG)->y_u.yxn.xi); + d0 = (*_PREG)->u.yxn.c; \ + d1 = XREG((*_PREG)->u.yxn.xi); #define P_FUNC2S_Y_CV_D1INT \ d1 = IntegerOfTerm(d1); @@ -2823,8 +2823,8 @@ RESET_VARIABLE(HR); \ RESET_VARIABLE(HR+1); \ d0 = AbsPair(HR); \ - HR += 2; \ - pt1 = YREG + (*_PREG)->y_u.yxn.y; \ + H += 2; \ + pt1 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yxn),Osbpp),l); \ INITIALIZE_PERMVAR(pt1,d0); \ GONext(); @@ -2859,14 +2859,14 @@ pt1++; #define P_FUNC2S_Y_CV_D1GREATER_END \ - HR = pt1; \ - pt1 = YREG + (*_PREG)->y_u.yxn.y; \ + H = pt1; \ + pt1 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yxn),Osbpp),l); \ INITIALIZE_PERMVAR(pt1,d0); \ GONext(); #define P_FUNC2S_Y_CV_D1ISZERO \ - pt1 = YREG + (*_PREG)->y_u.yxn.y; \ + pt1 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yxn),Osbpp),l); \ INITIALIZE_PERMVAR(pt1,d0); \ GONext(); @@ -2890,21 +2890,21 @@ #define P_FUNC2S_Y_VC_LOW_LEVEL_TRACER \ Term ti; \ CELL *hi = HR; \ - ti = MkIntegerTerm((Int)((*_PREG)->y_u.yxn.c)); \ + ti = MkIntegerTerm((Int)((*_PREG)->u.yxn.c)); \ RESET_VARIABLE(HR); \ - HR[1] = XREG((*_PREG)->y_u.yxn.xi); \ - HR[2] = ti; \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); \ - HR = hi; + H[1] = XREG((*_PREG)->u.yxn.xi); \ + H[2] = ti; \ + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),H); \ + H = hi; #endif #define P_FUNC2S_Y_VC_TEST_D0 \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.yxn.xi); + d0 = XREG((*_PREG)->u.yxn.xi); #define P_FUNC2S_Y_VC_FUNC2S_Y_NVAR_VC \ - d1 = (*_PREG)->y_u.yxn.c; + d1 = (*_PREG)->u.yxn.c; #define P_FUNC2S_Y_VC_D0NOATOMIC \ saveregs(); \ @@ -2916,14 +2916,14 @@ RESET_VARIABLE(HR); \ RESET_VARIABLE(HR+1); \ d0 = AbsPair(HR); \ - HR += 2; \ - pt1 = YREG + (*_PREG)->y_u.yxn.y; \ + H += 2; \ + pt1 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yxn),Osbpp),l); \ INITIALIZE_PERMVAR(pt1,d0); \ GONext(); #define P_FUNC2S_Y_VC_D1ISZERO \ - pt1 = YREG + (*_PREG)->y_u.yxn.y; \ + pt1 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yxn),Osbpp),l); \ INITIALIZE_PERMVAR(pt1,d0); \ GONext(); @@ -2965,7 +2965,7 @@ #define P_FUNC2S_Y_VC_END1 \ HR = pt1; \ - pt1 = YREG + (*_PREG)->y_u.yxn.y; \ + pt1 = YREG + (*_PREG)->u.yxn.y; \ (*_PREG) = NEXTOP(NEXTOP(NEXTOP((*_PREG), yxn),Osbpp),l); \ INITIALIZE_PERMVAR(pt1,d0); \ GONext(); @@ -2981,42 +2981,42 @@ #ifdef LOW_LEVEL_TRACER #define P_FUNC2F_XX_LOW_LEVEL_TRACER \ - HR[0] = XREG((*_PREG)->y_u.xxx.x); \ + H[0] = XREG((*_PREG)->u.xxx.x); \ RESET_VARIABLE(HR+1); \ RESET_VARIABLE(HR+2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),H); #endif #define P_FUNC2F_XX_TEST_D0 \ register CELL d0; \ register CELL* pt1; \ - d0 = XREG((*_PREG)->y_u.xxx.x); + d0 = XREG((*_PREG)->u.xxx.x); #define P_FUNC2F_XX_D0APPL \ Functor d1 = FunctorOfTerm(d0); #define P_FUNC2F_XX_D0APPL_D1EXTFUNC \ - XREG((*_PREG)->y_u.xxx.x1) = d0; \ - XREG((*_PREG)->y_u.xxx.x2) = MkIntTerm(0); \ + XREG((*_PREG)->u.xxx.x1) = d0; \ + XREG((*_PREG)->u.xxx.x2) = MkIntTerm(0); \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); #define P_FUNC2F_XX_D0APPL_END \ - XREG((*_PREG)->y_u.xxx.x1) = MkAtomTerm(NameOfFunctor(d1)); \ - XREG((*_PREG)->y_u.xxx.x2) = MkIntegerTerm(ArityOfFunctor(d1)); \ + XREG((*_PREG)->u.xxx.x1) = MkAtomTerm(NameOfFunctor(d1)); \ + XREG((*_PREG)->u.xxx.x2) = MkIntegerTerm(ArityOfFunctor(d1)); \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); #define P_FUNC2F_XX_D0PAIR \ - XREG((*_PREG)->y_u.xxx.x1) = TermDot; \ - XREG((*_PREG)->y_u.xxx.x2) = MkIntTerm(2); \ + XREG((*_PREG)->u.xxx.x1) = TermDot; \ + XREG((*_PREG)->u.xxx.x2) = MkIntTerm(2); \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); #define P_FUNC2F_XX_D0NOCOMPOUND \ - XREG((*_PREG)->y_u.xxx.x1) = d0; \ - XREG((*_PREG)->y_u.xxx.x2) = MkIntTerm(0); \ + XREG((*_PREG)->u.xxx.x1) = d0; \ + XREG((*_PREG)->u.xxx.x2) = MkIntTerm(0); \ (*_PREG) = NEXTOP((*_PREG), xxx); \ GONext(); @@ -3031,43 +3031,43 @@ #ifdef LOW_LEVEL_TRACER #define P_FUNC2F_XY_LOW_LEVEL_TRACER \ - HR[0] = XREG((*_PREG)->y_u.xxy.x); \ + H[0] = XREG((*_PREG)->u.xxy.x); \ RESET_VARIABLE(HR+1); \ RESET_VARIABLE(HR+2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),H); #endif #define P_FUNC2F_XY_TEST_D0 \ register CELL d0; \ register CELL *pt1; \ - d0 = XREG((*_PREG)->y_u.xxy.x); + d0 = XREG((*_PREG)->u.xxy.x); #define P_FUNC2F_XY_D0APPL \ Functor d1 = FunctorOfTerm(d0); \ - CELL *pt0 = YREG+(*_PREG)->y_u.xxy.y2; + CELL *pt0 = YREG+(*_PREG)->u.xxy.y2; #define P_FUNC2F_XY_D0APPL_D1EXTFUNC \ - XREG((*_PREG)->y_u.xxy.x1) = d0; \ + XREG((*_PREG)->u.xxy.x1) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxy); \ INITIALIZE_PERMVAR(pt0, MkIntTerm(0)); \ GONext(); #define P_FUNC2F_XY_D0APPL_END \ - XREG((*_PREG)->y_u.xxy.x1) = MkAtomTerm(NameOfFunctor(d1)); \ + XREG((*_PREG)->u.xxy.x1) = MkAtomTerm(NameOfFunctor(d1)); \ (*_PREG) = NEXTOP((*_PREG), xxy); \ INITIALIZE_PERMVAR(pt0, MkIntegerTerm(ArityOfFunctor(d1))); \ GONext(); #define P_FUNC2F_XY_D0PAIR \ - CELL *pt0 = YREG+(*_PREG)->y_u.xxy.y2; \ - XREG((*_PREG)->y_u.xxy.x1) = TermDot; \ + CELL *pt0 = YREG+(*_PREG)->u.xxy.y2; \ + XREG((*_PREG)->u.xxy.x1) = TermDot; \ (*_PREG) = NEXTOP((*_PREG), xxy); \ INITIALIZE_PERMVAR(pt0, MkIntTerm(2)); \ GONext(); #define P_FUNC2F_XY_D0NOCOMPOUND \ - CELL *pt0 = YREG+(*_PREG)->y_u.xxy.y2; \ - XREG((*_PREG)->y_u.xxy.x1) = d0; \ + CELL *pt0 = YREG+(*_PREG)->u.xxy.y2; \ + XREG((*_PREG)->u.xxy.x1) = d0; \ (*_PREG) = NEXTOP((*_PREG), xxy); \ INITIALIZE_PERMVAR(pt0, MkIntTerm(0)); \ GONext(); @@ -3083,43 +3083,43 @@ #ifdef LOW_LEVEL_TRACER #define P_FUNC2F_YX_LOW_LEVEL_TRACER \ - HR[0] = XREG((*_PREG)->y_u.yxx.x2); \ + H[0] = XREG((*_PREG)->u.yxx.x2); \ RESET_VARIABLE(HR+1); \ RESET_VARIABLE(HR+2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),H); #endif #define P_FUNC2F_YX_TEST_D0 \ register CELL d0; \ register CELL *pt1; \ - d0 = XREG((*_PREG)->y_u.yxx.x2); + d0 = XREG((*_PREG)->u.yxx.x2); #define P_FUNC2F_YX_D0APPL \ Functor d1 = FunctorOfTerm(d0); \ - CELL *pt0 = YREG+(*_PREG)->y_u.yxx.y; + CELL *pt0 = YREG+(*_PREG)->u.yxx.y; #define P_FUNC2F_YX_D0APPL_D1EXTFUNC \ - XREG((*_PREG)->y_u.yxx.x1) = MkIntTerm(0); \ + XREG((*_PREG)->u.yxx.x1) = MkIntTerm(0); \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0, d0); \ GONext(); #define P_FUNC2F_YX_D0APPL_END \ - XREG((*_PREG)->y_u.yxx.x1) = MkIntegerTerm(ArityOfFunctor(d1)); \ + XREG((*_PREG)->u.yxx.x1) = MkIntegerTerm(ArityOfFunctor(d1)); \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0, MkAtomTerm(NameOfFunctor(d1))); \ GONext(); #define P_FUNC2F_YX_D0PAIR \ - CELL *pt0 = YREG+(*_PREG)->y_u.yxx.y; \ - XREG((*_PREG)->y_u.yxx.x1) = MkIntTerm(2); \ + CELL *pt0 = YREG+(*_PREG)->u.yxx.y; \ + XREG((*_PREG)->u.yxx.x1) = MkIntTerm(2); \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0 ,TermDot); \ GONext(); #define P_FUNC2F_YX_D0NOCOMPOUND \ - CELL *pt0 = YREG+(*_PREG)->y_u.yxx.y; \ - XREG((*_PREG)->y_u.yxx.x1) = MkIntTerm(0); \ + CELL *pt0 = YREG+(*_PREG)->u.yxx.y; \ + XREG((*_PREG)->u.yxx.x1) = MkIntTerm(0); \ (*_PREG) = NEXTOP((*_PREG), yxx); \ INITIALIZE_PERMVAR(pt0, d0); \ GONext(); @@ -3135,20 +3135,20 @@ #ifdef LOW_LEVEL_TRACER #define P_FUNC2F_YY_LOW_LEVEL_TRACER \ - HR[0] = XREG((*_PREG)->y_u.yyx.x); \ + H[0] = XREG((*_PREG)->u.yyx.x); \ RESET_VARIABLE(HR+1); \ RESET_VARIABLE(HR+2); \ - low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),HR); + low_level_trace(enter_pred,RepPredProp(Yap_GetPredPropByFunc(FunctorFunctor,0)),H); #endif #define P_FUNC2F_YY_TEST_D0 \ register CELL d0; \ - d0 = XREG((*_PREG)->y_u.yyx.x); + d0 = XREG((*_PREG)->u.yyx.x); #define P_FUNC2F_YY_D0APPL \ Functor d1 = FunctorOfTerm(d0); \ - CELL *pt0 = YREG+(*_PREG)->y_u.yyx.y1; \ - CELL *pt1 = YREG+(*_PREG)->y_u.yyx.y2; + CELL *pt0 = YREG+(*_PREG)->u.yyx.y1; \ + CELL *pt1 = YREG+(*_PREG)->u.yyx.y2; #define P_FUNC2F_YY_D0APPL_D1EXTFUNC \ (*_PREG) = NEXTOP((*_PREG), yyx); \ @@ -3163,16 +3163,16 @@ GONext(); #define P_FUNC2F_YY_D0PAIR \ - CELL *pt0 = YREG+(*_PREG)->y_u.yyx.y1; \ - CELL *pt1 = YREG+(*_PREG)->y_u.yyx.y2; \ + CELL *pt0 = YREG+(*_PREG)->u.yyx.y1; \ + CELL *pt1 = YREG+(*_PREG)->u.yyx.y2; \ (*_PREG) = NEXTOP((*_PREG), yyx); \ INITIALIZE_PERMVAR(pt0, TermDot); \ INITIALIZE_PERMVAR(pt1, MkIntTerm(2)); \ GONext(); #define P_FUNC2F_YY_D0NOCOMPOUND \ - CELL *pt0 = YREG+(*_PREG)->y_u.yyx.y1; \ - CELL *pt1 = YREG+(*_PREG)->y_u.yyx.y2; \ + CELL *pt0 = YREG+(*_PREG)->u.yyx.y1; \ + CELL *pt1 = YREG+(*_PREG)->u.yyx.y2; \ (*_PREG) = NEXTOP((*_PREG), yyx); \ INITIALIZE_PERMVAR(pt0, d0); \ INITIALIZE_PERMVAR(pt1, MkIntTerm(0)); \ diff --git a/JIT/HPP/yaam_put.h b/JIT/HPP/yaam_put.h index 6d61abfac..050669da4 100644 --- a/JIT/HPP/yaam_put.h +++ b/JIT/HPP/yaam_put.h @@ -1,9 +1,9 @@ #define PUT_X_VAR_INSTINIT \ register CELL *pt0; \ pt0 = HR; \ - XREG((*_PREG)->y_u.xx.xl) = Unsigned(pt0); \ + XREG((*_PREG)->u.xx.xl) = Unsigned(pt0); \ HR = pt0 + 1; \ - XREG((*_PREG)->y_u.xx.xr) = Unsigned(pt0); \ + XREG((*_PREG)->u.xx.xr) = Unsigned(pt0); \ (*_PREG) = NEXTOP((*_PREG), xx); \ RESET_VARIABLE(pt0); \ GONext(); @@ -11,8 +11,8 @@ #if defined(YAPOR_SBA) && defined(FROZEN_STACKS) #define PUT_Y_VAR_INSTINIT \ register CELL *pt0; \ - pt0 = YREG + (*_PREG)->y_u.yx.y; \ - XREG((*_PREG)->y_u.yx.x) = (CELL) pt0; \ + pt0 = YREG + (*_PREG)->u.yx.y; \ + XREG((*_PREG)->u.yx.x) = (CELL) pt0; \ (*_PREG) = NEXTOP((*_PREG), yx); \ if (Unsigned((Int)(pt0)-(Int)(H_FZ)) > \ Unsigned((Int)(B_FZ)-(Int)(H_FZ))) { \ @@ -23,8 +23,8 @@ #else /* defined(YAPOR_SBA) && defined(FROZEN_STACKS) */ #define PUT_Y_VAR_INSTINIT \ register CELL *pt0; \ - pt0 = YREG + (*_PREG)->y_u.yx.y; \ - XREG((*_PREG)->y_u.yx.x) = (CELL) pt0; \ + pt0 = YREG + (*_PREG)->u.yx.y; \ + XREG((*_PREG)->u.yx.x) = (CELL) pt0; \ (*_PREG) = NEXTOP((*_PREG), yx); \ INITIALIZE_PERMVAR(pt0, (CELL)pt0); \ GONext(); @@ -32,35 +32,35 @@ #define PUT_X_VAL_INSTINIT \ register CELL d0; \ - d0 = XREG((*_PREG)->y_u.xx.xl); \ - XREG((*_PREG)->y_u.xx.xr) = d0; \ + d0 = XREG((*_PREG)->u.xx.xl); \ + XREG((*_PREG)->u.xx.xr) = d0; \ (*_PREG) = NEXTOP((*_PREG), xx); \ GONext(); #define PUT_XX_VAL_INSTINIT \ register CELL d0, d1; \ - d0 = XREG((*_PREG)->y_u.xxxx.xl1); \ - d1 = XREG((*_PREG)->y_u.xxxx.xl2); \ - XREG((*_PREG)->y_u.xxxx.xr1) = d0; \ - XREG((*_PREG)->y_u.xxxx.xr2) = d1; \ + d0 = XREG((*_PREG)->u.xxxx.xl1); \ + d1 = XREG((*_PREG)->u.xxxx.xl2); \ + XREG((*_PREG)->u.xxxx.xr1) = d0; \ + XREG((*_PREG)->u.xxxx.xr2) = d1; \ (*_PREG) = NEXTOP((*_PREG), xxxx); \ GONext(); #ifdef YAPOR_SBA #define PUT_Y_VAL_INSTINIT \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.yx.y]; \ + d0 = YREG[(*_PREG)->u.yx.y]; \ if (d0 == 0) { \ - XREG((*_PREG)->y_u.yx.x) = (CELL)(YREG+(*_PREG)->y_u.yx.y); \ + XREG((*_PREG)->u.yx.x) = (CELL)(YREG+(*_PREG)->u.yx.y); \ } else \ - XREG((*_PREG)->y_u.yx.x) = d0; \ + XREG((*_PREG)->u.yx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), yx); \ GONext(); #else /* YAPOR_SBA */ #define PUT_Y_VAL_INSTINIT \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.yx.y]; \ - XREG((*_PREG)->y_u.yx.x) = d0; \ + d0 = YREG[(*_PREG)->u.yx.y]; \ + XREG((*_PREG)->u.yx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), yx); \ GONext(); #endif /* YAPOR_SBA */ @@ -69,28 +69,28 @@ #define PUT_Y_VALS_INSTINIT \ register CELL d0, d1; \ ALWAYS_START_PREFETCH(yyxx); \ - d0 = YREG[(*_PREG)->y_u.yyxx.y1]; \ + d0 = YREG[(*_PREG)->u.yyxx.y1]; \ if (d0 == 0) \ - XREG((*_PREG)->y_u.yyxx.x1) = (CELL)(YREG+(*_PREG)->y_u.yyxx.y1); \ + XREG((*_PREG)->u.yyxx.x1) = (CELL)(YREG+(*_PREG)->u.yyxx.y1); \ else \ - XREG((*_PREG)->y_u.yyxx.x1) = d0; \ + XREG((*_PREG)->u.yyxx.x1) = d0; \ (*_PREG) = NEXTOP((*_PREG), yyxx); \ - d1 = YREG[PREVOP((*_PREG),yyxx)->y_u.yyxx.y2]; \ + d1 = YREG[PREVOP((*_PREG),yyxx)->u.yyxx.y2]; \ if (d1 == 0) \ - XREG(PREVOP((*_PREG)->y_u.yyxx,yyxx).x2) = (CELL)(YREG+(*_PREG)->y_u.yyxx.y2); \ + XREG(PREVOP((*_PREG)->u.yyxx,yyxx).x2) = (CELL)(YREG+(*_PREG)->u.yyxx.y2); \ else \ - XREG(PREVOP((*_PREG),yyxx)->y_u.yyxx.x2) = d1; \ + XREG(PREVOP((*_PREG),yyxx)->u.yyxx.x2) = d1; \ ALWAYS_GONext(); \ ALWAYS_END_PREFETCH(); #else /* YAPOR_SBA */ #define PUT_Y_VALS_INSTINIT \ register CELL d0, d1; \ ALWAYS_START_PREFETCH(yyxx); \ - d0 = YREG[(*_PREG)->y_u.yyxx.y1]; \ - XREG((*_PREG)->y_u.yyxx.x1) = d0; \ + d0 = YREG[(*_PREG)->u.yyxx.y1]; \ + XREG((*_PREG)->u.yyxx.x1) = d0; \ (*_PREG) = NEXTOP((*_PREG), yyxx); \ - d1 = YREG[PREVOP((*_PREG),yyxx)->y_u.yyxx.y2]; \ - XREG(PREVOP((*_PREG),yyxx)->y_u.yyxx.x2) = d1; \ + d1 = YREG[PREVOP((*_PREG),yyxx)->u.yyxx.y2]; \ + XREG(PREVOP((*_PREG),yyxx)->u.yyxx.x2) = d1; \ ALWAYS_GONext(); \ ALWAYS_END_PREFETCH(); #endif /* YAPOR_SBA */ @@ -98,61 +98,61 @@ #define PUT_UNSAFE_INSTINIT \ register CELL d0; \ register CELL *pt0; \ - pt0 = YREG+(*_PREG)->y_u.yx.y; \ + pt0 = YREG+(*_PREG)->u.yx.y; \ d0 = *pt0; #define PUT_UNSAFE_PUNSAFE_NONVAR \ - XREG((*_PREG)->y_u.yx.x) = d0; \ + XREG((*_PREG)->u.yx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), yx); \ GONext(); #define PUT_UNSAFE_PUNSAFE_UNK \ if (pt0 <= HR || pt0 >= YREG) { \ - XREG((*_PREG)->y_u.yx.x) = Unsigned(pt0); \ + XREG((*_PREG)->u.yx.x) = Unsigned(pt0); \ (*_PREG) = NEXTOP((*_PREG), yx); \ GONext(); \ } \ else { \ Bind_Local(pt0, Unsigned(HR)); \ - XREG((*_PREG)->y_u.yx.x) = (CELL) HR; \ + XREG((*_PREG)->u.yx.x) = (CELL) HR; \ RESET_VARIABLE(HR); \ - HR++; \ + H++; \ (*_PREG) = NEXTOP((*_PREG), yx); \ GONext(); \ } #define PUT_ATOM_INSTINIT \ register CELL d0; \ - d0 = (*_PREG)->y_u.xc.c; \ - XREG((*_PREG)->y_u.xc.x) = d0; \ + d0 = (*_PREG)->u.xc.c; \ + XREG((*_PREG)->u.xc.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xc); \ GONext(); #define PUT_DBTERM_INSTINIT \ register CELL d0; \ - d0 = (*_PREG)->y_u.xD.D; \ - XREG((*_PREG)->y_u.xD.x) = d0; \ + d0 = (*_PREG)->u.xD.D; \ + XREG((*_PREG)->u.xD.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xD); \ GONext(); #define PUT_BIGINT_INSTINIT \ register CELL d0; \ - d0 = (*_PREG)->y_u.xN.b; \ - XREG((*_PREG)->y_u.xN.x) = d0; \ + d0 = (*_PREG)->u.xN.b; \ + XREG((*_PREG)->u.xN.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xN); \ GONext(); #define PUT_FLOAT_INSTINIT \ register CELL d0; \ - d0 = AbsAppl((*_PREG)->y_u.xd.d); \ - XREG((*_PREG)->y_u.xd.x) = d0; \ + d0 = AbsAppl((*_PREG)->u.xd.d); \ + XREG((*_PREG)->u.xd.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xd); \ GONext(); #define PUT_LONGINT_INSTINIT \ register CELL d0; \ - d0 = AbsAppl((*_PREG)->y_u.xi.i); \ - XREG((*_PREG)->y_u.xi.x) = d0; \ + d0 = AbsAppl((*_PREG)->u.xi.i); \ + XREG((*_PREG)->u.xi.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xi); \ GONext(); @@ -163,7 +163,7 @@ S_SREG = HR; \ HR += 2; \ d0 = AbsPair(S_SREG); \ - XREG((*_PREG)->y_u.x.x) = d0; \ + XREG((*_PREG)->u.x.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), x); \ WRITEBACK_S(S_SREG); \ ENDCACHE_S(); \ @@ -172,11 +172,11 @@ #define PUT_STRUCT_INSTINIT \ register CELL d0; \ d0 = AbsAppl(HR); \ - XREG((*_PREG)->y_u.xfa.x) = d0; \ - d0 = (CELL) ((*_PREG)->y_u.xfa.f); \ - *HR++ = d0; \ + XREG((*_PREG)->u.xfa.x) = d0; \ + d0 = (CELL) ((*_PREG)->u.xfa.f); \ + *H++ = d0; \ (*_SREG) = HR; \ - HR += (*_PREG)->y_u.xfa.a; \ + HR += (*_PREG)->u.xfa.a; \ (*_PREG) = NEXTOP((*_PREG), xfa); \ GONext(); diff --git a/JIT/HPP/yaam_put_d.h b/JIT/HPP/yaam_put_d.h index fc7ea6dc7..12242671f 100644 --- a/JIT/HPP/yaam_put_d.h +++ b/JIT/HPP/yaam_put_d.h @@ -2,9 +2,9 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL *pt0; \ pt0 = HR; \ - XREG((*_PREG)->y_u.xx.xl) = Unsigned(pt0); \ + XREG((*_PREG)->u.xx.xl) = Unsigned(pt0); \ HR = pt0 + 1; \ - XREG((*_PREG)->y_u.xx.xr) = Unsigned(pt0); \ + XREG((*_PREG)->u.xx.xr) = Unsigned(pt0); \ (*_PREG) = NEXTOP((*_PREG), xx); \ RESET_VARIABLE(pt0); \ GONext(); @@ -13,8 +13,8 @@ #define PUT_Y_VAR_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL *pt0; \ - pt0 = YREG + (*_PREG)->y_u.yx.y; \ - XREG((*_PREG)->y_u.yx.x) = (CELL) pt0; \ + pt0 = YREG + (*_PREG)->u.yx.y; \ + XREG((*_PREG)->u.yx.x) = (CELL) pt0; \ (*_PREG) = NEXTOP((*_PREG), yx); \ if (Unsigned((Int)(pt0)-(Int)(H_FZ)) > \ Unsigned((Int)(B_FZ)-(Int)(H_FZ))) { \ @@ -26,8 +26,8 @@ #define PUT_Y_VAR_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL *pt0; \ - pt0 = YREG + (*_PREG)->y_u.yx.y; \ - XREG((*_PREG)->y_u.yx.x) = (CELL) pt0; \ + pt0 = YREG + (*_PREG)->u.yx.y; \ + XREG((*_PREG)->u.yx.x) = (CELL) pt0; \ (*_PREG) = NEXTOP((*_PREG), yx); \ INITIALIZE_PERMVAR(pt0, (CELL)pt0); \ GONext(); @@ -36,18 +36,18 @@ #define PUT_X_VAL_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = XREG((*_PREG)->y_u.xx.xl); \ - XREG((*_PREG)->y_u.xx.xr) = d0; \ + d0 = XREG((*_PREG)->u.xx.xl); \ + XREG((*_PREG)->u.xx.xr) = d0; \ (*_PREG) = NEXTOP((*_PREG), xx); \ GONext(); #define PUT_XX_VAL_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0, d1; \ - d0 = XREG((*_PREG)->y_u.xxxx.xl1); \ - d1 = XREG((*_PREG)->y_u.xxxx.xl2); \ - XREG((*_PREG)->y_u.xxxx.xr1) = d0; \ - XREG((*_PREG)->y_u.xxxx.xr2) = d1; \ + d0 = XREG((*_PREG)->u.xxxx.xl1); \ + d1 = XREG((*_PREG)->u.xxxx.xl2); \ + XREG((*_PREG)->u.xxxx.xr1) = d0; \ + XREG((*_PREG)->u.xxxx.xr2) = d1; \ (*_PREG) = NEXTOP((*_PREG), xxxx); \ GONext(); @@ -55,19 +55,19 @@ #define PUT_Y_VAL_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.yx.y]; \ + d0 = YREG[(*_PREG)->u.yx.y]; \ if (d0 == 0) { \ - XREG((*_PREG)->y_u.yx.x) = (CELL)(YREG+(*_PREG)->y_u.yx.y); \ + XREG((*_PREG)->u.yx.x) = (CELL)(YREG+(*_PREG)->u.yx.y); \ } else \ - XREG((*_PREG)->y_u.yx.x) = d0; \ + XREG((*_PREG)->u.yx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), yx); \ GONext(); #else /* YAPOR_SBA */ #define PUT_Y_VAL_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.yx.y]; \ - XREG((*_PREG)->y_u.yx.x) = d0; \ + d0 = YREG[(*_PREG)->u.yx.y]; \ + XREG((*_PREG)->u.yx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), yx); \ GONext(); #endif /* YAPOR_SBA */ @@ -77,17 +77,17 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0, d1; \ ALWAYS_START_PREFETCH(yyxx); \ - d0 = YREG[(*_PREG)->y_u.yyxx.y1]; \ + d0 = YREG[(*_PREG)->u.yyxx.y1]; \ if (d0 == 0) \ - XREG((*_PREG)->y_u.yyxx.x1) = (CELL)(YREG+(*_PREG)->y_u.yyxx.y1); \ + XREG((*_PREG)->u.yyxx.x1) = (CELL)(YREG+(*_PREG)->u.yyxx.y1); \ else \ - XREG((*_PREG)->y_u.yyxx.x1) = d0; \ + XREG((*_PREG)->u.yyxx.x1) = d0; \ (*_PREG) = NEXTOP((*_PREG), yyxx); \ - d1 = YREG[PREVOP((*_PREG),yyxx)->y_u.yyxx.y2]; \ + d1 = YREG[PREVOP((*_PREG),yyxx)->u.yyxx.y2]; \ if (d1 == 0) \ - XREG(PREVOP((*_PREG)->y_u.yyxx,yyxx).x2) = (CELL)(YREG+(*_PREG)->y_u.yyxx.y2); \ + XREG(PREVOP((*_PREG)->u.yyxx,yyxx).x2) = (CELL)(YREG+(*_PREG)->u.yyxx.y2); \ else \ - XREG(PREVOP((*_PREG),yyxx)->y_u.yyxx.x2) = d1; \ + XREG(PREVOP((*_PREG),yyxx)->u.yyxx.x2) = d1; \ ALWAYS_GONext(); \ ALWAYS_END_PREFETCH(); #else /* YAPOR_SBA */ @@ -95,11 +95,11 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0, d1; \ ALWAYS_START_PREFETCH(yyxx); \ - d0 = YREG[(*_PREG)->y_u.yyxx.y1]; \ - XREG((*_PREG)->y_u.yyxx.x1) = d0; \ + d0 = YREG[(*_PREG)->u.yyxx.y1]; \ + XREG((*_PREG)->u.yyxx.x1) = d0; \ (*_PREG) = NEXTOP((*_PREG), yyxx); \ - d1 = YREG[PREVOP((*_PREG),yyxx)->y_u.yyxx.y2]; \ - XREG(PREVOP((*_PREG),yyxx)->y_u.yyxx.x2) = d1; \ + d1 = YREG[PREVOP((*_PREG),yyxx)->u.yyxx.y2]; \ + XREG(PREVOP((*_PREG),yyxx)->u.yyxx.x2) = d1; \ ALWAYS_GONext(); \ ALWAYS_END_PREFETCH(); #endif /* YAPOR_SBA */ @@ -108,25 +108,25 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL *pt0; \ - pt0 = YREG+(*_PREG)->y_u.yx.y; \ + pt0 = YREG+(*_PREG)->u.yx.y; \ d0 = *pt0; #define PUT_UNSAFE_PUNSAFE_NONVAR \ - XREG((*_PREG)->y_u.yx.x) = d0; \ + XREG((*_PREG)->u.yx.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), yx); \ GONext(); #define PUT_UNSAFE_PUNSAFE_UNK \ if (pt0 <= HR || pt0 >= YREG) { \ - XREG((*_PREG)->y_u.yx.x) = Unsigned(pt0); \ + XREG((*_PREG)->u.yx.x) = Unsigned(pt0); \ (*_PREG) = NEXTOP((*_PREG), yx); \ GONext(); \ } \ else { \ Bind_Local(pt0, Unsigned(HR)); \ - XREG((*_PREG)->y_u.yx.x) = (CELL) HR; \ + XREG((*_PREG)->u.yx.x) = (CELL) HR; \ RESET_VARIABLE(HR); \ - HR++; \ + H++; \ (*_PREG) = NEXTOP((*_PREG), yx); \ GONext(); \ } @@ -134,40 +134,40 @@ #define PUT_ATOM_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = (*_PREG)->y_u.xc.c; \ - XREG((*_PREG)->y_u.xc.x) = d0; \ + d0 = (*_PREG)->u.xc.c; \ + XREG((*_PREG)->u.xc.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xc); \ GONext(); #define PUT_DBTERM_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = (*_PREG)->y_u.xD.D; \ - XREG((*_PREG)->y_u.xD.x) = d0; \ + d0 = (*_PREG)->u.xD.D; \ + XREG((*_PREG)->u.xD.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xD); \ GONext(); #define PUT_BIGINT_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = (*_PREG)->y_u.xN.b; \ - XREG((*_PREG)->y_u.xN.x) = d0; \ + d0 = (*_PREG)->u.xN.b; \ + XREG((*_PREG)->u.xN.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xN); \ GONext(); #define PUT_FLOAT_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = AbsAppl((*_PREG)->y_u.xd.d); \ - XREG((*_PREG)->y_u.xd.x) = d0; \ + d0 = AbsAppl((*_PREG)->u.xd.d); \ + XREG((*_PREG)->u.xd.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xd); \ GONext(); #define PUT_LONGINT_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = AbsAppl((*_PREG)->y_u.xi.i); \ - XREG((*_PREG)->y_u.xi.x) = d0; \ + d0 = AbsAppl((*_PREG)->u.xi.i); \ + XREG((*_PREG)->u.xi.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), xi); \ GONext(); @@ -179,7 +179,7 @@ S_SREG = HR; \ HR += 2; \ d0 = AbsPair(S_SREG); \ - XREG((*_PREG)->y_u.x.x) = d0; \ + XREG((*_PREG)->u.x.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), x); \ WRITEBACK_S(S_SREG); \ ENDCACHE_S(); \ @@ -189,11 +189,11 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ d0 = AbsAppl(HR); \ - XREG((*_PREG)->y_u.xfa.x) = d0; \ - d0 = (CELL) ((*_PREG)->y_u.xfa.f); \ - *HR++ = d0; \ + XREG((*_PREG)->u.xfa.x) = d0; \ + d0 = (CELL) ((*_PREG)->u.xfa.f); \ + *H++ = d0; \ (*_SREG) = HR; \ - HR += (*_PREG)->y_u.xfa.a; \ + HR += (*_PREG)->u.xfa.a; \ (*_PREG) = NEXTOP((*_PREG), xfa); \ GONext(); diff --git a/JIT/HPP/yaam_unify.h b/JIT/HPP/yaam_unify.h index 54af8baa9..578f0069e 100644 --- a/JIT/HPP/yaam_unify.h +++ b/JIT/HPP/yaam_unify.h @@ -14,7 +14,7 @@ #define UNIFY_X_VAR_END \ WRITEBACK_S(S_SREG+1); \ ALWAYS_START_PREFETCH(ox); \ - XREG((*_PREG)->y_u.ox.x) = d0; \ + XREG((*_PREG)->u.ox.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), ox); \ ALWAYS_GONext(); \ ALWAYS_END_PREFETCH(); \ @@ -24,7 +24,7 @@ register CELL *pt0; \ CACHE_S(); \ READ_IN_S(); \ - pt0 = &XREG((*_PREG)->y_u.ox.x); \ + pt0 = &XREG((*_PREG)->u.ox.x); \ (*_PREG) = NEXTOP((*_PREG), ox); \ RESET_VARIABLE(S_SREG); \ *pt0 = (CELL) S_SREG; \ @@ -37,7 +37,7 @@ register CELL *pt0; \ ALWAYS_START_PREFETCH(ox); \ d0 = (*_SREG)[0]; \ - pt0 = &XREG((*_PREG)->y_u.ox.x); \ + pt0 = &XREG((*_PREG)->u.ox.x); \ (*_PREG) = NEXTOP((*_PREG), ox); #ifdef YAPOR_SBA @@ -57,7 +57,7 @@ ALWAYS_START_PREFETCH(ox); \ CACHE_S(); \ READ_IN_S(); \ - pt0 = &XREG((*_PREG)->y_u.ox.x); \ + pt0 = &XREG((*_PREG)->u.ox.x); \ (*_PREG) = NEXTOP((*_PREG), ox); \ RESET_VARIABLE(S_SREG); \ *pt0 = (CELL)S_SREG; \ @@ -71,7 +71,7 @@ CACHE_S(); \ ALWAYS_START_PREFETCH(oxx); \ READ_IN_S(); \ - pt0 = &XREG((*_PREG)->y_u.oxx.xr); \ + pt0 = &XREG((*_PREG)->u.oxx.xr); \ d0 = S_SREG[0]; \ d1 = S_SREG[1]; @@ -87,7 +87,7 @@ #define UNIFY_X_VAR2_END \ WRITEBACK_S(S_SREG+2); \ - XREG((*_PREG)->y_u.oxx.xl) = d0; \ + XREG((*_PREG)->u.oxx.xl) = d0; \ (*_PREG) = NEXTOP((*_PREG), oxx); \ *pt0 = d1; \ ALWAYS_GONext(); \ @@ -98,9 +98,9 @@ register CELL *pt0; \ CACHE_S(); \ READ_IN_S(); \ - pt0 = &XREG((*_PREG)->y_u.oxx.xr); \ + pt0 = &XREG((*_PREG)->u.oxx.xr); \ RESET_VARIABLE(S_SREG); \ - XREG((*_PREG)->y_u.oxx.xl) = (CELL) S_SREG; \ + XREG((*_PREG)->u.oxx.xl) = (CELL) S_SREG; \ S_SREG++; \ (*_PREG) = NEXTOP((*_PREG), oxx); \ RESET_VARIABLE(S_SREG); \ @@ -115,13 +115,13 @@ register CELL *pt0; \ CACHE_S(); \ READ_IN_S(); \ - pt0 = &XREG((*_PREG)->y_u.oxx.xr); \ + pt0 = &XREG((*_PREG)->u.oxx.xr); \ d0 = S_SREG[0]; \ d1 = S_SREG[1]; \ if (d0 == 0) \ - XREG((*_PREG)->y_u.oxx.xl) = (CELL)S_SREG; \ + XREG((*_PREG)->u.oxx.xl) = (CELL)S_SREG; \ else \ - XREG((*_PREG)->y_u.oxx.xl) = d0; \ + XREG((*_PREG)->u.oxx.xl) = d0; \ (*_PREG) = NEXTOP((*_PREG), oxx); \ if (d1 == 0) \ *pt0 = (CELL)(S_SREG+1); \ @@ -135,11 +135,11 @@ register CELL *pt0; \ CACHE_S(); \ READ_IN_S(); \ - pt0 = &XREG((*_PREG)->y_u.oxx.xr); \ + pt0 = &XREG((*_PREG)->u.oxx.xr); \ d0 = S_SREG[0]; \ d1 = S_SREG[1]; \ { \ - XREG((*_PREG)->y_u.oxx.xl) = d0; \ + XREG((*_PREG)->u.oxx.xl) = d0; \ } \ (*_PREG) = NEXTOP((*_PREG), oxx); \ { \ @@ -153,8 +153,8 @@ register CELL *pt0; \ CACHE_S(); \ READ_IN_S(); \ - pt0 = &XREG((*_PREG)->y_u.oxx.xr); \ - XREG((*_PREG)->y_u.oxx.xl) = (CELL) S_SREG; \ + pt0 = &XREG((*_PREG)->u.oxx.xr); \ + XREG((*_PREG)->u.oxx.xl) = (CELL) S_SREG; \ RESET_VARIABLE(S_SREG); \ S_SREG++; \ *pt0 = (CELL) S_SREG; \ @@ -168,7 +168,7 @@ register CELL d0; \ d0 = *(*_SREG)++; \ if (d0 == 0) { \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,(CELL)((*_SREG)-1)); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,(CELL)((*_SREG)-1)); \ } else \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONext(); @@ -176,7 +176,7 @@ #define UNIFY_Y_VAR_INSTINIT \ register CELL d0; \ d0 = *(*_SREG)++; \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,d0); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,d0); \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONext(); #endif /* YAPOR_SBA */ @@ -184,7 +184,7 @@ #define UNIFY_Y_VAR_WRITE_INSTINIT \ CACHE_S(); \ READ_IN_S(); \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,(CELL) S_SREG); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,(CELL) S_SREG); \ (*_PREG) = NEXTOP((*_PREG), oy); \ RESET_VARIABLE(S_SREG); \ WRITEBACK_S(S_SREG+1); \ @@ -196,7 +196,7 @@ register CELL d0; \ d0 = (*_SREG)[0]; \ if (d0 == 0) { \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,(CELL)(*_SREG)); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,(CELL)(*_SREG)); \ } else \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONext(); @@ -204,7 +204,7 @@ #define UNIFY_L_Y_VAR_INSTINIT \ register CELL d0; \ d0 = (*_SREG)[0]; \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,d0); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,d0); \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONext(); #endif /* YAPOR_SBA */ @@ -212,7 +212,7 @@ #define UNIFY_L_Y_VAR_WRITE_INSTINIT \ CACHE_S(); \ READ_IN_S(); \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,(CELL) S_SREG); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,(CELL) S_SREG); \ (*_PREG) = NEXTOP((*_PREG), oy); \ RESET_VARIABLE(S_SREG); \ ENDCACHE_S(); \ @@ -225,7 +225,7 @@ d0 = *pt0; #define UNIFY_X_VAL_UVALX_NONVAR \ - d1 = XREG((*_PREG)->y_u.ox.x); + d1 = XREG((*_PREG)->u.ox.x); #define UNIFY_X_VAL_UVALX_NONVAR_NONVAR \ BLOCK = (CELL)UNIFY_X_VAL_UVALX_NONVAR_NONVAR; \ @@ -240,7 +240,7 @@ GONext(); #define UNIFY_X_VAL_UVALX_UNK \ - d1 = XREG((*_PREG)->y_u.ox.x); + d1 = XREG((*_PREG)->u.ox.x); #define UNIFY_X_VAL_UVALX_VAR_NONVAR \ (*_PREG) = NEXTOP((*_PREG), ox); \ @@ -255,7 +255,7 @@ GONext(); #define UNIFY_X_VAL_WRITE_INSTINIT \ - *(*_SREG)++ = XREG((*_PREG)->y_u.ox.x); \ + *(*_SREG)++ = XREG((*_PREG)->u.ox.x); \ (*_PREG) = NEXTOP((*_PREG), ox); \ GONextW(); @@ -266,7 +266,7 @@ d0 = *pt0; #define UNIFY_L_X_VAL_ULVALX_NONVAR \ - d1 = XREG((*_PREG)->y_u.ox.x); + d1 = XREG((*_PREG)->u.ox.x); #define UNIFY_L_X_VAL_ULVALX_NONVAR_NONVAR \ BLOCK = (CELL)UNIFY_L_X_VAL_ULVALX_NONVAR_NONVAR; \ @@ -279,7 +279,7 @@ GONext(); #define UNIFY_L_X_VAL_ULVALX_UNK \ - d1 = XREG((*_PREG)->y_u.ox.x); + d1 = XREG((*_PREG)->u.ox.x); #define UNIFY_L_X_VAL_ULVALX_VAR_NONVAR \ (*_PREG) = NEXTOP((*_PREG), ox); \ @@ -292,7 +292,7 @@ GONext(); #define UNIFY_L_X_VAL_WRITE_INSTINIT \ - (*_SREG)[0] = XREG((*_PREG)->y_u.ox.x); \ + (*_SREG)[0] = XREG((*_PREG)->u.ox.x); \ (*_PREG) = NEXTOP((*_PREG), ox); \ GONext(); @@ -303,7 +303,7 @@ d0 = *pt0; #define UNIFY_Y_VAL_UVALY_NONVAR \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_Y_VAL_UVALY_NONVAR_NONVAR \ @@ -319,7 +319,7 @@ GONext(); #define UNIFY_Y_VAL_UVALY_UNK \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_Y_VAL_UVALY_VAR_NONVAR \ @@ -337,9 +337,9 @@ #ifdef YAPOR_SBA #define UNIFY_Y_VAL_WRITE_INSTINIT \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.oy.y]; \ + d0 = YREG[(*_PREG)->u.oy.y]; \ if (d0 == 0) \ - *(*_SREG)++ = (CELL)(YREG+(*_PREG)->y_u.oy.y); \ + *(*_SREG)++ = (CELL)(YREG+(*_PREG)->u.oy.y); \ else \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), oy); \ @@ -347,7 +347,7 @@ #else /* YAPOR_SBA */ #define UNIFY_Y_VAL_WRITE_INSTINIT \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.oy.y]; \ + d0 = YREG[(*_PREG)->u.oy.y]; \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONextW(); @@ -360,7 +360,7 @@ d0 = *pt0; #define UNIFY_L_Y_VAL_ULVALY_NONVAR \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_L_Y_VAL_ULVALY_NONVAR_NONVAR \ @@ -374,7 +374,7 @@ GONext(); #define UNIFY_L_Y_VAL_ULVALY_UNK \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_L_Y_VAL_ULVALY_VAR_NONVAR \ @@ -390,9 +390,9 @@ #ifdef YAPOR_SBA #define UNIFY_L_Y_VAL_WRITE_INSTINIT \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.oy.y]; \ + d0 = YREG[(*_PREG)->u.oy.y]; \ if (d0 == 0) \ - (*_SREG)[0] = (CELL)(YREG+(*_PREG)->y_u.oy.y); \ + (*_SREG)[0] = (CELL)(YREG+(*_PREG)->u.oy.y); \ else \ (*_SREG)[0] = d0; \ (*_PREG) = NEXTOP((*_PREG), oy); \ @@ -400,7 +400,7 @@ #else /* YAPOR_SBA */ #define UNIFY_L_Y_VAL_WRITE_INSTINIT \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.oy.y]; \ + d0 = YREG[(*_PREG)->u.oy.y]; \ (*_SREG)[0] = d0; \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONext(); @@ -413,7 +413,7 @@ d0 = *pt0; #define UNIFY_X_LOC_UVALX_LOC_NONVAR \ - d1 = XREG((*_PREG)->y_u.ox.x); + d1 = XREG((*_PREG)->u.ox.x); #define UNIFY_X_LOC_UVALX_LOC_NONVAR_NONVAR \ BLOCK = (CELL)UNIFY_X_LOC_UVALX_LOC_NONVAR_NONVAR; \ @@ -428,7 +428,7 @@ GONext(); #define UNIFY_X_LOC_UVALX_LOC_UNK \ - d1 = XREG((*_PREG)->y_u.ox.x); + d1 = XREG((*_PREG)->u.ox.x); #define UNIFY_X_LOC_UVALX_LOC_VAR_NONVAR \ (*_PREG) = NEXTOP((*_PREG), ox); \ @@ -445,7 +445,7 @@ #define UNIFY_X_LOC_WRITE_INSTINIT \ register CELL d0; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.ox.x); + d0 = XREG((*_PREG)->u.ox.x); #define UNIFY_X_LOC_WRITE_UNIFY_X_LOC_NONVAR \ *(*_SREG)++ = d0; \ @@ -475,7 +475,7 @@ d0 = *pt0; #define UNIFY_L_X_LOC_ULVALX_LOC_NONVAR \ - d1 = XREG((*_PREG)->y_u.ox.x); + d1 = XREG((*_PREG)->u.ox.x); #define UNIFY_L_X_LOC_ULVALX_LOC_NONVAR_NONVAR \ BLOCK = (CELL)UNIFY_L_X_LOC_ULVALX_LOC_NONVAR_NONVAR; \ @@ -488,7 +488,7 @@ GONext(); #define UNIFY_L_X_LOC_ULVALX_LOC_UNK \ - d1 = XREG((*_PREG)->y_u.ox.x); + d1 = XREG((*_PREG)->u.ox.x); #define UNIFY_L_X_LOC_ULVALX_LOC_VAR_NONVAR \ (*_PREG) = NEXTOP((*_PREG), ox); \ @@ -503,7 +503,7 @@ #define UNIFY_L_X_LOC_WRITE_INSTINIT \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.ox.x); + d0 = XREG((*_PREG)->u.ox.x); #define UNIFY_L_X_LOC_WRITE_ULNIFY_X_LOC_NONVAR \ (*_SREG)[0] = d0; \ @@ -529,7 +529,7 @@ d0 = *pt0; #define UNIFY_Y_LOC_UVALY_LOC_NONVAR \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_Y_LOC_UVALY_LOC_NONVAR_NONVAR \ @@ -545,7 +545,7 @@ GONext(); #define UNIFY_Y_LOC_UVALY_LOC_UNK \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_Y_LOC_UVALY_LOC_VAR_NONVAR \ @@ -563,7 +563,7 @@ #define UNIFY_Y_LOC_WRITE_INSTINIT \ register CELL d0; \ register CELL *pt0; \ - pt0 = YREG+(*_PREG)->y_u.oy.y; \ + pt0 = YREG+(*_PREG)->u.oy.y; \ d0 = *pt0; #define UNIFY_Y_LOC_WRITE_UNIFY_Y_LOC_NONVAR \ @@ -594,7 +594,7 @@ d0 = *pt0; #define UNIFY_L_Y_LOC_ULVALY_LOC_NONVAR \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_L_Y_LOC_ULVALY_LOC_NONVAR_NONVAR \ @@ -608,7 +608,7 @@ GONext(); #define UNIFY_L_Y_LOC_ULVALY_LOC_UNK \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_L_Y_LOC_ULVALY_LOC_VAR_NONVAR \ @@ -624,7 +624,7 @@ #define UNIFY_L_Y_LOC_WRITE_INSTINIT \ register CELL d0; \ register CELL *pt0; \ - pt0 = YREG+(*_PREG)->y_u.oy.y; \ + pt0 = YREG+(*_PREG)->u.oy.y; \ d0 = *pt0; #define UNIFY_L_Y_LOC_WRITE_ULUNIFY_Y_LOC_NONVAR \ @@ -673,14 +673,14 @@ GONext(); #define UNIFY_N_VOIDS_INSTINIT \ - (*_SREG) += (*_PREG)->y_u.os.s; \ + (*_SREG) += (*_PREG)->u.os.s; \ (*_PREG) = NEXTOP((*_PREG), os); \ GONext(); #define UNIFY_N_VOIDS_WRITE_INSTINIT \ register CELL d0; \ CACHE_S(); \ - d0 = (*_PREG)->y_u.os.s; \ + d0 = (*_PREG)->u.os.s; \ READ_IN_S(); \ (*_PREG) = NEXTOP((*_PREG), os); \ for (; d0 > 0; d0--) { \ @@ -697,7 +697,7 @@ #define UNIFY_L_N_VOIDS_WRITE_INSTINIT \ register CELL d0; \ - d0 = (*_PREG)->y_u.os.s; \ + d0 = (*_PREG)->u.os.s; \ (*_PREG) = NEXTOP((*_PREG), os); \ CACHE_S(); \ READ_IN_S(); \ @@ -718,7 +718,7 @@ #define UNIFY_ATOM_UATOM_NONVAR \ BLOCK = (CELL)UNIFY_ATOM_UATOM_NONVAR; \ FAILED = 0; \ - if (d0 != (*_PREG)->y_u.oc.c) { \ + if (d0 != (*_PREG)->u.oc.c) { \ YAAM_FAIL; \ } \ else { \ @@ -727,13 +727,13 @@ } #define UNIFY_ATOM_UATOM_UNK \ - d0 = (*_PREG)->y_u.oc.c; \ + d0 = (*_PREG)->u.oc.c; \ (*_PREG) = NEXTOP((*_PREG), oc); \ Bind_Global(pt0, d0); \ GONext(); #define UNIFY_ATOM_WRITE_INSTINIT \ - * (*_SREG)++ = (*_PREG)->y_u.oc.c; \ + * (*_SREG)++ = (*_PREG)->u.oc.c; \ (*_PREG) = NEXTOP((*_PREG), oc); \ GONextW(); @@ -747,7 +747,7 @@ #define UNIFY_L_ATOM_ULATOM_NONVAR \ BLOCK = (CELL)UNIFY_L_ATOM_ULATOM_NONVAR; \ FAILED = 0; \ - if (d0 != (*_PREG)->y_u.oc.c) { \ + if (d0 != (*_PREG)->u.oc.c) { \ YAAM_FAIL; \ } \ else { \ @@ -756,21 +756,21 @@ } #define UNIFY_L_ATOM_ULATOM_UNK \ - d0 = (*_PREG)->y_u.oc.c; \ + d0 = (*_PREG)->u.oc.c; \ (*_PREG) = NEXTOP((*_PREG), oc); \ Bind_Global(pt0, d0); \ GONext(); #define UNIFY_L_ATOM_WRITE_INSTINIT \ - (*_SREG)[0] = (*_PREG)->y_u.oc.c; \ + (*_SREG)[0] = (*_PREG)->u.oc.c; \ (*_PREG) = NEXTOP((*_PREG), oc); \ GONext(); #define UNIFY_N_ATOMS_INSTINIT \ - register Int i = (*_PREG)->y_u.osc.s; \ + register Int i = (*_PREG)->u.osc.s; \ register CELL d0, d1; \ register CELL *pt0; \ - d1 = (*_PREG)->y_u.osc.c; \ + d1 = (*_PREG)->u.osc.c; \ for (; i > 0; i--) { \ pt0 = (*_SREG)++; \ d0 = *pt0; \ @@ -802,8 +802,8 @@ #define UNIFY_N_ATOMS_WRITE_INSTINIT \ register CELL d0, d1; \ - d0 = (*_PREG)->y_u.osc.s; \ - d1 = (*_PREG)->y_u.osc.c; \ + d0 = (*_PREG)->u.osc.s; \ + d1 = (*_PREG)->u.osc.c; \ CACHE_S(); \ READ_IN_S(); \ (*_PREG) = NEXTOP((*_PREG), osc); \ @@ -825,20 +825,20 @@ d0 = *pt0; #define UNIFY_FLOAT_UFLOAT_NONVAR_D0ISFUNCTOR \ - pt1 = (*_PREG)->y_u.od.d; \ + pt1 = (*_PREG)->u.od.d; \ (*_PREG) = NEXTOP((*_PREG), od); #define UNIFY_FLOAT_UFLOAT_NONVAR_END \ GONext(); #define UNIFY_FLOAT_UFLOAT_UNK \ - d1 = AbsAppl((*_PREG)->y_u.od.d); \ + d1 = AbsAppl((*_PREG)->u.od.d); \ (*_PREG) = NEXTOP((*_PREG), od); \ Bind_Global(pt0, d1); \ GONext(); #define UNIFY_FLOAT_WRITE_INSTINIT \ - * (*_SREG)++ = AbsAppl((*_PREG)->y_u.od.d); \ + * (*_SREG)++ = AbsAppl((*_PREG)->u.od.d); \ (*_PREG) = NEXTOP((*_PREG), od); \ GONextW(); @@ -854,21 +854,21 @@ d0 = *pt0; #define UNIFY_L_FLOAT_D0ISFUNC \ - pt1 = (*_PREG)->y_u.od.d; \ + pt1 = (*_PREG)->u.od.d; \ (*_PREG) = NEXTOP((*_PREG), od); #define UNIFY_L_FLOAT_EQUALS \ GONext(); #define UNIFY_L_FLOAT_ULFLOAT_UNK \ - d1 = AbsAppl((*_PREG)->y_u.od.d); \ + d1 = AbsAppl((*_PREG)->u.od.d); \ (*_PREG) = NEXTOP((*_PREG), od); \ Bind_Global(S_SREG, d1); \ GONext(); \ ENDCACHE_S(); #define UNIFY_L_FLOAT_WRITE_INSTINIT \ - (*_SREG)[0] = AbsAppl((*_PREG)->y_u.od.d); \ + (*_SREG)[0] = AbsAppl((*_PREG)->u.od.d); \ (*_PREG) = NEXTOP((*_PREG), od); \ GONext(); @@ -883,20 +883,20 @@ d0 = *pt0; #define UNIFY_LONGINT_D0ISFUNC \ - pt1 = (*_PREG)->y_u.oi.i; \ + pt1 = (*_PREG)->u.oi.i; \ (*_PREG) = NEXTOP((*_PREG), oi); #define UNIFY_LONGINT_EQUALS \ GONext(); #define UNIFY_LONGINT_ULONGINT_UNK \ - d1 = AbsAppl((*_PREG)->y_u.oi.i); \ + d1 = AbsAppl((*_PREG)->u.oi.i); \ (*_PREG) = NEXTOP((*_PREG), oi); \ Bind_Global(pt0, d1); \ GONext(); #define UNIFY_LONGINT_WRITE_INSTINIT \ - * (*_SREG)++ = AbsAppl((*_PREG)->y_u.oi.i); \ + * (*_SREG)++ = AbsAppl((*_PREG)->u.oi.i); \ (*_PREG) = NEXTOP((*_PREG), oi); \ GONextW(); @@ -912,20 +912,20 @@ d0 = *pt0; #define UNIFY_L_LONGINT_D0ISFUNC \ - pt1 = (*_PREG)->y_u.oi.i; \ + pt1 = (*_PREG)->u.oi.i; \ (*_PREG) = NEXTOP((*_PREG), oi); #define UNIFY_L_LONGINT_EQUALS \ GONext(); #define UNIFY_L_LONGINT_ULLONGINT_UNK \ - d1 = AbsAppl((*_PREG)->y_u.oi.i); \ + d1 = AbsAppl((*_PREG)->u.oi.i); \ (*_PREG) = NEXTOP((*_PREG), oi); \ Bind_Global(S_SREG, d1); \ GONext(); #define UNIFY_L_LONGINT_WRITE_INSTINIT \ - (*_SREG)[0] = AbsAppl((*_PREG)->y_u.oi.i); \ + (*_SREG)[0] = AbsAppl((*_PREG)->u.oi.i); \ (*_PREG) = NEXTOP((*_PREG), oi); \ GONext(); @@ -945,7 +945,7 @@ GONext(); #define UNIFY_BIGINT_UBIGINT_UNK \ - d1 = (*_PREG)->y_u.oN.b; \ + d1 = (*_PREG)->u.oN.b; \ (*_PREG) = NEXTOP((*_PREG), oN); \ Bind_Global(pt0, d1); \ GONext(); @@ -968,7 +968,7 @@ GONext(); #define UNIFY_L_BIGINT_ULBIGINT_UNK \ - d1 = (*_PREG)->y_u.oN.b; \ + d1 = (*_PREG)->u.oN.b; \ (*_PREG) = NEXTOP((*_PREG), oN); \ Bind_Global(S_SREG, d1); \ GONext(); \ @@ -983,12 +983,12 @@ #define UNIFY_DBTERM_UDBTERM_NONVAR \ BLOCK = (CELL)UNIFY_DBTERM_UDBTERM_NONVAR; \ - d1 = (*_PREG)->y_u.oD.D; \ + d1 = (*_PREG)->u.oD.D; \ (*_PREG) = NEXTOP((*_PREG), oD); \ YAAM_UNIFYBOUND; #define UNIFY_DBTERM_UDBTERM_UNK \ - d1 = (*_PREG)->y_u.oD.D; \ + d1 = (*_PREG)->u.oD.D; \ (*_PREG) = NEXTOP((*_PREG), oD); \ Bind_Global(pt0, d1); \ GONext(); @@ -1002,12 +1002,12 @@ #define UNIFY_L_DBTERM_ULDBTERM_NONVAR \ BLOCK = (CELL)UNIFY_L_DBTERM_ULDBTERM_NONVAR; \ - d1 = (*_PREG)->y_u.oD.D; \ + d1 = (*_PREG)->u.oD.D; \ (*_PREG) = NEXTOP((*_PREG), oD); \ YAAM_UNIFYBOUND; #define UNIFY_L_DBTERM_ULDBTERM_UNK \ - d1 = (*_PREG)->y_u.oD.D; \ + d1 = (*_PREG)->u.oD.D; \ (*_PREG) = NEXTOP((*_PREG), oD); \ Bind_Global(S_SREG, d1); \ GONext(); \ @@ -1129,7 +1129,7 @@ CACHE_S(); \ READ_IN_S(); \ S_SREG = RepAppl(d0); \ - d0 = (CELL) ((*_PREG)->y_u.ofa.f); \ + d0 = (CELL) ((*_PREG)->u.ofa.f); \ if (*S_SREG != d0) { \ YAAM_FAIL; \ } \ @@ -1146,9 +1146,9 @@ d1 = AbsAppl(HR); \ Bind_Global(pt0, d1); \ pt0 = HR; \ - d0 = (CELL) ((*_PREG)->y_u.ofa.f); \ + d0 = (CELL) ((*_PREG)->u.ofa.f); \ *pt0++ = d0; \ - HR = pt0 + (*_PREG)->y_u.ofa.a; \ + HR = pt0 + (*_PREG)->u.ofa.a; \ (*_PREG) = NEXTOP((*_PREG), ofa); \ (*_SREG) = pt0; \ GONextW(); \ @@ -1163,9 +1163,9 @@ d0 = AbsAppl(HR); \ S_SREG[0] = d0; \ S_SREG = HR; \ - d0 = (CELL) ((*_PREG)->y_u.ofa.f); \ + d0 = (CELL) ((*_PREG)->u.ofa.f); \ *S_SREG++ = d0; \ - HR = S_SREG + (*_PREG)->y_u.ofa.a; \ + HR = S_SREG + (*_PREG)->u.ofa.a; \ (*_PREG) = NEXTOP((*_PREG), ofa); \ WRITEBACK_S(S_SREG); \ ENDCACHE_S(); \ @@ -1186,7 +1186,7 @@ } \ else { \ (*_SREG) = RepAppl(d0); \ - d0 = (CELL) ((*_PREG)->y_u.ofa.f); \ + d0 = (CELL) ((*_PREG)->u.ofa.f); \ if (*(*_SREG)++ != d0) { \ YAAM_FAIL; \ } \ @@ -1201,9 +1201,9 @@ d1 = AbsAppl(HR); \ Bind_Global(pt0, d1); \ pt0 = HR; \ - d0 = (CELL) ((*_PREG)->y_u.ofa.f); \ + d0 = (CELL) ((*_PREG)->u.ofa.f); \ *pt0++ = d0; \ - HR = pt0 + (*_PREG)->y_u.ofa.a; \ + HR = pt0 + (*_PREG)->u.ofa.a; \ (*_PREG) = NEXTOP((*_PREG), ofa); \ (*_SREG) = pt0; \ GONextW(); \ @@ -1216,51 +1216,51 @@ READ_IN_S(); \ S_SREG[0] = d0; \ S_SREG = HR; \ - d0 = (CELL) ((*_PREG)->y_u.ofa.f); \ + d0 = (CELL) ((*_PREG)->u.ofa.f); \ *S_SREG++ = d0; \ - HR = S_SREG + (*_PREG)->y_u.ofa.a; \ + HR = S_SREG + (*_PREG)->u.ofa.a; \ (*_PREG) = NEXTOP((*_PREG), ofa); \ WRITEBACK_S(S_SREG); \ ENDCACHE_S(); \ GONextW(); #define SAVE_PAIR_X_INSTINIT \ - XREG((*_PREG)->y_u.ox.x) = AbsPair((*_SREG)); \ + XREG((*_PREG)->u.ox.x) = AbsPair((*_SREG)); \ (*_PREG) = NEXTOP((*_PREG), ox); \ GONext(); #define SAVE_PAIR_X_WRITE_INSTINIT \ - XREG((*_PREG)->y_u.ox.x) = AbsPair((*_SREG)); \ + XREG((*_PREG)->u.ox.x) = AbsPair((*_SREG)); \ (*_PREG) = NEXTOP((*_PREG), ox); \ GONextW(); #define SAVE_PAIR_Y_INSTINIT \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,AbsPair((*_SREG))); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,AbsPair((*_SREG))); \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONext(); #define SAVE_PAIR_Y_WRITE_INSTINIT \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,AbsPair((*_SREG))); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,AbsPair((*_SREG))); \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONextW(); #define SAVE_APPL_X_INSTINIT \ - XREG((*_PREG)->y_u.ox.x) = AbsAppl((*_SREG) - 1); \ + XREG((*_PREG)->u.ox.x) = AbsAppl((*_SREG) - 1); \ (*_PREG) = NEXTOP((*_PREG), ox); \ GONext(); #define SAVE_APPL_X_WRITE_INSTINIT \ - XREG((*_PREG)->y_u.ox.x) = AbsAppl((*_SREG) - 1); \ + XREG((*_PREG)->u.ox.x) = AbsAppl((*_SREG) - 1); \ (*_PREG) = NEXTOP((*_PREG), ox); \ GONextW(); #define SAVE_APPL_Y_INSTINIT \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,AbsAppl((*_SREG)-1)); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,AbsAppl((*_SREG)-1)); \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONext(); #define SAVE_APPL_Y_WRITE_INSTINIT \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,AbsAppl((*_SREG)-1)); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,AbsAppl((*_SREG)-1)); \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONextW(); diff --git a/JIT/HPP/yaam_unify_d.h b/JIT/HPP/yaam_unify_d.h index 1fdbe828c..8ef117429 100644 --- a/JIT/HPP/yaam_unify_d.h +++ b/JIT/HPP/yaam_unify_d.h @@ -15,7 +15,7 @@ #define UNIFY_X_VAR_END \ WRITEBACK_S(S_SREG+1); \ ALWAYS_START_PREFETCH(ox); \ - XREG((*_PREG)->y_u.ox.x) = d0; \ + XREG((*_PREG)->u.ox.x) = d0; \ (*_PREG) = NEXTOP((*_PREG), ox); \ ALWAYS_GONext(); \ ALWAYS_END_PREFETCH(); \ @@ -26,7 +26,7 @@ register CELL *pt0; \ CACHE_S(); \ READ_IN_S(); \ - pt0 = &XREG((*_PREG)->y_u.ox.x); \ + pt0 = &XREG((*_PREG)->u.ox.x); \ (*_PREG) = NEXTOP((*_PREG), ox); \ RESET_VARIABLE(S_SREG); \ *pt0 = (CELL) S_SREG; \ @@ -40,7 +40,7 @@ register CELL *pt0; \ ALWAYS_START_PREFETCH(ox); \ d0 = (*_SREG)[0]; \ - pt0 = &XREG((*_PREG)->y_u.ox.x); \ + pt0 = &XREG((*_PREG)->u.ox.x); \ (*_PREG) = NEXTOP((*_PREG), ox); #ifdef YAPOR_SBA @@ -61,7 +61,7 @@ ALWAYS_START_PREFETCH(ox); \ CACHE_S(); \ READ_IN_S(); \ - pt0 = &XREG((*_PREG)->y_u.ox.x); \ + pt0 = &XREG((*_PREG)->u.ox.x); \ (*_PREG) = NEXTOP((*_PREG), ox); \ RESET_VARIABLE(S_SREG); \ *pt0 = (CELL)S_SREG; \ @@ -76,7 +76,7 @@ CACHE_S(); \ ALWAYS_START_PREFETCH(oxx); \ READ_IN_S(); \ - pt0 = &XREG((*_PREG)->y_u.oxx.xr); \ + pt0 = &XREG((*_PREG)->u.oxx.xr); \ d0 = S_SREG[0]; \ d1 = S_SREG[1]; @@ -92,7 +92,7 @@ #define UNIFY_X_VAR2_END \ WRITEBACK_S(S_SREG+2); \ - XREG((*_PREG)->y_u.oxx.xl) = d0; \ + XREG((*_PREG)->u.oxx.xl) = d0; \ (*_PREG) = NEXTOP((*_PREG), oxx); \ *pt0 = d1; \ ALWAYS_GONext(); \ @@ -104,9 +104,9 @@ register CELL *pt0; \ CACHE_S(); \ READ_IN_S(); \ - pt0 = &XREG((*_PREG)->y_u.oxx.xr); \ + pt0 = &XREG((*_PREG)->u.oxx.xr); \ RESET_VARIABLE(S_SREG); \ - XREG((*_PREG)->y_u.oxx.xl) = (CELL) S_SREG; \ + XREG((*_PREG)->u.oxx.xl) = (CELL) S_SREG; \ S_SREG++; \ (*_PREG) = NEXTOP((*_PREG), oxx); \ RESET_VARIABLE(S_SREG); \ @@ -122,13 +122,13 @@ register CELL *pt0; \ CACHE_S(); \ READ_IN_S(); \ - pt0 = &XREG((*_PREG)->y_u.oxx.xr); \ + pt0 = &XREG((*_PREG)->u.oxx.xr); \ d0 = S_SREG[0]; \ d1 = S_SREG[1]; \ if (d0 == 0) \ - XREG((*_PREG)->y_u.oxx.xl) = (CELL)S_SREG; \ + XREG((*_PREG)->u.oxx.xl) = (CELL)S_SREG; \ else \ - XREG((*_PREG)->y_u.oxx.xl) = d0; \ + XREG((*_PREG)->u.oxx.xl) = d0; \ (*_PREG) = NEXTOP((*_PREG), oxx); \ if (d1 == 0) \ *pt0 = (CELL)(S_SREG+1); \ @@ -143,11 +143,11 @@ register CELL *pt0; \ CACHE_S(); \ READ_IN_S(); \ - pt0 = &XREG((*_PREG)->y_u.oxx.xr); \ + pt0 = &XREG((*_PREG)->u.oxx.xr); \ d0 = S_SREG[0]; \ d1 = S_SREG[1]; \ { \ - XREG((*_PREG)->y_u.oxx.xl) = d0; \ + XREG((*_PREG)->u.oxx.xl) = d0; \ } \ (*_PREG) = NEXTOP((*_PREG), oxx); \ { \ @@ -162,8 +162,8 @@ register CELL *pt0; \ CACHE_S(); \ READ_IN_S(); \ - pt0 = &XREG((*_PREG)->y_u.oxx.xr); \ - XREG((*_PREG)->y_u.oxx.xl) = (CELL) S_SREG; \ + pt0 = &XREG((*_PREG)->u.oxx.xr); \ + XREG((*_PREG)->u.oxx.xl) = (CELL) S_SREG; \ RESET_VARIABLE(S_SREG); \ S_SREG++; \ *pt0 = (CELL) S_SREG; \ @@ -178,7 +178,7 @@ register CELL d0; \ d0 = *(*_SREG)++; \ if (d0 == 0) { \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,(CELL)((*_SREG)-1)); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,(CELL)((*_SREG)-1)); \ } else \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONext(); @@ -187,7 +187,7 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ d0 = *(*_SREG)++; \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,d0); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,d0); \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONext(); #endif /* YAPOR_SBA */ @@ -196,7 +196,7 @@ print_instruction((*_PREG), ON_NATIVE); \ CACHE_S(); \ READ_IN_S(); \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,(CELL) S_SREG); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,(CELL) S_SREG); \ (*_PREG) = NEXTOP((*_PREG), oy); \ RESET_VARIABLE(S_SREG); \ WRITEBACK_S(S_SREG+1); \ @@ -209,7 +209,7 @@ register CELL d0; \ d0 = (*_SREG)[0]; \ if (d0 == 0) { \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,(CELL)(*_SREG)); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,(CELL)(*_SREG)); \ } else \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONext(); @@ -218,7 +218,7 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ d0 = (*_SREG)[0]; \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,d0); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,d0); \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONext(); #endif /* YAPOR_SBA */ @@ -227,7 +227,7 @@ print_instruction((*_PREG), ON_NATIVE); \ CACHE_S(); \ READ_IN_S(); \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,(CELL) S_SREG); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,(CELL) S_SREG); \ (*_PREG) = NEXTOP((*_PREG), oy); \ RESET_VARIABLE(S_SREG); \ ENDCACHE_S(); \ @@ -241,7 +241,7 @@ d0 = *pt0; #define UNIFY_X_VAL_UVALX_NONVAR \ - d1 = XREG((*_PREG)->y_u.ox.x); + d1 = XREG((*_PREG)->u.ox.x); #define UNIFY_X_VAL_UVALX_NONVAR_NONVAR \ BLOCK = (CELL)UNIFY_X_VAL_UVALX_NONVAR_NONVAR; \ @@ -256,7 +256,7 @@ GONext(); #define UNIFY_X_VAL_UVALX_UNK \ - d1 = XREG((*_PREG)->y_u.ox.x); + d1 = XREG((*_PREG)->u.ox.x); #define UNIFY_X_VAL_UVALX_VAR_NONVAR \ (*_PREG) = NEXTOP((*_PREG), ox); \ @@ -272,7 +272,7 @@ #define UNIFY_X_VAL_WRITE_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - *(*_SREG)++ = XREG((*_PREG)->y_u.ox.x); \ + *(*_SREG)++ = XREG((*_PREG)->u.ox.x); \ (*_PREG) = NEXTOP((*_PREG), ox); \ GONextW(); @@ -284,7 +284,7 @@ d0 = *pt0; #define UNIFY_L_X_VAL_ULVALX_NONVAR \ - d1 = XREG((*_PREG)->y_u.ox.x); + d1 = XREG((*_PREG)->u.ox.x); #define UNIFY_L_X_VAL_ULVALX_NONVAR_NONVAR \ BLOCK = (CELL)UNIFY_L_X_VAL_ULVALX_NONVAR_NONVAR; \ @@ -297,7 +297,7 @@ GONext(); #define UNIFY_L_X_VAL_ULVALX_UNK \ - d1 = XREG((*_PREG)->y_u.ox.x); + d1 = XREG((*_PREG)->u.ox.x); #define UNIFY_L_X_VAL_ULVALX_VAR_NONVAR \ (*_PREG) = NEXTOP((*_PREG), ox); \ @@ -311,7 +311,7 @@ #define UNIFY_L_X_VAL_WRITE_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - (*_SREG)[0] = XREG((*_PREG)->y_u.ox.x); \ + (*_SREG)[0] = XREG((*_PREG)->u.ox.x); \ (*_PREG) = NEXTOP((*_PREG), ox); \ GONext(); @@ -323,7 +323,7 @@ d0 = *pt0; #define UNIFY_Y_VAL_UVALY_NONVAR \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_Y_VAL_UVALY_NONVAR_NONVAR \ @@ -339,7 +339,7 @@ GONext(); #define UNIFY_Y_VAL_UVALY_UNK \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_Y_VAL_UVALY_VAR_NONVAR \ @@ -358,9 +358,9 @@ #define UNIFY_Y_VAL_WRITE_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.oy.y]; \ + d0 = YREG[(*_PREG)->u.oy.y]; \ if (d0 == 0) \ - *(*_SREG)++ = (CELL)(YREG+(*_PREG)->y_u.oy.y); \ + *(*_SREG)++ = (CELL)(YREG+(*_PREG)->u.oy.y); \ else \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), oy); \ @@ -369,7 +369,7 @@ #define UNIFY_Y_VAL_WRITE_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.oy.y]; \ + d0 = YREG[(*_PREG)->u.oy.y]; \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONextW(); @@ -383,7 +383,7 @@ d0 = *pt0; #define UNIFY_L_Y_VAL_ULVALY_NONVAR \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_L_Y_VAL_ULVALY_NONVAR_NONVAR \ @@ -397,7 +397,7 @@ GONext(); #define UNIFY_L_Y_VAL_ULVALY_UNK \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_L_Y_VAL_ULVALY_VAR_NONVAR \ @@ -414,9 +414,9 @@ #define UNIFY_L_Y_VAL_WRITE_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.oy.y]; \ + d0 = YREG[(*_PREG)->u.oy.y]; \ if (d0 == 0) \ - (*_SREG)[0] = (CELL)(YREG+(*_PREG)->y_u.oy.y); \ + (*_SREG)[0] = (CELL)(YREG+(*_PREG)->u.oy.y); \ else \ (*_SREG)[0] = d0; \ (*_PREG) = NEXTOP((*_PREG), oy); \ @@ -425,7 +425,7 @@ #define UNIFY_L_Y_VAL_WRITE_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.oy.y]; \ + d0 = YREG[(*_PREG)->u.oy.y]; \ (*_SREG)[0] = d0; \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONext(); @@ -439,7 +439,7 @@ d0 = *pt0; #define UNIFY_X_LOC_UVALX_LOC_NONVAR \ - d1 = XREG((*_PREG)->y_u.ox.x); + d1 = XREG((*_PREG)->u.ox.x); #define UNIFY_X_LOC_UVALX_LOC_NONVAR_NONVAR \ BLOCK = (CELL)UNIFY_X_LOC_UVALX_LOC_NONVAR_NONVAR; \ @@ -454,7 +454,7 @@ GONext(); #define UNIFY_X_LOC_UVALX_LOC_UNK \ - d1 = XREG((*_PREG)->y_u.ox.x); + d1 = XREG((*_PREG)->u.ox.x); #define UNIFY_X_LOC_UVALX_LOC_VAR_NONVAR \ (*_PREG) = NEXTOP((*_PREG), ox); \ @@ -472,7 +472,7 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.ox.x); + d0 = XREG((*_PREG)->u.ox.x); #define UNIFY_X_LOC_WRITE_UNIFY_X_LOC_NONVAR \ *(*_SREG)++ = d0; \ @@ -503,7 +503,7 @@ d0 = *pt0; #define UNIFY_L_X_LOC_ULVALX_LOC_NONVAR \ - d1 = XREG((*_PREG)->y_u.ox.x); + d1 = XREG((*_PREG)->u.ox.x); #define UNIFY_L_X_LOC_ULVALX_LOC_NONVAR_NONVAR \ BLOCK = (CELL)UNIFY_L_X_LOC_ULVALX_LOC_NONVAR_NONVAR; \ @@ -516,7 +516,7 @@ GONext(); #define UNIFY_L_X_LOC_ULVALX_LOC_UNK \ - d1 = XREG((*_PREG)->y_u.ox.x); + d1 = XREG((*_PREG)->u.ox.x); #define UNIFY_L_X_LOC_ULVALX_LOC_VAR_NONVAR \ (*_PREG) = NEXTOP((*_PREG), ox); \ @@ -532,7 +532,7 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0, d1; \ register CELL *pt0, *pt1; \ - d0 = XREG((*_PREG)->y_u.ox.x); + d0 = XREG((*_PREG)->u.ox.x); #define UNIFY_L_X_LOC_WRITE_ULNIFY_X_LOC_NONVAR \ (*_SREG)[0] = d0; \ @@ -559,7 +559,7 @@ d0 = *pt0; #define UNIFY_Y_LOC_UVALY_LOC_NONVAR \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_Y_LOC_UVALY_LOC_NONVAR_NONVAR \ @@ -575,7 +575,7 @@ GONext(); #define UNIFY_Y_LOC_UVALY_LOC_UNK \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_Y_LOC_UVALY_LOC_VAR_NONVAR \ @@ -594,7 +594,7 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL *pt0; \ - pt0 = YREG+(*_PREG)->y_u.oy.y; \ + pt0 = YREG+(*_PREG)->u.oy.y; \ d0 = *pt0; #define UNIFY_Y_LOC_WRITE_UNIFY_Y_LOC_NONVAR \ @@ -626,7 +626,7 @@ d0 = *pt0; #define UNIFY_L_Y_LOC_ULVALY_LOC_NONVAR \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_L_Y_LOC_ULVALY_LOC_NONVAR_NONVAR \ @@ -640,7 +640,7 @@ GONext(); #define UNIFY_L_Y_LOC_ULVALY_LOC_UNK \ - pt1 = YREG+(*_PREG)->y_u.oy.y; \ + pt1 = YREG+(*_PREG)->u.oy.y; \ d1 = *pt1; #define UNIFY_L_Y_LOC_ULVALY_LOC_VAR_NONVAR \ @@ -657,7 +657,7 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL *pt0; \ - pt0 = YREG+(*_PREG)->y_u.oy.y; \ + pt0 = YREG+(*_PREG)->u.oy.y; \ d0 = *pt0; #define UNIFY_L_Y_LOC_WRITE_ULUNIFY_Y_LOC_NONVAR \ @@ -711,7 +711,7 @@ #define UNIFY_N_VOIDS_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - (*_SREG) += (*_PREG)->y_u.os.s; \ + (*_SREG) += (*_PREG)->u.os.s; \ (*_PREG) = NEXTOP((*_PREG), os); \ GONext(); @@ -719,7 +719,7 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ CACHE_S(); \ - d0 = (*_PREG)->y_u.os.s; \ + d0 = (*_PREG)->u.os.s; \ READ_IN_S(); \ (*_PREG) = NEXTOP((*_PREG), os); \ for (; d0 > 0; d0--) { \ @@ -738,7 +738,7 @@ #define UNIFY_L_N_VOIDS_WRITE_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = (*_PREG)->y_u.os.s; \ + d0 = (*_PREG)->u.os.s; \ (*_PREG) = NEXTOP((*_PREG), os); \ CACHE_S(); \ READ_IN_S(); \ @@ -760,7 +760,7 @@ #define UNIFY_ATOM_UATOM_NONVAR \ BLOCK = (CELL)UNIFY_ATOM_UATOM_NONVAR; \ FAILED = 0; \ - if (d0 != (*_PREG)->y_u.oc.c) { \ + if (d0 != (*_PREG)->u.oc.c) { \ YAAM_FAIL; \ } \ else { \ @@ -769,14 +769,14 @@ } #define UNIFY_ATOM_UATOM_UNK \ - d0 = (*_PREG)->y_u.oc.c; \ + d0 = (*_PREG)->u.oc.c; \ (*_PREG) = NEXTOP((*_PREG), oc); \ Bind_Global(pt0, d0); \ GONext(); #define UNIFY_ATOM_WRITE_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - * (*_SREG)++ = (*_PREG)->y_u.oc.c; \ + * (*_SREG)++ = (*_PREG)->u.oc.c; \ (*_PREG) = NEXTOP((*_PREG), oc); \ GONextW(); @@ -791,7 +791,7 @@ #define UNIFY_L_ATOM_ULATOM_NONVAR \ BLOCK = (CELL)UNIFY_L_ATOM_ULATOM_NONVAR; \ FAILED = 0; \ - if (d0 != (*_PREG)->y_u.oc.c) { \ + if (d0 != (*_PREG)->u.oc.c) { \ YAAM_FAIL; \ } \ else { \ @@ -800,23 +800,23 @@ } #define UNIFY_L_ATOM_ULATOM_UNK \ - d0 = (*_PREG)->y_u.oc.c; \ + d0 = (*_PREG)->u.oc.c; \ (*_PREG) = NEXTOP((*_PREG), oc); \ Bind_Global(pt0, d0); \ GONext(); #define UNIFY_L_ATOM_WRITE_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - (*_SREG)[0] = (*_PREG)->y_u.oc.c; \ + (*_SREG)[0] = (*_PREG)->u.oc.c; \ (*_PREG) = NEXTOP((*_PREG), oc); \ GONext(); #define UNIFY_N_ATOMS_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - register Int i = (*_PREG)->y_u.osc.s; \ + register Int i = (*_PREG)->u.osc.s; \ register CELL d0, d1; \ register CELL *pt0; \ - d1 = (*_PREG)->y_u.osc.c; \ + d1 = (*_PREG)->u.osc.c; \ for (; i > 0; i--) { \ pt0 = (*_SREG)++; \ d0 = *pt0; \ @@ -849,8 +849,8 @@ #define UNIFY_N_ATOMS_WRITE_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0, d1; \ - d0 = (*_PREG)->y_u.osc.s; \ - d1 = (*_PREG)->y_u.osc.c; \ + d0 = (*_PREG)->u.osc.s; \ + d1 = (*_PREG)->u.osc.c; \ CACHE_S(); \ READ_IN_S(); \ (*_PREG) = NEXTOP((*_PREG), osc); \ @@ -873,21 +873,21 @@ d0 = *pt0; #define UNIFY_FLOAT_UFLOAT_NONVAR_D0ISFUNCTOR \ - pt1 = (*_PREG)->y_u.od.d; \ + pt1 = (*_PREG)->u.od.d; \ (*_PREG) = NEXTOP((*_PREG), od); #define UNIFY_FLOAT_UFLOAT_NONVAR_END \ GONext(); #define UNIFY_FLOAT_UFLOAT_UNK \ - d1 = AbsAppl((*_PREG)->y_u.od.d); \ + d1 = AbsAppl((*_PREG)->u.od.d); \ (*_PREG) = NEXTOP((*_PREG), od); \ Bind_Global(pt0, d1); \ GONext(); #define UNIFY_FLOAT_WRITE_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - * (*_SREG)++ = AbsAppl((*_PREG)->y_u.od.d); \ + * (*_SREG)++ = AbsAppl((*_PREG)->u.od.d); \ (*_PREG) = NEXTOP((*_PREG), od); \ GONextW(); @@ -904,14 +904,14 @@ d0 = *pt0; #define UNIFY_L_FLOAT_D0ISFUNC \ - pt1 = (*_PREG)->y_u.od.d; \ + pt1 = (*_PREG)->u.od.d; \ (*_PREG) = NEXTOP((*_PREG), od); #define UNIFY_L_FLOAT_EQUALS \ GONext(); #define UNIFY_L_FLOAT_ULFLOAT_UNK \ - d1 = AbsAppl((*_PREG)->y_u.od.d); \ + d1 = AbsAppl((*_PREG)->u.od.d); \ (*_PREG) = NEXTOP((*_PREG), od); \ Bind_Global(S_SREG, d1); \ GONext(); \ @@ -919,7 +919,7 @@ #define UNIFY_L_FLOAT_WRITE_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - (*_SREG)[0] = AbsAppl((*_PREG)->y_u.od.d); \ + (*_SREG)[0] = AbsAppl((*_PREG)->u.od.d); \ (*_PREG) = NEXTOP((*_PREG), od); \ GONext(); @@ -935,21 +935,21 @@ d0 = *pt0; #define UNIFY_LONGINT_D0ISFUNC \ - pt1 = (*_PREG)->y_u.oi.i; \ + pt1 = (*_PREG)->u.oi.i; \ (*_PREG) = NEXTOP((*_PREG), oi); #define UNIFY_LONGINT_EQUALS \ GONext(); #define UNIFY_LONGINT_ULONGINT_UNK \ - d1 = AbsAppl((*_PREG)->y_u.oi.i); \ + d1 = AbsAppl((*_PREG)->u.oi.i); \ (*_PREG) = NEXTOP((*_PREG), oi); \ Bind_Global(pt0, d1); \ GONext(); #define UNIFY_LONGINT_WRITE_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - * (*_SREG)++ = AbsAppl((*_PREG)->y_u.oi.i); \ + * (*_SREG)++ = AbsAppl((*_PREG)->u.oi.i); \ (*_PREG) = NEXTOP((*_PREG), oi); \ GONextW(); @@ -966,21 +966,21 @@ d0 = *pt0; #define UNIFY_L_LONGINT_D0ISFUNC \ - pt1 = (*_PREG)->y_u.oi.i; \ + pt1 = (*_PREG)->u.oi.i; \ (*_PREG) = NEXTOP((*_PREG), oi); #define UNIFY_L_LONGINT_EQUALS \ GONext(); #define UNIFY_L_LONGINT_ULLONGINT_UNK \ - d1 = AbsAppl((*_PREG)->y_u.oi.i); \ + d1 = AbsAppl((*_PREG)->u.oi.i); \ (*_PREG) = NEXTOP((*_PREG), oi); \ Bind_Global(S_SREG, d1); \ GONext(); #define UNIFY_L_LONGINT_WRITE_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - (*_SREG)[0] = AbsAppl((*_PREG)->y_u.oi.i); \ + (*_SREG)[0] = AbsAppl((*_PREG)->u.oi.i); \ (*_PREG) = NEXTOP((*_PREG), oi); \ GONext(); @@ -1001,7 +1001,7 @@ GONext(); #define UNIFY_BIGINT_UBIGINT_UNK \ - d1 = (*_PREG)->y_u.oN.b; \ + d1 = (*_PREG)->u.oN.b; \ (*_PREG) = NEXTOP((*_PREG), oN); \ Bind_Global(pt0, d1); \ GONext(); @@ -1025,7 +1025,7 @@ GONext(); #define UNIFY_L_BIGINT_ULBIGINT_UNK \ - d1 = (*_PREG)->y_u.oN.b; \ + d1 = (*_PREG)->u.oN.b; \ (*_PREG) = NEXTOP((*_PREG), oN); \ Bind_Global(S_SREG, d1); \ GONext(); \ @@ -1041,12 +1041,12 @@ #define UNIFY_DBTERM_UDBTERM_NONVAR \ BLOCK = (CELL)UNIFY_DBTERM_UDBTERM_NONVAR; \ - d1 = (*_PREG)->y_u.oD.D; \ + d1 = (*_PREG)->u.oD.D; \ (*_PREG) = NEXTOP((*_PREG), oD); \ YAAM_UNIFYBOUND; #define UNIFY_DBTERM_UDBTERM_UNK \ - d1 = (*_PREG)->y_u.oD.D; \ + d1 = (*_PREG)->u.oD.D; \ (*_PREG) = NEXTOP((*_PREG), oD); \ Bind_Global(pt0, d1); \ GONext(); @@ -1061,12 +1061,12 @@ #define UNIFY_L_DBTERM_ULDBTERM_NONVAR \ BLOCK = (CELL)UNIFY_L_DBTERM_ULDBTERM_NONVAR; \ - d1 = (*_PREG)->y_u.oD.D; \ + d1 = (*_PREG)->u.oD.D; \ (*_PREG) = NEXTOP((*_PREG), oD); \ YAAM_UNIFYBOUND; #define UNIFY_L_DBTERM_ULDBTERM_UNK \ - d1 = (*_PREG)->y_u.oD.D; \ + d1 = (*_PREG)->u.oD.D; \ (*_PREG) = NEXTOP((*_PREG), oD); \ Bind_Global(S_SREG, d1); \ GONext(); \ @@ -1193,7 +1193,7 @@ CACHE_S(); \ READ_IN_S(); \ S_SREG = RepAppl(d0); \ - d0 = (CELL) ((*_PREG)->y_u.ofa.f); \ + d0 = (CELL) ((*_PREG)->u.ofa.f); \ if (*S_SREG != d0) { \ YAAM_FAIL; \ } \ @@ -1210,9 +1210,9 @@ d1 = AbsAppl(HR); \ Bind_Global(pt0, d1); \ pt0 = HR; \ - d0 = (CELL) ((*_PREG)->y_u.ofa.f); \ + d0 = (CELL) ((*_PREG)->u.ofa.f); \ *pt0++ = d0; \ - HR = pt0 + (*_PREG)->y_u.ofa.a; \ + HR = pt0 + (*_PREG)->u.ofa.a; \ (*_PREG) = NEXTOP((*_PREG), ofa); \ (*_SREG) = pt0; \ GONextW(); \ @@ -1228,9 +1228,9 @@ d0 = AbsAppl(HR); \ S_SREG[0] = d0; \ S_SREG = HR; \ - d0 = (CELL) ((*_PREG)->y_u.ofa.f); \ + d0 = (CELL) ((*_PREG)->u.ofa.f); \ *S_SREG++ = d0; \ - HR = S_SREG + (*_PREG)->y_u.ofa.a; \ + HR = S_SREG + (*_PREG)->u.ofa.a; \ (*_PREG) = NEXTOP((*_PREG), ofa); \ WRITEBACK_S(S_SREG); \ ENDCACHE_S(); \ @@ -1252,7 +1252,7 @@ } \ else { \ (*_SREG) = RepAppl(d0); \ - d0 = (CELL) ((*_PREG)->y_u.ofa.f); \ + d0 = (CELL) ((*_PREG)->u.ofa.f); \ if (*(*_SREG)++ != d0) { \ YAAM_FAIL; \ } \ @@ -1267,9 +1267,9 @@ d1 = AbsAppl(HR); \ Bind_Global(pt0, d1); \ pt0 = HR; \ - d0 = (CELL) ((*_PREG)->y_u.ofa.f); \ + d0 = (CELL) ((*_PREG)->u.ofa.f); \ *pt0++ = d0; \ - HR = pt0 + (*_PREG)->y_u.ofa.a; \ + HR = pt0 + (*_PREG)->u.ofa.a; \ (*_PREG) = NEXTOP((*_PREG), ofa); \ (*_SREG) = pt0; \ GONextW(); \ @@ -1283,9 +1283,9 @@ READ_IN_S(); \ S_SREG[0] = d0; \ S_SREG = HR; \ - d0 = (CELL) ((*_PREG)->y_u.ofa.f); \ + d0 = (CELL) ((*_PREG)->u.ofa.f); \ *S_SREG++ = d0; \ - HR = S_SREG + (*_PREG)->y_u.ofa.a; \ + HR = S_SREG + (*_PREG)->u.ofa.a; \ (*_PREG) = NEXTOP((*_PREG), ofa); \ WRITEBACK_S(S_SREG); \ ENDCACHE_S(); \ @@ -1293,49 +1293,49 @@ #define SAVE_PAIR_X_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - XREG((*_PREG)->y_u.ox.x) = AbsPair((*_SREG)); \ + XREG((*_PREG)->u.ox.x) = AbsPair((*_SREG)); \ (*_PREG) = NEXTOP((*_PREG), ox); \ GONext(); #define SAVE_PAIR_X_WRITE_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - XREG((*_PREG)->y_u.ox.x) = AbsPair((*_SREG)); \ + XREG((*_PREG)->u.ox.x) = AbsPair((*_SREG)); \ (*_PREG) = NEXTOP((*_PREG), ox); \ GONextW(); #define SAVE_PAIR_Y_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,AbsPair((*_SREG))); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,AbsPair((*_SREG))); \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONext(); #define SAVE_PAIR_Y_WRITE_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,AbsPair((*_SREG))); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,AbsPair((*_SREG))); \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONextW(); #define SAVE_APPL_X_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - XREG((*_PREG)->y_u.ox.x) = AbsAppl((*_SREG) - 1); \ + XREG((*_PREG)->u.ox.x) = AbsAppl((*_SREG) - 1); \ (*_PREG) = NEXTOP((*_PREG), ox); \ GONext(); #define SAVE_APPL_X_WRITE_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - XREG((*_PREG)->y_u.ox.x) = AbsAppl((*_SREG) - 1); \ + XREG((*_PREG)->u.ox.x) = AbsAppl((*_SREG) - 1); \ (*_PREG) = NEXTOP((*_PREG), ox); \ GONextW(); #define SAVE_APPL_Y_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,AbsAppl((*_SREG)-1)); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,AbsAppl((*_SREG)-1)); \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONext(); #define SAVE_APPL_Y_WRITE_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.oy.y,AbsAppl((*_SREG)-1)); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.oy.y,AbsAppl((*_SREG)-1)); \ (*_PREG) = NEXTOP((*_PREG), oy); \ GONextW(); diff --git a/JIT/HPP/yaam_write.h b/JIT/HPP/yaam_write.h index 6a4974fb3..c1c425753 100644 --- a/JIT/HPP/yaam_write.h +++ b/JIT/HPP/yaam_write.h @@ -1,5 +1,5 @@ #define WRITE_X_VAR_INSTINIT \ - XREG((*_PREG)->y_u.x.x) = Unsigned((*_SREG)); \ + XREG((*_PREG)->u.x.x) = Unsigned((*_SREG)); \ (*_PREG) = NEXTOP((*_PREG), x); \ RESET_VARIABLE((*_SREG)); \ (*_SREG)++; \ @@ -13,7 +13,7 @@ #define WRITE_N_VOIDS_INSTINIT \ register CELL d0; \ - d0 = (*_PREG)->y_u.s.s; \ + d0 = (*_PREG)->u.s.s; \ (*_PREG) = NEXTOP((*_PREG), s); \ for (; d0 > 0; d0--) { \ RESET_VARIABLE((*_SREG)); \ @@ -22,7 +22,7 @@ GONext(); #define WRITE_Y_VAR_INSTINIT \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.y.y,Unsigned((*_SREG))); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.y.y,Unsigned((*_SREG))); \ (*_PREG) = NEXTOP((*_PREG), y); \ RESET_VARIABLE((*_SREG)); \ (*_SREG)++; \ @@ -30,7 +30,7 @@ #define WRITE_X_VAL_INSTINIT \ register CELL d0; \ - d0 = XREG((*_PREG)->y_u.x.x); \ + d0 = XREG((*_PREG)->u.x.x); \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), x); \ GONext(); @@ -38,7 +38,7 @@ #define WRITE_X_LOC_INSTINIT \ register CELL d0; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.x.x); \ + d0 = XREG((*_PREG)->u.x.x); \ (*_PREG) = NEXTOP((*_PREG), x); #define WRITE_X_LOC_W_X_BOUND \ @@ -104,9 +104,9 @@ #ifdef YAPOR_SBA #define WRITE_Y_VAL_INSTINIT \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.y.y]; \ + d0 = YREG[(*_PREG)->u.y.y]; \ if (d0 == 0) \ - *(*_SREG)++ = (CELL)(YREG+(*_PREG)->y_u.y.y); \ + *(*_SREG)++ = (CELL)(YREG+(*_PREG)->u.y.y); \ else \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), y); \ @@ -114,7 +114,7 @@ #else /* YAPOR_SBA */ #define WRITE_Y_VAL_INSTINIT \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.y.y]; \ + d0 = YREG[(*_PREG)->u.y.y]; \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), y); \ GONext(); @@ -123,7 +123,7 @@ #define WRITE_Y_LOC_INSTINIT \ register CELL d0; \ register CELL *pt0; \ - pt0 = YREG+(*_PREG)->y_u.y.y; \ + pt0 = YREG+(*_PREG)->u.y.y; \ d0 = *pt0; #define WRITE_Y_LOC_W_Y_BOUND \ @@ -199,43 +199,43 @@ #define WRITE_ATOM_INSTINIT \ register CELL d0; \ - d0 = (*_PREG)->y_u.c.c; \ + d0 = (*_PREG)->u.c.c; \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), c); \ GONext(); #define WRITE_BIGINT_INSTINIT \ register CELL d0; \ - d0 = (*_PREG)->y_u.N.b; \ + d0 = (*_PREG)->u.N.b; \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), N); \ GONext(); #define WRITE_DBTERM_INSTINIT \ register CELL d0; \ - d0 = (*_PREG)->y_u.D.D; \ + d0 = (*_PREG)->u.D.D; \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), D); \ GONext(); #define WRITE_FLOAT_INSTINIT \ register CELL d0; \ - d0 = AbsAppl((*_PREG)->y_u.d.d); \ + d0 = AbsAppl((*_PREG)->u.d.d); \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), d); \ GONext(); #define WRITE_LONGIT_INSTINIT \ register CELL d0; \ - d0 = AbsAppl((*_PREG)->y_u.i.i); \ + d0 = AbsAppl((*_PREG)->u.i.i); \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), i); \ GONext(); #define WRITE_N_ATOMS_INSTINIT \ register CELL d0, d1; \ - d0 = (*_PREG)->y_u.sc.s; \ - d1 = (*_PREG)->y_u.sc.c; \ + d0 = (*_PREG)->u.sc.s; \ + d1 = (*_PREG)->u.sc.c; \ for (; d0 > 0; d0--) { \ *(*_SREG)++ = d1; \ } \ @@ -275,9 +275,9 @@ SP[-1] = Unsigned((*_SREG)); \ SP[-2] = 1; \ SP -= 2; \ - d0 = (CELL) ((*_PREG)->y_u.fa.f); \ - *HR++ = d0; \ - d0 = (*_PREG)->y_u.fa.a; \ + d0 = (CELL) ((*_PREG)->u.fa.f); \ + *H++ = d0; \ + d0 = (*_PREG)->u.fa.a; \ (*_PREG) = NEXTOP((*_PREG), fa); \ (*_SREG) = HR; \ HR += d0; \ @@ -287,10 +287,10 @@ register CELL d0; \ d0 = AbsAppl(HR); \ *(*_SREG) = d0; \ - d0 = (CELL) ((*_PREG)->y_u.fa.f); \ - *HR++ = d0; \ + d0 = (CELL) ((*_PREG)->u.fa.f); \ + *H++ = d0; \ (*_SREG) = HR; \ - d0 = (*_PREG)->y_u.fa.a; \ + d0 = (*_PREG)->u.fa.a; \ (*_PREG) = NEXTOP((*_PREG), fa); \ HR += d0; \ GONext(); diff --git a/JIT/HPP/yaam_write_d.h b/JIT/HPP/yaam_write_d.h index ffd36a616..36c703ff7 100644 --- a/JIT/HPP/yaam_write_d.h +++ b/JIT/HPP/yaam_write_d.h @@ -1,6 +1,6 @@ #define WRITE_X_VAR_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - XREG((*_PREG)->y_u.x.x) = Unsigned((*_SREG)); \ + XREG((*_PREG)->u.x.x) = Unsigned((*_SREG)); \ (*_PREG) = NEXTOP((*_PREG), x); \ RESET_VARIABLE((*_SREG)); \ (*_SREG)++; \ @@ -16,7 +16,7 @@ #define WRITE_N_VOIDS_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = (*_PREG)->y_u.s.s; \ + d0 = (*_PREG)->u.s.s; \ (*_PREG) = NEXTOP((*_PREG), s); \ for (; d0 > 0; d0--) { \ RESET_VARIABLE((*_SREG)); \ @@ -26,7 +26,7 @@ #define WRITE_Y_VAR_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ - INITIALIZE_PERMVAR(YREG+(*_PREG)->y_u.y.y,Unsigned((*_SREG))); \ + INITIALIZE_PERMVAR(YREG+(*_PREG)->u.y.y,Unsigned((*_SREG))); \ (*_PREG) = NEXTOP((*_PREG), y); \ RESET_VARIABLE((*_SREG)); \ (*_SREG)++; \ @@ -35,7 +35,7 @@ #define WRITE_X_VAL_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = XREG((*_PREG)->y_u.x.x); \ + d0 = XREG((*_PREG)->u.x.x); \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), x); \ GONext(); @@ -44,7 +44,7 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL *pt0; \ - d0 = XREG((*_PREG)->y_u.x.x); \ + d0 = XREG((*_PREG)->u.x.x); \ (*_PREG) = NEXTOP((*_PREG), x); #define WRITE_X_LOC_W_X_BOUND \ @@ -111,9 +111,9 @@ #define WRITE_Y_VAL_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.y.y]; \ + d0 = YREG[(*_PREG)->u.y.y]; \ if (d0 == 0) \ - *(*_SREG)++ = (CELL)(YREG+(*_PREG)->y_u.y.y); \ + *(*_SREG)++ = (CELL)(YREG+(*_PREG)->u.y.y); \ else \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), y); \ @@ -122,7 +122,7 @@ #define WRITE_Y_VAL_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = YREG[(*_PREG)->y_u.y.y]; \ + d0 = YREG[(*_PREG)->u.y.y]; \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), y); \ GONext(); @@ -132,7 +132,7 @@ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ register CELL *pt0; \ - pt0 = YREG+(*_PREG)->y_u.y.y; \ + pt0 = YREG+(*_PREG)->u.y.y; \ d0 = *pt0; #define WRITE_Y_LOC_W_Y_BOUND \ @@ -209,7 +209,7 @@ #define WRITE_ATOM_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = (*_PREG)->y_u.c.c; \ + d0 = (*_PREG)->u.c.c; \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), c); \ GONext(); @@ -217,7 +217,7 @@ #define WRITE_BIGINT_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = (*_PREG)->y_u.N.b; \ + d0 = (*_PREG)->u.N.b; \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), N); \ GONext(); @@ -225,7 +225,7 @@ #define WRITE_DBTERM_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = (*_PREG)->y_u.D.D; \ + d0 = (*_PREG)->u.D.D; \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), D); \ GONext(); @@ -233,7 +233,7 @@ #define WRITE_FLOAT_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = AbsAppl((*_PREG)->y_u.d.d); \ + d0 = AbsAppl((*_PREG)->u.d.d); \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), d); \ GONext(); @@ -241,7 +241,7 @@ #define WRITE_LONGIT_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0; \ - d0 = AbsAppl((*_PREG)->y_u.i.i); \ + d0 = AbsAppl((*_PREG)->u.i.i); \ *(*_SREG)++ = d0; \ (*_PREG) = NEXTOP((*_PREG), i); \ GONext(); @@ -249,8 +249,8 @@ #define WRITE_N_ATOMS_INSTINIT \ print_instruction((*_PREG), ON_NATIVE); \ register CELL d0, d1; \ - d0 = (*_PREG)->y_u.sc.s; \ - d1 = (*_PREG)->y_u.sc.c; \ + d0 = (*_PREG)->u.sc.s; \ + d1 = (*_PREG)->u.sc.c; \ for (; d0 > 0; d0--) { \ *(*_SREG)++ = d1; \ } \ @@ -293,9 +293,9 @@ SP[-1] = Unsigned((*_SREG)); \ SP[-2] = 1; \ SP -= 2; \ - d0 = (CELL) ((*_PREG)->y_u.fa.f); \ - *HR++ = d0; \ - d0 = (*_PREG)->y_u.fa.a; \ + d0 = (CELL) ((*_PREG)->u.fa.f); \ + *H++ = d0; \ + d0 = (*_PREG)->u.fa.a; \ (*_PREG) = NEXTOP((*_PREG), fa); \ (*_SREG) = HR; \ HR += d0; \ @@ -306,10 +306,10 @@ register CELL d0; \ d0 = AbsAppl(HR); \ *(*_SREG) = d0; \ - d0 = (CELL) ((*_PREG)->y_u.fa.f); \ - *HR++ = d0; \ + d0 = (CELL) ((*_PREG)->u.fa.f); \ + *H++ = d0; \ (*_SREG) = HR; \ - d0 = (*_PREG)->y_u.fa.a; \ + d0 = (*_PREG)->u.fa.a; \ (*_PREG) = NEXTOP((*_PREG), fa); \ HR += d0; \ GONext(); diff --git a/JIT/JIT_Compiler.cpp b/JIT/JIT_Compiler.cpp index 0732a8613..481851065 100644 --- a/JIT/JIT_Compiler.cpp +++ b/JIT/JIT_Compiler.cpp @@ -2,13 +2,12 @@ #include #include #include -#include using namespace std; #define FREE_ALLOCATED() \ free(buffer); \ - free(p->y_u.jhc.jh->cmd); \ + free(p->u.jhc.jh->cmd); \ free(outputfilename); \ free(optoutputfilename); \ free(cmd1); \ @@ -40,7 +39,6 @@ using namespace std; PInfo = PassRegistry::getPassRegistry()->getPassInfo(PASS->getPassID()); \ Kind = PASS->getPassKind(); \ ADD_PASS_ACCORDING_TO_KIND(); - #include "PassPrinters.hpp" void JIT_Compiler::analyze_module(llvm::Module* &M) @@ -50,9 +48,9 @@ void JIT_Compiler::analyze_module(llvm::Module* &M) const PassInfo *PInfo; PassKind Kind; - + Pass.add(TLI); // First, I add on 'Pass' the Target Info of Module - Pass.add(new DataLayoutPass(M)); // Second, I must add Target Data on 'Pass' + Pass.add(new TargetData(M)); // Second, I must add Target Data on 'Pass' for (int i = 0; i < ExpEnv.analysis_struc.n; i++) { /* * 'ExpEnv.analysis_struc.act_an' contains sorted analysis passes * @@ -85,9 +83,8 @@ void JIT_Compiler::analyze_module(llvm::Module* &M) case e_createLazyValueInfoPass: TREAT_CASE_FOR(createLazyValueInfoPass()); break; - //CHANGED FOR LLVM 3.5 case e_createLoopDependenceAnalysisPass: - TREAT_CASE_FOR(createDependenceAnalysisPass()); + TREAT_CASE_FOR(createLoopDependenceAnalysisPass()); break; case e_createLibCallAliasAnalysisPass: TREAT_CASE_FOR(createLibCallAliasAnalysisPass(NULL)); @@ -104,29 +101,24 @@ void JIT_Compiler::analyze_module(llvm::Module* &M) case e_createNoAAPass: TREAT_CASE_FOR(createNoAAPass()); break; - //NOT IN LLVM 3.5 - //case e_createNoPathProfileInfoPass: - // TREAT_CASE_FOR(createNoPathProfileInfoPass()); - // break; - //NOT IN LLVM 3.5 - //case e_createNoProfileInfoPass: - // TREAT_CASE_FOR(createNoProfileInfoPass()); - // break; + case e_createNoPathProfileInfoPass: + TREAT_CASE_FOR(createNoPathProfileInfoPass()); + break; + case e_createNoProfileInfoPass: + TREAT_CASE_FOR(createNoProfileInfoPass()); + break; case e_createObjCARCAliasAnalysisPass: TREAT_CASE_FOR(createObjCARCAliasAnalysisPass()); break; - //NOT IN LLVM 3.5 - //case e_createProfileEstimatorPass: - // TREAT_CASE_FOR(createProfileEstimatorPass()); - // break; - //CHANGED FOR LLVM 3.5 - case e_createProfileLoaderPass: - TREAT_CASE_FOR(createSampleProfileLoaderPass()); + case e_createProfileEstimatorPass: + TREAT_CASE_FOR(createProfileEstimatorPass()); + break; + case e_createProfileLoaderPass: + TREAT_CASE_FOR(createProfileLoaderPass()); + break; + case e_createProfileVerifierPass: + TREAT_CASE_FOR(createProfileVerifierPass()); break; - //NOT IN LLVM 3.5 - //case e_createProfileVerifierPass: - // TREAT_CASE_FOR(createProfileVerifierPass()); - // break; case e_createRegionInfoPass: TREAT_CASE_FOR(createRegionInfoPass()); break; @@ -136,9 +128,8 @@ void JIT_Compiler::analyze_module(llvm::Module* &M) case e_createTypeBasedAliasAnalysisPass: TREAT_CASE_FOR(createTypeBasedAliasAnalysisPass()); break; - //CHANGED FOR LLVM 3.5 case e_createDbgInfoPrinterPass: - TREAT_CASE_FOR(createDebugInfoVerifierPass()); + TREAT_CASE_FOR(createDbgInfoPrinterPass()); break; case e_createCFGPrinterPass: TREAT_CASE_FOR(createCFGPrinterPass()); @@ -164,23 +155,21 @@ void JIT_Compiler::analyze_module(llvm::Module* &M) case e_createRegionOnlyPrinterPass: TREAT_CASE_FOR(createRegionOnlyPrinterPass()); break; - //NOT IN LLVM 3.5 - //case e_createPathProfileLoaderPass: - // TREAT_CASE_FOR(createPathProfileLoaderPass()); - // break; - //NOT IN LLVM 3.5 - //case e_createPathProfileVerifierPass: - // TREAT_CASE_FOR(createPathProfileVerifierPass()); - // break; + case e_createPathProfileLoaderPass: + TREAT_CASE_FOR(createPathProfileLoaderPass()); + break; + case e_createPathProfileVerifierPass: + TREAT_CASE_FOR(createPathProfileVerifierPass()); + break; default:; } } - + /* if 'llvm::TimePassesIsEnabled' is 'true', llvm time passes are printed on 'shutdown_llvm()' (p_halt -- stdpreds.c) */ llvm::TimePassesIsEnabled = ExpEnv.analysis_struc.time_pass_enabled; /* Use 'llvm::EnableStatistics()' so that llvm stats are printed on 'shutdown_llvm()' (p_halt -- stdpreds.c) */ if (ExpEnv.analysis_struc.stats_enabled) llvm::EnableStatistics(); - + /* * Here, I configure resulting analysis output -- default: stderr * * Use analysis_output_file/1 to change * @@ -218,22 +207,21 @@ void JIT_Compiler::optimize_module(llvm::Module* &M) /* Yes, I do, so... */ /* Initializes PassManager for Function */ - std::shared_ptr FPM; + OwningPtr FPM; FPM.reset(new FunctionPassManager(M)); - FPM->add(new DataLayoutPass(M)); + FPM->add(new TargetData(M)); PassManagerBuilder Builder; // aid to 'FPM' and 'MPM' - + /* Initializes PassManager for Function */ PassManager MPM; TargetLibraryInfo *TLI = new TargetLibraryInfo(Triple(M->getTargetTriple())); MPM.add(TLI); - MPM.add(new DataLayoutPass(M)); - + MPM.add(new TargetData(M)); + /* Populates 'Builder' */ Builder.OptLevel = ExpEnv.transform_struc.optlevel; Builder.DisableUnitAtATime = !ExpEnv.transform_struc.unit_at_time_enabled; - //NOT IN LLVM 3.5 - //Builder.DisableSimplifyLibCalls = !ExpEnv.transform_struc.simplify_libcalls_enabled; + Builder.DisableSimplifyLibCalls = !ExpEnv.transform_struc.simplify_libcalls_enabled; /* inline and unrool only be enabled if 'ExpEnv.transform_struc.optlevel' > 0 */ if (ExpEnv.transform_struc.optlevel) Builder.Inliner = createFunctionInliningPass(ExpEnv.transform_struc.opt_args.inline_threshold); @@ -245,7 +233,7 @@ void JIT_Compiler::optimize_module(llvm::Module* &M) Builder.populateFunctionPassManager(*FPM); /* Populates 'MPM' from 'Builder' */ Builder.populateModulePassManager(MPM); - + /* * Enabling link-time optimizations -- default is no * * Use 'link_time_opt/1', 'link_time_opt/3', 'enable_link_time_opt/0', or 'enable_link_time_opt/2' to change * @@ -273,7 +261,7 @@ void JIT_Compiler::optimize_module(llvm::Module* &M) PassManager Pass; // 'Pass' stores transform passes to be applied TargetLibraryInfo *TLI = new TargetLibraryInfo(Triple(M->getTargetTriple())); Pass.add(TLI); // First, I add on 'Pass' the Target Info of Module - Pass.add(new DataLayoutPass(M)); // Second, I must add Target Data on 'Pass' + Pass.add(new TargetData(M)); // Second, I must add Target Data on 'Pass' for (int i = 0; i < ExpEnv.transform_struc.n; i++) { /* * 'ExpEnv.transform_struc.act_tr' contains sorted transform passes * @@ -295,10 +283,9 @@ void JIT_Compiler::optimize_module(llvm::Module* &M) case t_createBlockExtractorPass: Pass.add(createBlockExtractorPass()); break; - //NOT IN LLVM 3.5 - //case t_createBlockPlacementPass: - // Pass.add(createBlockPlacementPass()); - // break; + case t_createBlockPlacementPass: + Pass.add(createBlockPlacementPass()); + break; case t_createBreakCriticalEdgesPass: Pass.add(createBreakCriticalEdgesPass()); break; @@ -369,7 +356,7 @@ void JIT_Compiler::optimize_module(llvm::Module* &M) Pass.add(createInstructionSimplifierPass()); break; case t_createInternalizePass: - Pass.add(createInternalizePass()); + Pass.add(createInternalizePass(true)); break; case t_createIPConstantPropagationPass: Pass.add(createIPConstantPropagationPass()); @@ -461,10 +448,9 @@ void JIT_Compiler::optimize_module(llvm::Module* &M) case t_createSCCPPass: Pass.add(createSCCPPass()); break; - //NOT IN LLVM 3.5 - //case t_createSimplifyLibCallsPass: - // Pass.add(createSimplifyLibCallsPass()); - // break; + case t_createSimplifyLibCallsPass: + Pass.add(createSimplifyLibCallsPass()); + break; case t_createSingleLoopExtractorPass: Pass.add(createSingleLoopExtractorPass()); break; @@ -571,25 +557,26 @@ void* JIT_Compiler::compile_all(LLVMContext* &Context, yamop* p) "-DYAP_JIT", "-D_NATIVE=1", "-I.", "-I./H", "-I./include", "-I./os", "-I./OPTYap", "-I./BEAM", "-I./MYDDAS", "-I./HPP", "-xc", "-c", "-", "-o", "-", "-emit-llvm", NULL }; #pragma GCC diagnostic pop - + std::string errStr; - error_code e; + llvm::error_code e; + OwningPtr bf; /* Pipe to communicate 'echo' with 'clang' */ int pipe1[2]; int pid_echo, pid_clang ; - + /* 'clang' out file */ char* outputfilename = (char*)malloc(33*sizeof(char)); sprintf(outputfilename, "%lx.bc", (CELL)p); int Output = open(outputfilename, O_CREAT | O_RDWR, 0644); - + /* Creating pipes */ if (pipe(pipe1)<0) { perror(" ERROR!!\n ERROR") ; exit(1); } - + /* Calls echo. */ pid_echo = fork() ; if (pid_echo < 0) { @@ -599,12 +586,12 @@ void* JIT_Compiler::compile_all(LLVMContext* &Context, yamop* p) if (!pid_echo) { /* Setting echo's output to 1st pipe */ dup2(pipe1[1], 1); - + /* Closing pipes */ close(pipe1[0]); close(pipe1[1]); - - execlp("echo", "echo", p->y_u.jhc.jh->tcc.cmd, NULL); + + execlp("echo", "echo", p->u.jhc.jh->tcc.cmd, NULL); } else { /* Calls clang. */ @@ -619,11 +606,11 @@ void* JIT_Compiler::compile_all(LLVMContext* &Context, yamop* p) /* Setting clang's output to Output */ dup2(Output, 1) ; - + /* Closing pipes */ close(pipe1[0]); close(pipe1[1]); - + execvp(*clang_args, clang_args); } } @@ -637,15 +624,14 @@ void* JIT_Compiler::compile_all(LLVMContext* &Context, yamop* p) // 2 means two processes: 'echo' and 'clang' for (i = 0; i < 2; i++) wait(status); /***/ - + /* * At this point, the compiled code (O0) is on 'Output' * * I need to read it to main memory * * for this, I'll use 'MemoryBuffer::getOpenFile' * */ lseek(Output, 0, SEEK_SET); - ErrorOr> em = MemoryBuffer::getOpenFile(Output, outputfilename, -1); - e = em.getError(); + e = MemoryBuffer::getOpenFile(Output, outputfilename, bf); if (e) { errs() << "ERROR::Unable to MemoryBuffer from " << outputfilename << " -- " << e.message() << "\n"; exit(1); @@ -654,9 +640,9 @@ void* JIT_Compiler::compile_all(LLVMContext* &Context, yamop* p) /* * At this point, the compiled code (O0) is on main memory * * I need to read it to Module * - * for this, I'll use 'parseBitcodeFile' * + * for this, I'll use 'ParseBitcodeFile' * */ - Module *Mod = *parseBitcodeFile(em->get(), *Context); + Module *Mod = ParseBitcodeFile(bf.get(), *Context); /* * verify module correctness * @@ -683,41 +669,41 @@ void* JIT_Compiler::compile_all(LLVMContext* &Context, yamop* p) analyze_module(Mod); /* Optimize module -- transform predicates */ optimize_module(Mod); - + /* Computing size of optimized module */ { /* Open file 'tmp.bc' which will be filled by optimized Module */ - std::shared_ptr Out; + OwningPtr Out; std::string ErrorInfo; - Out.reset(new tool_output_file("tmp.bc", ErrorInfo, llvm::sys::fs::F_None)); + Out.reset(new tool_output_file("tmp.bc", ErrorInfo, raw_fd_ostream::F_Binary)); if (!ErrorInfo.empty()) { errs() << ErrorInfo << '\n'; exit(1); } /* 'createPrintModulePass(arg)' will print Module (now optimized) to on file represented by 'arg' */ PassManager Pass; - Pass.add(createPrintModulePass(Out->os())); + Pass.add(createPrintModulePass(&Out->os())); Pass.run(*Mod); /* 'Out->keep()' will keep printed module to file and will close file */ Out->keep(); - + /* Open file 'tmp.bc' */ int Outtmp = open("tmp.bc", O_CREAT | O_RDWR, 0644); #if YAP_STAT_PREDS /* for statistics... compute file size and store value on 'NativeArea->area.native_size_bytes' */ - NativeArea->area.native_size_bytes[p->y_u.jhc.jh->caa.naddress][NativeArea->area.nrecomp[p->y_u.jhc.jh->caa.naddress]-1] = lseek(Outtmp, 0, SEEK_END); + NativeArea->area.native_size_bytes[p->u.jhc.jh->caa.naddress][NativeArea->area.nrecomp[p->u.jhc.jh->caa.naddress]-1] = lseek(Outtmp, 0, SEEK_END); #endif close(Outtmp); remove("tmp.bc"); } /***/ - + #if YAP_DBG_PREDS /* for debug... print module after optimizing it */ if (ExpEnv.debug_struc.pprint_llva.print_llva_after) errs() << "Module after optimization::\n" << *Mod; #endif - + /* * verify module correctness * * predicates: * @@ -733,11 +719,10 @@ void* JIT_Compiler::compile_all(LLVMContext* &Context, yamop* p) } } /***/ - - // materializeAllPermanently -- Make sure all GlobalValues in this Module are fully read - error_code materialize_error = Mod->materializeAllPermanently(); - if (materialize_error.value() != 0) { - errs() <<"Error:: bitcode didn't read correctly. -- " << materialize_error.message() << "\n"; + + // MaterializeAllPermanently -- Make sure all GlobalValues in this Module are fully read + if (Mod->MaterializeAllPermanently(&errStr)) { + errs() <<"Error:: bitcode didn't read correctly. -- " << errStr << "\n"; exit(1); } @@ -804,14 +789,12 @@ void* JIT_Compiler::compile_all(LLVMContext* &Context, yamop* p) { /* codegen predicates 'enable_framepointer_elimination/0' or 'disable_framepointer_elimination/0' */ Options.NoFramePointerElim = (bool)ExpEnv.codegen_struc.struc_targetopt.noframepointerelim; - //NOT IN LLVM 3.5 - //Options.NoFramePointerElimNonLeaf = (bool)ExpEnv.codegen_struc.struc_targetopt.noframepointerelim; + Options.NoFramePointerElimNonLeaf = (bool)ExpEnv.codegen_struc.struc_targetopt.noframepointerelim; /***/ // codegen predicates 'less_precise_fp_mad_option/0' or 'more_precise_fp_mad_option/0' Options.LessPreciseFPMADOption = (bool)ExpEnv.codegen_struc.struc_targetopt.lessprecisefpmadoption; // codegen predicates 'no_excess_fp_precision/0' or 'excess_fp_precision/0' - //NOT IN LLVM 3.5 - //Options.NoExcessFPPrecision = (bool)ExpEnv.codegen_struc.struc_targetopt.noexcessfpprecision; + Options.NoExcessFPPrecision = (bool)ExpEnv.codegen_struc.struc_targetopt.noexcessfpprecision; // codegen predicates 'unsafe_fp_math/0' or 'safe_fp_math/0' Options.UnsafeFPMath = (bool)ExpEnv.codegen_struc.struc_targetopt.unsafefpmath; // codegen predicates 'rounding_mode_dynamically_changed/0' or 'rounding_mode_not_changed/0' @@ -820,8 +803,7 @@ void* JIT_Compiler::compile_all(LLVMContext* &Context, yamop* p) // codegen predicates 'no_use_soft_float/0' or 'use_soft_float/0' Options.UseSoftFloat = (bool)ExpEnv.codegen_struc.struc_targetopt.usesoftfloat; // codegen predicates 'enable_jit_exception_handling/0' or 'disable_jit_exception_handling/0' - //NOT IN LLVM 3.5 - //Options.JITExceptionHandling = (bool)ExpEnv.codegen_struc.struc_targetopt.jitexceptionhandling; + Options.JITExceptionHandling = (bool)ExpEnv.codegen_struc.struc_targetopt.jitexceptionhandling; // codegen predicates 'enable_jit_emit_debug_info/0' or 'disable_jit_emit_debug_info/0' Options.JITEmitDebugInfo = (bool)ExpEnv.codegen_struc.struc_targetopt.jitemitdebuginfo; // codegen predicates 'enable_jit_emit_debug_info_to_disk/0' or 'disable_jit_emit_debug_info_to_disk/0' @@ -868,7 +850,7 @@ void* JIT_Compiler::compile_all(LLVMContext* &Context, yamop* p) */ close(Output); remove(outputfilename); - free(p->y_u.jhc.jh->tcc.cmd); + free(p->u.jhc.jh->tcc.cmd); free(outputfilename); return NULL; } @@ -877,10 +859,9 @@ void* JIT_Compiler::compile_all(LLVMContext* &Context, yamop* p) // 1. execute all of the static constructors or destructors for program EE->runStaticConstructorsDestructors(false); // global++; what is this? - close(Output); remove(outputfilename); - free(p->y_u.jhc.jh->tcc.cmd); + free(p->u.jhc.jh->tcc.cmd); free(outputfilename); // 2. get native pointer from 'clause' (our function within Module) and return it return EE->getPointerToFunction(EntryFn); diff --git a/JIT/jit_analysispreds.c b/JIT/jit_analysispreds.c index 1a339f23b..ac18d8a6d 100644 --- a/JIT/jit_analysispreds.c +++ b/JIT/jit_analysispreds.c @@ -77,7 +77,7 @@ static Int p_analysis_output_file( USES_REGS1 ); #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wimplicit-function-declaration" - + static Int p_disable_analysis_pass( USES_REGS1 ) { @@ -101,7 +101,7 @@ p_disable_analysis_pass( USES_REGS1 ) int i = 0, j = 0; char *tmp; // gets string from atom and stores it on 'str' - char *str = (char*)malloc(YAP_AtomNameLength(AtomOfTerm(t))*sizeof(char)); + char *str = (char*)malloc(YAP_AtomNameLength(AtomOfTerm(t))*sizeof(char) strcpy(str, AtomName(AtomOfTerm(t))); // Makes upper characters of 'str' (for comparison) UPPER_ENTRY(str); diff --git a/JIT/jit_configpreds.c b/JIT/jit_configpreds.c index fc4895618..a70d15734 100644 --- a/JIT/jit_configpreds.c +++ b/JIT/jit_configpreds.c @@ -122,7 +122,7 @@ p_execution_mode( USES_REGS1 ) // setting execution mode ExpEnv.config_struc.execution_mode = mode; - + /* setting execution mode parameters */ switch (mode) { case JUST_INTERPRETED: diff --git a/JIT/jit_debugpreds.c b/JIT/jit_debugpreds.c index 1583793ee..99247c5c9 100644 --- a/JIT/jit_debugpreds.c +++ b/JIT/jit_debugpreds.c @@ -272,7 +272,7 @@ p_print_instruction_msg_before( USES_REGS1 ) Yap_NilError(INVALID_PARAMETER_TYPE_ERROR,"print_instruction_msg_before / print_basic_instruction_msg_before / print_std_instruction_msg_before / print_standard_instruction_msg_before"); return FALSE; } - + t = Deref(ARG1); if (IsPairTerm(t)) { Term u = HeadOfTermCell(t); @@ -354,7 +354,7 @@ p_print_instruction_msg_after( USES_REGS1 ) Yap_NilError(INVALID_PARAMETER_TYPE_ERROR,"print_instruction_msg_after / print_basic_instruction_msg_after / print_std_instruction_msg_after / print_standard_instruction_msg_after"); return FALSE; } - + t = Deref(ARG1); if (IsPairTerm(t)) { Term u = HeadOfTermCell(t); @@ -437,7 +437,7 @@ p_print_instruction3( USES_REGS1 ) Yap_NilError(INVALID_PARAMETER_TYPE_ERROR,"print_instruction / print_basic_instruction / print_std_instruction / print_standard_instruction"); return FALSE; } - + t = Deref(ARG2); char *msgb; if (IsAtomTerm(t)) { @@ -448,7 +448,7 @@ p_print_instruction3( USES_REGS1 ) Yap_NilError(INVALID_PARAMETER_TYPE_ERROR,"print_instruction / print_basic_instruction / print_std_instruction / print_standard_instruction"); return FALSE; } - + t = Deref(ARG1); if (IsPairTerm(t)) { Term u = HeadOfTermCell(t); @@ -596,7 +596,7 @@ p_print_profiled_instruction_msg_before( USES_REGS1 ) Yap_NilError(INVALID_PARAMETER_TYPE_ERROR,"print_profiled_instruction_msg_before / print_traced_instruction_msg_before / print_pfd_instruction_msg_before"); return FALSE; } - + t = Deref(ARG1); if (IsPairTerm(t)) { Term u = HeadOfTermCell(t); @@ -672,7 +672,7 @@ p_print_profiled_instruction_msg_after( USES_REGS1 ) Yap_NilError(INVALID_PARAMETER_TYPE_ERROR,"print_profiled_instruction_msg_after / print_traced_instruction_msg_after / print_pfd_instruction_msg_after"); return FALSE; } - + t = Deref(ARG1); if (IsPairTerm(t)) { Term u = HeadOfTermCell(t); @@ -749,7 +749,7 @@ p_print_profiled_instruction3( USES_REGS1 ) Yap_NilError(INVALID_PARAMETER_TYPE_ERROR,"print_profiled_instruction/ print_traced_instruction / print_pfd_instruction"); return FALSE; } - + t = Deref(ARG2); char *msgb; if (IsAtomTerm(t)) { @@ -760,7 +760,7 @@ p_print_profiled_instruction3( USES_REGS1 ) Yap_NilError(INVALID_PARAMETER_TYPE_ERROR,"print_profiled_instruction/ print_traced_instruction / print_pfd_instruction"); return FALSE; } - + t = Deref(ARG1); if (IsPairTerm(t)) { Term u = HeadOfTermCell(t); @@ -896,7 +896,7 @@ p_print_native_instruction_msg_before( USES_REGS1 ) Yap_NilError(INVALID_PARAMETER_TYPE_ERROR,"print_native_instruction_msg_before / print_ntv_instruction_msg_before"); return FALSE; } - + t = Deref(ARG1); if (IsPairTerm(t)) { Term u = HeadOfTermCell(t); @@ -966,7 +966,7 @@ p_print_native_instruction_msg_after( USES_REGS1 ) Yap_NilError(INVALID_PARAMETER_TYPE_ERROR,"print_native_instruction_msg_after / print_ntv_instruction_msg_after"); return FALSE; } - + t = Deref(ARG1); if (IsPairTerm(t)) { Term u = HeadOfTermCell(t); @@ -1037,7 +1037,7 @@ p_print_native_instruction3( USES_REGS1 ) Yap_NilError(INVALID_PARAMETER_TYPE_ERROR,"print_native_instruction / print_ntv_instruction"); return FALSE; } - + t = Deref(ARG2); char *msgb; if (IsAtomTerm(t)) { @@ -1048,7 +1048,7 @@ p_print_native_instruction3( USES_REGS1 ) Yap_NilError(INVALID_PARAMETER_TYPE_ERROR,"print_native_instruction / print_ntv_instruction"); return FALSE; } - + t = Deref(ARG1); if (IsPairTerm(t)) { Term u = HeadOfTermCell(t); @@ -1246,7 +1246,7 @@ p_print_basic_block_msg_before( USES_REGS1 ) Yap_NilError(INVALID_PARAMETER_TYPE_ERROR,"print_basic_block_msg_before / print_basicblock_msg_before / print_bb_msg_before"); return FALSE; } - + t = Deref(ARG1); if (IsPairTerm(t)) { Term u = HeadOfTermCell(t); @@ -1322,7 +1322,7 @@ p_print_basic_block_msg_after( USES_REGS1 ) Yap_NilError(INVALID_PARAMETER_TYPE_ERROR,"print_basic_block_msg_after / print_basicblock_msg_after / print_bb_msg_after"); return FALSE; } - + t = Deref(ARG1); if (IsPairTerm(t)) { Term u = HeadOfTermCell(t); @@ -1398,7 +1398,7 @@ p_print_basic_block3( USES_REGS1 ) Yap_NilError(INVALID_PARAMETER_TYPE_ERROR,"print_basic_block / print_basicblock / print_bb"); return FALSE; } - + t = Deref(ARG2); char *msgb; if (IsAtomTerm(t)) { @@ -1409,7 +1409,7 @@ p_print_basic_block3( USES_REGS1 ) Yap_NilError(INVALID_PARAMETER_TYPE_ERROR,"print_basic_block / print_basicblock / print_bb"); return FALSE; } - + t = Deref(ARG1); if (IsPairTerm(t)) { Term u = HeadOfTermCell(t); @@ -1573,7 +1573,7 @@ p_print_native_basic_block_msg_before( USES_REGS1 ) Yap_NilError(INVALID_PARAMETER_TYPE_ERROR,"print_native_basic_block_msg_before / print_native_basicblock_msg_before / print_native_bb_msg_before"); return FALSE; } - + t = Deref(ARG1); if (IsPairTerm(t)) { Term u = HeadOfTermCell(t); @@ -1649,7 +1649,7 @@ p_print_native_basic_block_msg_after( USES_REGS1 ) Yap_NilError(INVALID_PARAMETER_TYPE_ERROR,"print_native_basic_block_msg_after / print_native_basicblock_msg_after / print_native_bb_msg_after"); return FALSE; } - + t = Deref(ARG1); if (IsPairTerm(t)) { Term u = HeadOfTermCell(t); @@ -1725,7 +1725,7 @@ p_print_native_basic_block3( USES_REGS1 ) Yap_NilError(INVALID_PARAMETER_TYPE_ERROR,"print_native_basic_block / print_native_basicblock / print_native_bb"); return FALSE; } - + t = Deref(ARG2); char *msgb; if (IsAtomTerm(t)) { @@ -1736,7 +1736,7 @@ p_print_native_basic_block3( USES_REGS1 ) Yap_NilError(INVALID_PARAMETER_TYPE_ERROR,"print_native_basic_block / print_native_basicblock / print_native_bb"); return FALSE; } - + t = Deref(ARG1); if (IsPairTerm(t)) { Term u = HeadOfTermCell(t); @@ -2048,7 +2048,7 @@ p_print_me( USES_REGS1 ) else { Yap_NilError(INVALID_PARAMETER_TYPE_ERROR,"print_me"); return FALSE; - } + } t = Deref(ARG1); if (IsAtomTerm(t)) { int i = 0, j = 0; @@ -2146,15 +2146,15 @@ p_default_debug( USES_REGS1 ) ExpEnv.debug_struc.pmainclause_on_head.print = (Int)NO_PLACE; ExpEnv.debug_struc.pmainclause_on_head.msg_before = 0; ExpEnv.debug_struc.pmainclause_on_head.msg_after = 0; - + ExpEnv.debug_struc.pprint_intermediate.print_to_std = 0; ExpEnv.debug_struc.pprint_intermediate.print_to_file = 0; ExpEnv.debug_struc.pprint_intermediate.std_name = 0; ExpEnv.debug_struc.pprint_intermediate.file_name = 0; - + ExpEnv.debug_struc.pprint_llva.print_llva_before = 0; ExpEnv.debug_struc.pprint_llva.print_llva_after = 0; - + ExpEnv.debug_struc.pprint_me.interpreted_backtrack = 0; ExpEnv.debug_struc.pprint_me.profiled_interpreted_backtrack = 0; ExpEnv.debug_struc.pprint_me.native_backtrack = 0; @@ -2168,16 +2168,16 @@ p_default_debug( USES_REGS1 ) ExpEnv.debug_struc.pprint_me.nativerun_init = 0; ExpEnv.debug_struc.pprint_me.nativerun_exit_by_success = 0; ExpEnv.debug_struc.pprint_me.nativerun_exit_by_fail = 0; - + ExpEnv.debug_struc.act_predicate_msgs.info_msgs = 0; ExpEnv.debug_struc.act_predicate_msgs.success_msgs = 0; ExpEnv.debug_struc.act_predicate_msgs.warning_msgs = 1; ExpEnv.debug_struc.act_predicate_msgs.error_msgs = 1; - + ExpEnv.debug_struc.act_predicate_actions.exit_on_warning = 0; ExpEnv.debug_struc.act_predicate_actions.disable_on_warning = 1; ExpEnv.debug_struc.act_predicate_actions.exit_on_error = 1; - + return TRUE; } @@ -2372,7 +2372,7 @@ p_no_exit_on_error( USES_REGS1 ) #pragma GCC diagnostic pop void -Yap_InitJitDebugPreds(void) +Yap_InitJitDebugPreds( USES_REGS1 ) { Yap_InitCPred("no_print_instruction", 1, p_no_print_instruction, SafePredFlag); Yap_InitCPred("no_print_basic_instruction", 1, p_no_print_basic_instruction, SafePredFlag); diff --git a/JIT/jit_statisticpreds.c b/JIT/jit_statisticpreds.c index 7d391562c..5c1521fa3 100644 --- a/JIT/jit_statisticpreds.c +++ b/JIT/jit_statisticpreds.c @@ -143,7 +143,7 @@ p_init_low_level_stats( USES_REGS1 ) if (PAPI_add_event(ExpEnv.stats_struc.papi_eventset, PAPI_CA_SNP) == PAPI_OK) ExpEnv.stats_struc.papi_valid_values[4] = 1; } - + else if (ExpEnv.stats_struc.papi_event_type == 2) { // Event type is 'conditional_store' -- contains 3 performance counters ExpEnv.stats_struc.papi_valid_values = (short*)malloc(3*sizeof(short)); @@ -164,7 +164,7 @@ p_init_low_level_stats( USES_REGS1 ) if (PAPI_add_event(ExpEnv.stats_struc.papi_eventset, PAPI_CSR_TOT) == PAPI_OK) ExpEnv.stats_struc.papi_valid_values[2] = 1; } - + else if (ExpEnv.stats_struc.papi_event_type == 3) { // Event type is 'floating_point_operations' -- contains 14 performance counters ExpEnv.stats_struc.papi_valid_values = (short*)malloc(14*sizeof(short)); @@ -542,7 +542,7 @@ p_statistics_jit( USES_REGS1 ) } // get address on IntermediatecodeArea which is stored on first instruction of native code (this instruction is NativeArea->area.pc[i]') - int taddress = ((yamop*)NativeArea->area.pc[i])->y_u.jhc.jh->caa.taddress; + int taddress = ((yamop*)NativeArea->area.pc[i])->u.jhc.jh->caa.taddress; if (taddress != -1) { fprintf(stderr, "\tProfiling time: %.3lf sec.\n", IntermediatecodeArea->area.profiling_time[taddress]); @@ -554,7 +554,7 @@ p_statistics_jit( USES_REGS1 ) } fprintf(stderr, "------------------------------\n"); } - + // From this point until the end we do: // 1. We verify if PAPI was initialized (ExpEnv.stats_struc.papi_initialized). If yes, we do: // 2. We verify what event type was used. Based on this, we alloc memory for 'ExpEnv.stats_struc.papi_values' @@ -582,7 +582,7 @@ p_statistics_jit( USES_REGS1 ) if (PAPI_read(ExpEnv.stats_struc.papi_eventset, ExpEnv.stats_struc.papi_values) != PAPI_OK) fprintf (stderr, "%s:%d\t ERROR\n", __FILE__, __LINE__); - + int k = 0; if (ExpEnv.stats_struc.papi_event_type == 0) { if (ExpEnv.stats_struc.papi_valid_values[0]) @@ -618,7 +618,7 @@ p_statistics_jit( USES_REGS1 ) fprintf(stderr, "\tRequests for a snoop:: %lld\n", ExpEnv.stats_struc.papi_values[k++]); } - else if (ExpEnv.stats_struc.papi_event_type == 2) { + else if (ExpEnv.stats_struc.papi_event_type == 2) { if (ExpEnv.stats_struc.papi_valid_values[0]) fprintf(stderr, "\tFailed store conditional instructions:: %lld\n", ExpEnv.stats_struc.papi_values[k++]); if (ExpEnv.stats_struc.papi_valid_values[1]) @@ -821,10 +821,10 @@ p_statistics_jit( USES_REGS1 ) if (ExpEnv.stats_struc.papi_valid_values[3]) fprintf(stderr, "\tTotal translation lookaside buffer misses:: %lld\n", ExpEnv.stats_struc.papi_values[k++]); } - + fprintf(stderr, "------------------------------\n"); } - + return TRUE; } diff --git a/JIT/jit_transformpreds.c b/JIT/jit_transformpreds.c index d8f928d06..75c49e52a 100644 --- a/JIT/jit_transformpreds.c +++ b/JIT/jit_transformpreds.c @@ -112,7 +112,7 @@ static Int p_disable_link_time_opt( USES_REGS1 ); #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wimplicit-function-declaration" - + static Int p_disable_transform_pass( USES_REGS1 ) { @@ -1183,7 +1183,7 @@ p_disable_link_time_opt( USES_REGS1 ) #pragma GCC diagnostic pop void - Yap_InitJitTransformPreds( void ) +Yap_InitJitTransformPreds( void ) { Yap_InitCPred("disable_transform_pass", 1, p_disable_transform_pass, SafePredFlag); Yap_InitCPred("transform_pass", 1, p_transform_pass, SafePredFlag); diff --git a/Makefile.in b/Makefile.in index 6449bd89a..0e3957925 100755 --- a/Makefile.in +++ b/Makefile.in @@ -61,7 +61,7 @@ YAPSTARTUP=@SAVED_STATE_PREFIX@startup.yss CC=@CC@ CXX=@CXX@ MPI_CC=@MPI_CC@ -CPPFLAGS=@CPPFLAGS@ -I. -I$(srcdir)/include -I$(srcdir)/C -I$(srcdir)/H -I$(srcdir)/os -I$(srcdir)/OPTYap -I$(srcdir)/BEAM -I$(srcdir)/CXX -I$(srcdir)/JIT/HPP +CPPFLAGS=@CPPFLAGS@ -I. -I$(srcdir)/H -I$(srcdir)/include -I$(srcdir)/os -I$(srcdir)/OPTYap -I$(srcdir)/BEAM -I$(srcdir)/CXX EXECUTABLE_CFLAGS= @CFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS) CFLAGS= @YAPLIB_CFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS) CXXFLAGS= @SHLIB_CXXFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS) @@ -77,9 +77,9 @@ CPP=@CPP@ RC=@RC@ RCFLAGS=@RCFLAGS@ DEFS=@DEFS@ -D_YAP_NOT_INSTALLED_=1 -DDESTDIR=\"$(DESTDIR)\" -LIBS=@LIBS@ @JITLIBS@ -DLL_LIBS=$(LIBS) @EXTRA_LIBS_FOR_DLLS@ -LDFLAGS=@LDFLAGS@ @JITLD@ +LIBS=@LIBS@ +DLL_LIBS=@LIBS@ @EXTRA_LIBS_FOR_DLLS@ +LDFLAGS=@LDFLAGS@ EXTRAYAPLIBS=@EXTRAYAPLIBS@ LN_S=@LN_S@ M4=@M4@ @@ -159,7 +159,6 @@ IOLIB_HEADERS=os/pl-buffer.h \ H/pl-yap.h @WINDOWS@ os/windows/dirent.h os/windows/utf8.h os/windows/utf8.c os/windows/uxnt.h os/windows/popen.c HEADERS = \ - C/absmi_insts.i \ H/Atoms.h \ H/sshift.h \ H/Yap.h \ @@ -218,7 +217,9 @@ HEADERS = \ OPTYap/locks_mips_funcs.h OPTYap/locks_alpha.h \ OPTYap/locks_alpha_funcs.h \ OPTYap/locks_pthread.h \ - library/dialect/swi/fli/swi.h + library/dialect/swi/fli/swi.h \ + JIT/HPP/JIT.hh JIT/HPP/JIT_Compiler.hh \ + JIT/HPP/jit_predicates.hh IOLIB_SOURCES=os/pl-buffer.c os/pl-ctype.c \ os/pl-codelist.c \ @@ -300,7 +301,7 @@ C_SOURCES= \ # library/lammpi/yap_mpi.c library/lamm1pi/hash.c library/lammpi/prologterms2c.c CXX_SOURCES = \ CXX/yapi.cpp \ - JIT/JIT_Compiler.cpp + JIT/JIT_Compiler.cpp PLCONS_SOURCES = \ console/LGPL/pl-nt.c \ @@ -435,7 +436,7 @@ BEAM_OBJECTS = \ STATIC_OBJECTS = \ @STATIC_MODE@sys.o yap_random.o regexp.o @NO_BUILTIN_REGEXP@ regcomp.o regerror.o regfree.o regexec.o -LIB_OBJECTS = $(ENGINE_OBJECTS) $(C_INTERFACE_OBJECTS) $(OR_OBJECTS) $(BEAM_OBJECTS) $(STATIC_OBJECTS) $(LIBTAI_OBJECTS) $(JIT_OBJECTS) +LIB_OBJECTS = $(ENGINE_OBJECTS) $(C_INTERFACE_OBJECTS) $(OR_OBJECTS) $(BEAM_OBJECTS) $(STATIC_OBJECTS) $(LIBTAI_OBJECTS) $(JIT_OBJECTS) OBJECTS = yap.o yapi.o $(LIB_OBJECTS) @@ -502,11 +503,11 @@ yap_random.o: library/random/yap_random.c config.h %.o: os/%.c config.h $(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir) -Ios @EXTRA_INCLUDES_FOR_WIN32@ $< -o $@ -JIT_Compiler.o: JIT/JIT_Compiler.cpp - $(CXX) -c $(CFLAGS) $(JITFLAGS) -I$(srcdir)/JIT/HPP $< -o $@ +JIT_Compiler.o: IT/JIT_Compiler.cpp + $(CXX) -c $(CFLAGS) $(JITFLAGS) $< -o $@ -%.o: JIT/%.c - $(CC) -c $(CFLAGS) -I$(srcdir)/JIT/HPP $< -o $@ +%.o: $JIT/%.c + $(CC) -c $(CFLAGS) $< -o $@ pl-ntcon.o: console/LGPL/pl-ntcon.c config.h $(CC) -c $(CFLAGS) -DUNICODE -D_UNICODE -DPL_CONSOLE=1 -I$(srcdir)/include $< -o $@ @@ -594,15 +595,15 @@ all: startup.yss -rm -f startup.yss echo "bootstrap('$(srcdir)/pl/init.yap'). module(user). qsave_program('startup.yss')." | @PRE_INSTALL_ENV@ ./yap@EXEC_SUFFIX@ -b $(srcdir)/pl/boot.yap -yap@EXEC_SUFFIX@: $(HEADERS) yap.o @YAPLIB@ libYap.a - $(MPI_CC) $(EXECUTABLE_CFLAGS) $(LDFLAGS) -o yap@EXEC_SUFFIX@ yap.o @YAPLIB@ $(LIBS) $(PAPILIB) +yap@EXEC_SUFFIX@: $(HEADERS) yap.o @YAPLIB@ libYap.a + $(MPI_CC) $(EXECUTABLE_CFLAGS) $(LDFLAGS) -o yap@EXEC_SUFFIX@ yap.o @YAPLIB@ $(LIBS) $(PAPILIB) $(JITLIBS) $(JITLD) yap-win: yap-win@EXEC_SUFFIX@ yapwin: yap-win@EXEC_SUFFIX@ yap-win@EXEC_SUFFIX@: $(PLCONS_OBJECTS) $(HEADERS) @YAPLIB@ - $(MAKE) -C swi/console + $(MAKE) -C swi/console $(MPI_CC) -municode -DUNICODE -D_UNICODE $(EXECUTABLE_CFLAGS) $(LDFLAGS) -Wl,-subsystem,windows -o yap-win@EXEC_SUFFIX@ $(PLCONS_OBJECTS) plterm.dll @YAPLIB@ $(LIBS) -lgdi32 @MPILDF@ libYap.a: $(LIB_OBJECTS) yapi.o @@ -645,7 +646,7 @@ install_unix: @YAPLIB@ yap@EXEC_SUFFIX@ $(INSTALL_PROGRAM) -m 755 yap@EXEC_SUFFIX@ $(DESTDIR)$(BINDIR)/yap $(INSTALL_DATA) -m 755 @YAPLIB@ $(DESTDIR)$(LIBDIR) -install_startup: startup.yss +install_startup: startup.yss $(INSTALL_DATA) startup.yss $(DESTDIR)$(YAPLIBDIR)/startup.yss install_win32: startup.yss @WINDOWS@ yap-win@EXEC_SUFFIX@ @@ -704,7 +705,6 @@ TAGS: $(C_SOURCES) $(PL_SOURCES) $(HEADERS) find . -name '*.pl' -exec etags -a {} \; find . -name '*.cpp' -exec etags -a {} \; find . -name '*.hh' -exec etags -a {} \; - find . -name '*.hpp' -exec etags -a {} \; find . -name '*.java' -exec etags -a {} \; find . -name '*.py' -exec etags -a {} \; diff --git a/library/dialect/swi/fli/swi.c b/library/dialect/swi/fli/swi.c index 015f46c90..d7db1b3b7 100755 --- a/library/dialect/swi/fli/swi.c +++ b/library/dialect/swi/fli/swi.c @@ -129,7 +129,7 @@ Yap_InitSWIHash(void) } static void -UserCPredicate(char *a, CPredicate def, unsigned long int arity, Term mod, pred_flags_t flags) +UserCPredicate(char *a, CPredicate def, unsigned long int arity, Term mod, int flags) { CACHE_REGS @@ -2503,7 +2503,7 @@ X_API void PL_register_foreign_in_module(const char *module, const char *name, i { CACHE_REGS Term tmod; - pred_flags_t nflags = 0; + Int nflags = 0; #ifdef DEBUG if (flags & (PL_FA_CREF)) { @@ -2523,14 +2523,14 @@ X_API void PL_register_foreign_in_module(const char *module, const char *name, i } else { nflags |= CArgsPredFlag; } - if (flags & PL_FA_NOTRACE) { - nflags |= NoTracePredFlag; - } if (flags & PL_FA_NONDETERMINISTIC) { Yap_InitCPredBackCut((char *)name, arity, sizeof(struct foreign_context)/sizeof(CELL), (CPredicate)function, (CPredicate)function, (CPredicate)function, UserCPredFlag|nflags); } else { UserCPredicate((char *)name,(CPredicate)function,arity,tmod,nflags); } + if (flags & PL_FA_NOTRACE) { + Yap_SetNoTrace((char *)name, arity, tmod); + } } X_API void PL_register_extensions(const PL_extension *ptr) diff --git a/library/tries/core_dbtries.c b/library/tries/core_dbtries.c index f2a2a1c70..d34c2bf82 100644 --- a/library/tries/core_dbtries.c +++ b/library/tries/core_dbtries.c @@ -215,7 +215,7 @@ TrNode replace_nested_trie(TrNode node, TrNode child, YAP_Term new_term, void void check_attach_childs(TrNode parent, TrNode search_child, TrNode existing_child, void (*construct_function)(TrNode), void (*destruct_function)(TrNode)); TrNode get_simplification_sibling(TrNode node); TrNode check_parent_first(TrNode node); -TrNode TrNode_myparent(TrNode node); +//TrNode TrNode_myparent(TrNode node); /* -------------------------- */ /* Debug Procedures */ @@ -538,24 +538,24 @@ TrNode get_simplification_sibling(TrNode node) { TrNode check_parent_first(TrNode node) { TrNode simplification; - if (TrNode_entry(TrNode_myparent(node)) != PairInitTag) { - simplification = check_parent_first(TrNode_myparent(node)); + if (TrNode_entry(TrNode_parent(node)) != PairInitTag) { + simplification = check_parent_first(TrNode_parent(node)); if (simplification != NULL && TrNode_entry(simplification) == PairEndTag) return simplification; } simplification = get_simplification_sibling(node); return simplification; } -TrNode TrNode_myparent(TrNode node) { +/*TrNode TrNode_myparent(TrNode node) { TrNode parent = TrNode_parent(node); while (parent != NULL && IS_FUNCTOR_NODE(parent)) parent = TrNode_parent(parent); return parent; -} +}*/ TrNode core_simplification_reduction(TrEngine engine, TrNode node, void (*destruct_function)(TrNode)) { /* Try to find the greatest parent that has a sibling that is a PairEndTag: this indicates a deep simplification */ - node = check_parent_first(TrNode_myparent(node)); + node = check_parent_first(TrNode_parent(node)); if (node != NULL) { /* do breadth reduction simplification */ node = TrNode_parent(node); diff --git a/os/pl-rl.c b/os/pl-rl.c index c2ff43769..76ab00cab 100755 --- a/os/pl-rl.c +++ b/os/pl-rl.c @@ -613,7 +613,7 @@ PL_install_readline(void) Serror->functions = &GD->os.rl_functions; #define PRED(name, arity, func, attr) \ - PL_register_foreign_in_module("prolog", name, arity, func, attr) + PL_register_foreign_in_module("system", name, arity, func, attr) PRED("rl_read_init_file", 1, pl_rl_read_init_file, 0); PRED("rl_add_history", 1, pl_rl_add_history, PL_FA_NOTRACE); diff --git a/packages/cplint/Makefile.in b/packages/cplint/Makefile.in index f0db380b5..203fe98b9 100644 --- a/packages/cplint/Makefile.in +++ b/packages/cplint/Makefile.in @@ -140,9 +140,8 @@ CPLINT_DOCS=\ $(CPLINT_DOCDIR)/manual.pdf \ $(CPLINT_DOCDIR)/manual.html \ $(CPLINT_DOCDIR)/manual.css \ - $(CPLINT_DOCDIR)/manual0x.png - -# $(CPLINT_DOCDIR)/Makefile + $(CPLINT_DOCDIR)/manual0x.png \ + $(CPLINT_DOCDIR)/Makefile CPLINT_LEARNING_PROGRAMS=\ $(CPLINT_SRCDIR)/em \ diff --git a/packages/cplint/doc/Makefile b/packages/cplint/doc/Makefile new file mode 100644 index 000000000..786d90969 --- /dev/null +++ b/packages/cplint/doc/Makefile @@ -0,0 +1,8 @@ + +manual.pdf: manual.tex manual.bbl + pdflatex manual + pdflatex manual + +manual.html: manual.tex manual.bbl + htlatex manual + diff --git a/packages/odbc b/packages/odbc index d0d1ee4d5..997245829 160000 --- a/packages/odbc +++ b/packages/odbc @@ -1 +1 @@ -Subproject commit d0d1ee4d58373cc611676103e0a50a3ae451a023 +Subproject commit 9972458293415b2d72276bd67875767bfeed00df diff --git a/pl/boot.yap b/pl/boot.yap index 6b6b669d9..2d498eb29 100644 --- a/pl/boot.yap +++ b/pl/boot.yap @@ -450,13 +450,13 @@ true :- true. (print_message(error, E), '$handle_toplevel_error'(Line, E))), ( - '$pred_exists'(rl_add_history(_), prolog) + '$pred_exists'(rl_add_history(_), user) -> format(atom(CompleteLine), '~W~W', [ Line, [partial(true)], '.', [partial(true)] ]), - userprolog:rl_add_history(CompleteLine) + user:rl_add_history(CompleteLine) ; true ), @@ -1471,7 +1471,7 @@ expand_term(Term,Expanded) :- % '$expand_array_accesses_in_term'(Expanded0,ExpandedF) :- '$array_refs_compiled', - '$c_arrays'(Expanded0,ExpandedF), !. + '$arrays':'$c_arrays'(Expanded0,ExpandedF), !. '$expand_array_accesses_in_term'(Expanded,Expanded). diff --git a/pl/debug.yap b/pl/debug.yap index 01e4b22b4..46267ab22 100644 --- a/pl/debug.yap +++ b/pl/debug.yap @@ -88,91 +88,95 @@ mode and the existing spy-points, when the debugger is on. % First part : setting and reseting spy points % $suspy does most of the work - '$suspy'(V,S) :- - strip_module( V, M, Indicators ), - ( - ground( Indicators ) - -> - true - ; - '$do_error'(instantiation_error,M:spy(V,S) ) - ), - /* muat be ground, can be conjunction, list or single element */ - ( lists:member( I0, Indicators ), - strip_module( I0, M, I ), - '$do_suspy'( M:I, S ), - fail - ; - conjunctions:conj_member( I0, Indicators ), - strip_module( I0, M, I ), - '$do_suspy'( M:I, S ), - fail - ; - true - ). - - '$do_suspy'(M:A, Action) :- - atom( A ), !, - ( - current_predicate( M:A/N ), - functor( G, A, N) - *-> - '$exec_spy'( M, G, Action ) - ; - print_message(warning,no_match( M:A ) ) - ). - '$do_suspy'(M:A/N, Action) :- !, - ( current_predicate( M:A/N ) - *-> - functor( G, A, N), - '$exec_spy'( M, G, Action ) - ; - G =.. [ Action, M:A/N], - print_message(warning,no_match( G ) ) - ). - '$do_suspy'( I, Action) :- - G =.. [ Action, I], - '$do_error'(domain_error(predicate_spec,I), G ). - - -'$exec_spy'( M, G, Action ) :- - '$follow_import_chain'( M, G, M0, G0 ), - '$exec_spy2'( M0, G0, Action ). - - -'$exec_spy2'( M0, S0, Action ) :- - '$system_predicate'(S0,M0), 1, - '$flags'(S0,M0,F,F), - ( - F /\ 0x118dd080 =\= 0 - -> - Call =.. [Action,M0:S0], - functor(S0,N0,A0), - '$do_error'(permission_error(access,private_procedure,M0:A0/N0),Call) - ; - true - ), - '$suspy2'(Action, S0, M0 ). -'$exec_spy2'( M0, S0, Action ) :- - '$suspy2'(Action, S0, M0 ). - - '$suspy2'(spy,T,M) :- - recorded('$spy','$spy'(T,M),_), !, + '$suspy'(V,S,M) :- var(V) , !, + '$do_error'(instantiation_error,M:spy(V,S)). + '$suspy'((M:S),P,_) :- !, + '$suspy'(S,P,M). + '$suspy'([],_,_) :- !. + '$suspy'([F|L],S,M) :- !, ( '$suspy'(F,S,M) ; '$suspy'(L,S,M) ). + '$suspy'(F/N,S,M) :- !, functor(T,F,N), + '$do_suspy'(S, F, N, T, M). + '$suspy'(A,S,M) :- atom(A), !, + '$suspy_predicates_by_name'(A,S,M). + '$suspy'(P,spy,M) :- !, + '$do_error'(domain_error(predicate_spec,P),spy(M:P)). + '$suspy'(P,nospy,M) :- + '$do_error'(domain_error(predicate_spec,P),nospy(M:P)). + + '$suspy_predicates_by_name'(A,S,M) :- + % just check one such predicate exists + ( + current_predicate(A,M:_) + -> + M = EM, + A = NA + ; + recorded('$import','$import'(EM,M,GA,_,A,_),_), + functor(GA,NA,_) + ), + !, + '$do_suspy_predicates_by_name'(NA,S,EM). +'$suspy_predicates_by_name'(A,spy,M) :- !, + print_message(warning,no_match(spy(M:A))). +'$suspy_predicates_by_name'(A,nospy,M) :- + print_message(warning,no_match(nospy(M:A))). + +'$do_suspy_predicates_by_name'(A,S,M) :- + current_predicate(A,M:T), + functor(T,A,N), + '$do_suspy'(S, A, N, T, M). +'$do_suspy_predicates_by_name'(A, S, M) :- + recorded('$import','$import'(EM,M,_,T,A,N),_), + '$do_suspy'(S, A, N, T, EM). + + + % + % protect against evil arguments. + % + '$do_suspy'(S, F, N, T, M) :- + recorded('$import','$import'(EM,M,T0,_,F,N),_), !, + functor(T0, F0, N0), + '$do_suspy'(S, F0, N0, T, EM). + '$do_suspy'(S, F, N, T, M) :- + '$undefined'(T,M), !, + ( S = spy -> + print_message(warning,no_match(spy(M:F/N))) + ; + print_message(warning,no_match(nospy(M:F/N))) + ). + '$do_suspy'(S, F, N, T, M) :- + '$system_predicate'(T,M), + '$flags'(T,M,F,F), + F /\ 0x118dd080 =\= 0, + ( S = spy -> + '$do_error'(permission_error(access,private_procedure,T),spy(M:F/N)) + ; + '$do_error'(permission_error(access,private_procedure,T),nospy(M:F/N)) + ). + '$do_suspy'(S, F, N, T, M) :- + '$undefined'(T,M), !, + ( S = spy -> + print_message(warning,no_match(spy(M:F/N))) + ; + print_message(warning,no_match(nospy(M:F/N))) + ). + '$do_suspy'(S,F,N,T,M) :- + '$suspy2'(S,F,N,T,M). + + '$suspy2'(spy,F,N,T,M) :- + recorded('$spy','$spy'(T,M),_), !, print_message(informational,breakp(bp(debugger,plain,M:T,M:F/N,N),add,already)). - '$suspy2'(spy,T,M) :- !, + '$suspy2'(spy,F,N,T,M) :- !, recorda('$spy','$spy'(T,M),_), '$set_spy'(T,M), - functor(T,F,N), print_message(informational,breakp(bp(debugger,plain,M:T,M:F/N,N),add,ok)). - '$suspy2'(nospy,T,M) :- + '$suspy2'(nospy,F,N,T,M) :- recorded('$spy','$spy'(T,M),R), !, erase(R), '$rm_spy'(T,M), - functor(T,F,N), print_message(informational,breakp(bp(debugger,plain,M:T,M:F/N,N),remove,last)). - '$suspy2'(nospy,T,M) :- - functor(T,F,N), + '$suspy2'(nospy,F,N,_,M) :- print_message(informational,breakp(no,breakpoint_for,M:F/N)). '$pred_being_spied'(G, M) :- @@ -185,30 +189,33 @@ Sets spy-points on all the predicates represented by _P_. _P_ can either be a single specification or a list of specifications. Each one must be of the form _Name/Arity_ or _Name_. In the last case all predicates with the name - _Name_ will be spied. + _Name_ will be spied. As in C-Prolog, system predicates and +predicates written in C, cannot be spied. */ -spy Spec :- + spy Spec :- '$init_debugger', prolog:debug_action_hook(spy(Spec)), !. -spy L :- - '$suspy'(L, spy), fail. -spy _ :- debug. + spy L :- + '$current_module'(M), + '$suspy'(L, spy, M), fail. + spy _ :- debug. /** @pred nospy( + _P_ ) Removes spy-points from all predicates specified by _P_. -The possible forms for _P_ are the same as in spy/1. +The possible forms for _P_ are the same as in `spy P`. */ -nospy Spec :- + nospy Spec :- '$init_debugger', prolog:debug_action_hook(nospy(Spec)), !. -nospy L :- - '$suspy'(L, nospy), fail. + nospy L :- + '$current_module'(M), + '$suspy'(L, nospy, M), fail. nospy _. /** @pred nospyall @@ -225,11 +232,8 @@ nospyall :- recorded('$spy','$spy'(T,M),_), functor(T,F,N), '$suspy'(F/N,nospy,M), fail. nospyall. -/** debug + % debug mode -> debug flag = 1 -Enters debug mode, meaning that it resets the state of the debugger and -enables the operation of spy-points and creeping. -*/ debug :- '$init_debugger', ( nb_getval('$spy_gn',_) -> true ; nb_setval('$spy_gn',1) ), @@ -883,10 +887,6 @@ be lost. '$is_metapredicate'(G, M), !, '$meta_expansion'(G,M,M,M,G1,[]), '$spycall_expanded'(G1, M, CalledFromDebugger, InRedo). -'$spycall'(G, M, _CalledFromDebugger, _InRedo) :- - '$undefined'(G, M), !, - '$current_module'(Mod), - '$undefp'([M|G], Mod). '$spycall'(G, M, CalledFromDebugger, InRedo) :- '$spycall_expanded'(G, M, CalledFromDebugger, InRedo). diff --git a/pl/flags.yap b/pl/flags.yap index 5cfaac495..72dd877f3 100644 --- a/pl/flags.yap +++ b/pl/flags.yap @@ -598,7 +598,6 @@ yap_flag(V,Out) :- ; '$swi_current_prolog_flag'(V, Current) -> - !, (var(Out) -> Current = Out ; diff --git a/pl/init.yap b/pl/init.yap index 94adcfc9c..562520a10 100644 --- a/pl/init.yap +++ b/pl/init.yap @@ -315,10 +315,10 @@ modules defining clauses for it too. :- dynamic user:portray_message/2. -/** @pred prolog:exception(+ _Exception_, + _Context_, - _Action_) +/** @pred exception(+ _Exception_, + _Context_, - _Action_) -Dynamic predicate, originally defined in SWI-Prolog. The prolog:exception/3 dynamic predicate is Called by the Prolog system on run-time exceptions that can be repaired `just-in-time`. The values for _Exception_ are described below. See also catch/3 and throw/1. +Dynamic predicate, normally not defined. Called by the Prolog system on run-time exceptions that can be repaired `just-in-time`. The values for _Exception_ are described below. See also catch/3 and throw/1. If this hook predicate succeeds it must instantiate the _Action_ argument to the atom `fail` to make the operation fail silently, `retry` to tell Prolog to retry the operation or `error` to make the system generate an exception. The action `retry` only makes sense if this hook modified the environment such that the operation can now succeed without error. + `undefined_predicate` diff --git a/pl/lists.yap b/pl/lists.yap index 935648d88..bf300e794 100644 --- a/pl/lists.yap +++ b/pl/lists.yap @@ -76,11 +76,3 @@ lists:delete([Head|List], Elem, [Head|Residue]) :- :- '$set_yap_flags'(11,0). % disable source. -conjunctions:conj_member(X, Y) :- - var(Y), !, - X = Y. -conjunctions:conj_member(X, (C1,C2)) :- - conjunctions:conj_member(X, C1). -conjunctions:conj_member(X, (C1,C2)) :- - conjunctions:conj_member(X2, C1). -conjunctions:conj_member(X, X). diff --git a/pl/preds.yap b/pl/preds.yap index d5d954475..d046ac6e2 100644 --- a/pl/preds.yap +++ b/pl/preds.yap @@ -22,7 +22,7 @@ Predicates in YAP may be dynamic or static. By default, when consulting or reconsulting, predicates are assumed to be static: execution is faster and the code will probably use less space. -Static predicates impose some restrictions: in general there can be no +Static predicates impose some restrictions: in general there can be no addition or removal of clauses for a procedure if it is being used in the current execution. @@ -30,12 +30,12 @@ Dynamic predicates allow programmers to change the Clausal Data Base with the same flexibility as in C-Prolog. With dynamic predicates it is always possible to add or remove clauses during execution and the semantics will be the same as for C-Prolog. But the programmer should be -aware of the fact that asserting or retracting are still expensive operations, +aware of the fact that asserting or retracting are still expensive operations, and therefore he should try to avoid them whenever possible. - + */ :- system_module( '$_preds', [abolish/1, @@ -103,13 +103,13 @@ and therefore he should try to avoid them whenever possible. % The next predicates are applicable only % to dynamic code -/** @pred asserta(+ _C_) is iso +/** @pred asserta(+ _C_) is iso Adds clause _C_ to the beginning of the program. If the predicate is undefined, declare it as dynamic. - + */ asserta(Mod:C) :- !, '$assert'(C,Mod,first,_,asserta(Mod:C)). @@ -117,7 +117,7 @@ asserta(C) :- '$current_module'(Mod), '$assert'(C,Mod,first,_,asserta(C)). -/** @pred assertz(+ _C_) is iso +/** @pred assertz(+ _C_) is iso Adds clause _C_ to the end of the program. If the predicate is @@ -129,7 +129,7 @@ asserting clauses for static predicates. The current version of YAP supports this feature, but this feature is deprecated and support may go away in future versions. - + */ assertz(Mod:C) :- !, '$assert'(C,Mod,last,_,assertz(Mod:C)). @@ -137,7 +137,7 @@ assertz(C) :- '$current_module'(Mod), '$assert'(C,Mod,last,_,assertz(C)). -/** @pred assert(+ _C_) +/** @pred assert(+ _C_) Same as assertz/1. Adds clause _C_ to the program. If the predicate is undefined, @@ -150,7 +150,7 @@ in use and the language flag is cprolog. Note that this feature is deprecated, if you want to assert clauses for static procedures you should use assert_static/1. - + */ assert(Mod:C) :- !, '$assert'(C,Mod,last,_,assert(Mod:C)). @@ -186,7 +186,7 @@ assert(C) :- '$is_dynamic'(H, Mod) -> '$assertat_d'(Where, H, true, H, Mod, R) ; - '$undefined'(H,Mod) -> + '$undefined'(H,Mod) -> functor(H, Na, Ar), '$dynamic'(Na/Ar, Mod), '$assert_fact'(H,Mod,Where,R) @@ -211,7 +211,7 @@ assert(C) :- '$is_dynamic'(H, Mod) -> '$assertat_d'(Where, H, B, C0, Mod, R) ; - '$undefined'(H,Mod) -> + '$undefined'(H,Mod) -> functor(H, Na, Ar), '$dynamic'(Na/Ar, Mod), '$assert_clause3'(C0,C,Mod,Where,R,P) @@ -242,7 +242,7 @@ assert(C) :- '$is_dynamic'(H, Mod) -> '$assertat_d'(Where,H,B,C0,Mod,R) ; - '$undefined'(H, Mod) -> + '$undefined'(H, Mod) -> functor(H, Na, Ar), '$dynamic'(Na/Ar, Mod), '$assert_dynamic2'(C0,C,Mod,Where,R,P) @@ -251,14 +251,14 @@ assert(C) :- '$do_error'(permission_error(modify,static_procedure,Na/Ar),P) ). -/** @pred assert_static(: _C_) +/** @pred assert_static(: _C_) Adds clause _C_ to a static procedure. Asserting a static clause for a predicate while choice-points for the predicate are available has undefined results. - + */ assert_static(Mod:C) :- !, '$assert_static'(C,Mod,last,_,assert_static(Mod:C)). @@ -266,12 +266,12 @@ assert_static(C) :- '$current_module'(Mod), '$assert_static'(C,Mod,last,_,assert_static(C)). -/** @pred asserta_static(: _C_) +/** @pred asserta_static(: _C_) -Adds clause _C_ to the beginning of a static procedure. - +Adds clause _C_ to the beginning of a static procedure. + */ asserta_static(Mod:C) :- !, '$assert_static'(C,Mod,first,_,asserta_static(Mod:C)). @@ -281,7 +281,7 @@ asserta_static(C) :- asserta_static(Mod:C) :- !, '$assert_static'(C,Mod,last,_,assertz_static(Mod:C)). -/** @pred assertz_static(: _C_) +/** @pred assertz_static(: _C_) Adds clause _C_ to the end of a static procedure. Asserting a @@ -295,7 +295,7 @@ static predicates, if source mode was on when they were compiled: - + */ assertz_static(C) :- '$current_module'(Mod), @@ -328,13 +328,13 @@ assertz_static(C) :- ( Fl /\ 0x20000000 =\= 0 -> '$check_multifile_pred'(Head,Mod,Fl) ; true ) ; true - ), + ), '$head_and_body'(C0, H0, B0), '$recordap'(Mod:Head,(H0 :- B0),R,CR), ( '$is_multifile'(Head, Mod) -> source_location(F, _), functor(H0, Na, Ar), - recorda('$multifile_dynamic'(_,_,_), '$mf'(Na,Ar,Mod,F,R), _) + recorda('$multifile_dynamic'(_,_,_), '$mf'(Na,Ar,Mod,F,R), _) ; true ). @@ -346,13 +346,13 @@ assertz_static(C) :- ( Fl /\ 0x20000000 =\= 0 -> '$check_multifile_pred'(Head,Mod,Fl) ; true ) ; true - ), + ), '$head_and_body'(C0, H0, B0), '$recordzp'(Mod:Head,(H0 :- B0),R,CR), ( '$is_multifile'(H0, Mod) -> source_location(F, _), functor(H0, Na, Ar), - recordz('$multifile_dynamic'(_,_,_), '$mf'(Na,Ar,Mod,F,R), _) + recordz('$multifile_dynamic'(_,_,_), '$mf'(Na,Ar,Mod,F,R), _) ; true ). @@ -363,8 +363,8 @@ assertz_static(C) :- '$assertz_dynamic'(X, C, C0, Mod) :- (X/\4)=:=0, !, '$head_and_body'(C,H,B), '$assertat_d'(last,H,B,C0,Mod,_). -'$assertz_dynamic'(X,C,C0,Mod) :- - '$head_and_body'(C,H,B), +'$assertz_dynamic'(X,C,C0,Mod) :- + '$head_and_body'(C,H,B), functor(H,N,A), ('$check_if_reconsulted'(N,A) -> true @@ -396,12 +396,12 @@ assertz_static(C) :- /** @pred asserta(+ _C_,- _R_) The same as `asserta(C)` but unifying _R_ with -the database reference that identifies the new clause, in a +the database reference that identifies the new clause, in a one-to-one way. Note that `asserta/2` only works for dynamic predicates. If the predicate is undefined, it will automatically be declared dynamic. - + */ asserta(M:C,R) :- !, '$assert_dynamic'(C,M,first,R,asserta(M:C,R)). @@ -412,12 +412,12 @@ asserta(C,R) :- /** @pred assertz(+ _C_,- _R_) The same as `assertz(C)` but unifying _R_ with -the database reference that identifies the new clause, in a +the database reference that identifies the new clause, in a one-to-one way. Note that `asserta/2` only works for dynamic predicates. If the predicate is undefined, it will automatically be declared dynamic. - + */ assertz(M:C,R) :- !, '$assert_dynamic'(C,M,last,R,assertz(M:C,R)). @@ -433,7 +433,7 @@ clause, in a one-to-one way. Note that `asserta/2` only works for dynamic predicates. If the predicate is undefined, it will automatically be declared dynamic. - + */ assert(M:C,R) :- !, '$assert_dynamic'(C,M,last,R,assert(M:C,R)). @@ -441,7 +441,7 @@ assert(C,R) :- '$current_module'(M), '$assert_dynamic'(C,M,last,R,assert(C,R)). -/** @pred clause(+ _H_, _B_) is iso +/** @pred clause(+ _H_, _B_) is iso A clause whose head matches _H_ is searched for in the @@ -452,7 +452,7 @@ program. Its head and body are respectively unified with _H_ and This predicate is applicable to static procedures compiled with `source` active, and to all dynamic procedures. - + */ clause(M:P,Q) :- !, '$clause'(P,M,Q,_). @@ -467,7 +467,7 @@ reference to the clause in the database. You can use instance/2 to access the reference's value. Note that you may not use erase/1 on the reference on static procedures. - + */ clause(P,Q,R) :- var(P), !, '$current_module'(M), @@ -483,9 +483,9 @@ clause(V,Q,R) :- M0 = M, instance(R,T), ( T = (H :- B) -> P = H, Q = B ; P=T, Q = true). -'$clause'(V,M,Q,R) :- var(V), !, +'$clause'(V,M,Q,R) :- var(V), !, '$do_error'(instantiation_error,clause(M:V,Q,R)). -'$clause'(C,M,Q,R) :- +'$clause'(C,M,Q,R) :- number(C), !, '$do_error'(type_error(callable,C),clause(M:C,Q,R)). '$clause'(C,M,Q,R) :- @@ -515,26 +515,26 @@ clause(V,Q,R) :- '$do_error'(permission_error(access,private_procedure,Name/Arity), clause(M:P,Q,R)). -'$init_preds' :- +'$init_preds' :- once('$handle_throw'(_,_,_)), fail. -'$init_preds' :- +'$init_preds' :- once('$do_static_clause'(_,_,_,_,_)), fail. -'$init_preds' :- +'$init_preds' :- once('$do_log_upd_clause0'(_,_,_,_,_,_)), fail. -'$init_preds' :- +'$init_preds' :- once('$do_log_upd_clause'(_,_,_,_,_,_)), fail. -'$init_preds' :- +'$init_preds' :- once('$do_log_upd_clause_erase'(_,_,_,_,_,_)), fail. '$init_preds'. :- '$init_preds'. -/** @pred nth_clause(+ _H_, _I_,- _R_) +/** @pred nth_clause(+ _H_, _I_,- _R_) Find the _I_th clause in the predicate defining _H_, and give @@ -548,7 +548,7 @@ The following predicates can only be used for dynamic predicates: - + */ nth_clause(V,I,R) :- '$current_module'(M), @@ -563,7 +563,7 @@ nth_clause(V,I,R) :- '$nth_clause'(P,M,I,R) :- '$fetch_nth_clause'(P,M,I,R). -/** @pred retract(+ _C_) is iso +/** @pred retract(+ _C_) is iso Erases the first clause in the program that matches _C_. This @@ -571,20 +571,20 @@ predicate may also be used for the static predicates that have been compiled when the source mode was `on`. For more information on source/0 ( (see Setting the Compiler)). - + */ retract(M:C) :- !, '$retract'(C,M). retract(C) :- '$current_module'(M), '$retract'(C,M). - - + + '$retract'(V,_) :- var(V), !, '$do_error'(instantiation_error,retract(V)). '$retract'(M:C,_) :- !, '$retract'(C,M). -'$retract'(C,M) :- +'$retract'(C,M) :- '$check_head_and_body'(C,H,B,retract(M:C)), !, '$flags'(H, M, F, F), '$retract2'(F, H,M,B,_). @@ -595,24 +595,24 @@ retract(C) :- '$log_update_clause'(H,M,B,R), ( F /\ 0x20000000 =:= 0x20000000, recorded('$mf','$mf_clause'(_,_,_,_,R),MR), erase(MR), fail ; true), erase(R). -'$retract2'(F, H, M, B, R) :- +'$retract2'(F, H, M, B, R) :- % '$is_dynamic'(H,M), !, F /\ 0x00002000 =:= 0x00002000, !, '$recordedp'(M:H,(H:-B),R), ( F /\ 0x20000000 =:= 0x20000000, recorded('$mf','$mf_clause'(_,_,_,_,MRef),MR), erase(MR), erase(MRef), fail ; true), erase(R). -'$retract2'(_, H,M,_,_) :- +'$retract2'(_, H,M,_,_) :- '$undefined'(H,M), !, functor(H,Na,Ar), '$dynamic'(Na/Ar,M), fail. -'$retract2'(_, H,M,B,_) :- +'$retract2'(_, H,M,B,_) :- functor(H,Na,Ar), '$do_error'(permission_error(modify,static_procedure,Na/Ar),retract(M:(H:-B))). /** @pred retract(+ _C_,- _R_) -Erases from the program the clause _C_ whose +Erases from the program the clause _C_ whose database reference is _R_. The predicate must be dynamic. @@ -645,9 +645,9 @@ retract(C,R) :- functor(C, Na, Ar). '$fetch_predicate_indicator_from_clause'(C, Na/Ar) :- functor(C, Na, Ar). + - -/** @pred retractall(+ _G_) is iso +/** @pred retractall(+ _G_) is iso Retract all the clauses whose head matches the goal _G_. Goal @@ -689,7 +689,7 @@ retractall(V) :- functor(T,Na,Ar), '$do_error'(permission_error(modify,static_procedure,Na/Ar),retractall(T)) ). - + '$retractall_lu'(T,M) :- '$free_arguments'(T), !, ( '$purge_clauses'(T,M), fail ; true ). @@ -717,14 +717,14 @@ retractall(V) :- Completely delete the predicate with name _P_ and arity _N_. It will remove both static and dynamic predicates. All state on the predicate, including whether it is dynamic or static, multifile, or -meta-predicate, will be lost. +meta-predicate, will be lost. */ abolish(Mod:N,A) :- !, '$abolish'(N,A,Mod). abolish(N,A) :- '$current_module'(Mod), '$abolish'(N,A,Mod). - + '$abolish'(N,A,M) :- var(N), !, '$do_error'(instantiation_error,abolish(M:N,A)). '$abolish'(N,A,M) :- var(A), !, @@ -736,7 +736,7 @@ abolish(N,A) :- ( '$is_dynamic'(T, M) -> '$abolishd'(T,M) ; /* else */ '$abolishs'(T,M) ). -/** @pred abolish(+ _PredSpec_) is iso +/** @pred abolish(+ _PredSpec_) is iso Deletes the predicate given by _PredSpec_ from the database. If @@ -744,9 +744,9 @@ Deletes the predicate given by _PredSpec_ from the database. If current module. The specification must include the name and arity, and it may include module information. Under iso language mode this built-in will only abolish -dynamic procedures. Under other modes it will abolish any procedures. - +dynamic procedures. Under other modes it will abolish any procedures. + */ abolish(V) :- var(V), !, '$do_error'(instantiation_error,abolish(V)). @@ -754,14 +754,14 @@ abolish(Mod:V) :- var(V), !, '$do_error'(instantiation_error,abolish(Mod:V)). abolish(M:X) :- !, '$abolish'(X,M). -abolish(X) :- +abolish(X) :- '$current_module'(M), '$abolish'(X,M). -'$abolish'(X,M) :- +'$abolish'(X,M) :- '$access_yap_flags'(8, 2), !, '$new_abolish'(X,M). -'$abolish'(X, M) :- +'$abolish'(X, M) :- '$old_abolish'(X,M). '$new_abolish'(V,M) :- var(V), !, @@ -858,7 +858,7 @@ abolish(X) :- '$old_abolish'([H|T], M) :- !, '$old_abolish'(H, M), '$old_abolish'(T, M). '$old_abolish'(T, M) :- '$do_error'(type_error(predicate_indicator,T),abolish(M:T)). - + '$abolish_all_old'(M) :- '$current_predicate'(Na, M, S, _), functor( S, Na, Ar ), @@ -913,14 +913,14 @@ abolish(X) :- '$purge_clauses'(G, M), fail. '$abolishs'(_, _). -/** @pred dynamic_predicate(+ _P_,+ _Semantics_) +/** @pred dynamic_predicate(+ _P_,+ _Semantics_) Declares predicate _P_ or list of predicates [ _P1_,..., _Pn_] as a dynamic predicate following either `logical` or `immediate` semantics. - + */ dynamic_predicate(P,Sem) :- '$bad_if_is_semantics'(Sem, dynamic(P,Sem)). @@ -999,7 +999,7 @@ hide_predicate(P) :- '$hide_predicate2'(PredDesc, M) :- '$do_error'(type_error(predicate_indicator,PredDesc),hide_predicate(M:PredDesc)). -/** @pred predicate_property( _P_, _Prop_) is iso +/** @pred predicate_property( _P_, _Prop_) is iso For the predicates obeying the specification _P_ unify _Prop_ @@ -1041,18 +1041,15 @@ true if source for the predicate is available. Number of clauses in the predicate definition. Always one if external or built-in. -+ `notrace` -The predicate definition cannot be traced. - - + */ predicate_property(Pred,Prop) :- var(Pred), !, '$current_module'(Mod), '$predicate_property2'(Pred,Prop,Mod). predicate_property(Mod:Pred,Prop) :- !, '$predicate_property2'(Pred,Prop,Mod). -predicate_property(Pred,Prop) :- +predicate_property(Pred,Prop) :- '$current_module'(Mod), '$predicate_property2'(Pred,Prop,Mod). @@ -1065,10 +1062,10 @@ predicate_property(Pred,Prop) :- '$predicate_property'(Pred,SourceMod,M,Prop). '$predicate_property2'(M:Pred,Prop,_) :- !, '$predicate_property2'(Pred,Prop,M). -'$predicate_property2'(Pred,Prop,Mod) :- +'$predicate_property2'(Pred,Prop,Mod) :- '$pred_exists'(Pred,Mod), !, '$predicate_property'(Pred,Mod,Mod,Prop). -'$predicate_property2'(Pred,Prop,Mod) :- +'$predicate_property2'(Pred,Prop,Mod) :- '$imported_pred'(Pred, Mod, NPred, M), ( Prop = imported_from(M) @@ -1083,12 +1080,12 @@ predicate_property(Pred,Prop) :- recorded('$import','$import'(SourceMod, Mod, Orig, Pred,_,_),_), '$pred_exists'(Orig, SourceMod). -'$predicate_property'(P,M,_,built_in) :- +'$predicate_property'(P,M,_,built_in) :- '$system_predicate'(P,M). -'$predicate_property'(P,M,_,source) :- +'$predicate_property'(P,M,_,source) :- '$flags'(P,M,F,F), F /\ 0x00400000 =\= 0. -'$predicate_property'(P,M,_,tabled) :- +'$predicate_property'(P,M,_,tabled) :- '$flags'(P,M,F,F), F /\ 0x00000040 =\= 0. '$predicate_property'(P,M,_,dynamic) :- @@ -1112,11 +1109,7 @@ predicate_property(Pred,Prop) :- '$predicate_property'(P,Mod,_,number_of_clauses(NCl)) :- '$number_of_clauses'(P,Mod,NCl). '$predicate_property'(P,Mod,_,file(F)) :- - '$owner_file'(P,Mod,F). -'$predicate_property'(P,Mod,_,notrace) :- - '$owner_file'(P,Mod,F). - '$flags'(P,Mod,F,F), - F /\ 0x400000000 =\= 0. + '$owner_file'(P,Mod,F). /** @@ -1147,7 +1140,7 @@ predicate_statistics(P,NCls,Sz,ISz) :- '$predicate_statistics'(P,M,NCls,Sz,ISz) :- '$static_pred_statistics'(P,M,NCls,Sz,ISz). -/** @pred predicate_erased_statistics( _P_, _NCls_, _Sz_, _IndexSz_) +/** @pred predicate_erased_statistics( _P_, _NCls_, _Sz_, _IndexSz_) Given predicate _P_, _NCls_ is the number of erased clauses for @@ -1160,7 +1153,7 @@ of space required to store indices to those clauses (in bytes). */ predicate_erased_statistics(P,NCls,Sz,ISz) :- - var(P), !, + var(P), !, current_predicate(_,P), predicate_erased_statistics(P,NCls,Sz,ISz). predicate_erased_statistics(M:P,NCls,Sz,ISz) :- !, @@ -1171,27 +1164,21 @@ predicate_erased_statistics(P,NCls,Sz,ISz) :- /** @pred current_predicate( _A_, _P_) -Defines the relation: _P_ is a currently defined predicate whose name -is the atom _A_. This includes all predicates defined -within the module and all predicates explicitely imported by the -module, but not the system predicates that are visible by default. - -YAP does not use autoloader by default, so autoloaded predicates are not -included. - +Defines the relation: _P_ is a currently defined predicate whose name is the atom _A_. */ current_predicate(A,T) :- - strip_module(T, M, T0), - ( - '$current_predicate'(A, M, T0, _) + '$system_module'(M), + '$ground_module'(T, M, T0), + ( + '$current_predicate'(A, M, T0, _) ; - '$imported_predicate'(A, M, A/_Arity, T0, _) - ). + '$imported_predicate'(A, M, A/_Arity, T0, _) + ). /** @pred system_predicate( _A_, _P_) Defines the relation: _P_ is a built-in predicate whose name -is the atom _A_. +is the atom _A_. */ system_predicate(A,T) :- @@ -1215,30 +1202,19 @@ system_predicate(P) :- @pred current_predicate( _F_) is iso True if _F_ is the predicate indicator for a currently defined user or - library predicate. The indicator _F_ is of the form _Mod_:_Na_/_Ar_ or _Na/Ar_, + library predicate.The indicator _F_ is of the form _Mod_:_Na_/_Ar_ or _Na/Ar_, where the atom _Mod_ is the module of the predicate, - _Na_ is the name of the predicate, and _Ar_ its arity. - - Notice that this built-in differs from current_predicate/2 in that it also returns all system predicates, as they are available to every module. + _Na_ is the name of the predicate, and _Ar_ its arity. */ current_predicate(F0) :- - strip_module(F0, M, F), - F = A/Arity, - ( - '$current_predicate'(A, M, T, _), - functor( T, A, Arity ) + '$ground_module'(F0, M, F), + ( + '$current_predicate'(N, M, S, _), + functor( S, N, Ar), + F = N/Ar ; - '$imported_predicate'(A, M, A/Arity, _T0, _) - ; - M \= prolog, - '$current_predicate'(A, prolog, T, _), - functor( T, A, Arity ) - ; - M \= system, - '$current_predicate'(A, system, T, _), - functor( T, A, Arity ) - ). - + '$imported_predicate'(_Name, M, F, _S, _) + ). '$imported_predicate'(A, ImportingMod, A/Arity, G, Flags) :- '$get_undefined_pred'(G, ImportingMod, G0, ExportingMod), @@ -1246,7 +1222,7 @@ current_predicate(F0) :- '$pred_exists'(G, ExportingMod), '$flags'(G0, ExportingMod, Flags, Flags). -/** @pred current_key(? _A_,? _K_) +/** @pred current_key(? _A_,? _K_) Defines the relation: _K_ is a currently defined database key whose @@ -1267,7 +1243,7 @@ current_key(A,K) :- ). -/** @pred compile_predicates(: _ListOfNameArity_) +/** @pred compile_predicates(: _ListOfNameArity_) @@ -1338,3 +1314,4 @@ clause_property(ClauseRef, predicate(PredicateIndicator)) :- /** @} */ + diff --git a/pl/protect.yap b/pl/protect.yap index 45b83536b..95c901d2d 100755 --- a/pl/protect.yap +++ b/pl/protect.yap @@ -19,23 +19,28 @@ % This protects all code from further changes % and also makes it impossible from some predicates to be seen - +'$protect' :- + fail, + '$system_mod'( M ), + '$current_predicate'(_A, M, T0, Flags), + NFlags is Flags \/ 0x00004000, + '$flags'(M:T0, Flags, NFlags), + fail. '$protect' :- current_atom(Name), - sub_atom(Name,0,1,_,'$'), - '$hide'(Name), - '$current_predicate'(Name, Mod, P, _Flags0), - '$hide_predicate'(P,Mod), - fail. + atom_codes(Name,[0'$|_]), +% '$hide_predicates'(Name), + '$hide'(Name). '$protect' :- - '$hide'(bootstrap), - '$hide_predicate'(bootstrap), - fail. + '$hide_predicates'(bootstrap), + '$hide'(bootstrap). '$protect'. -'$notrace_predicate'(Mod:P, Flags0) :- - Flags is Flags0 \/ 0x400000000, - '$flags'(P, Mod, Flags0, Flags ). +'$hide_predicates'(Name) :- + '$current_predicate'(Name, Mod, P, _), + '$hide_predicate'(P,Mod), + fail. +'$hide_predicates'(_). % hide all atoms who start by '$' '$hide'('$VAR') :- !, fail. /* not $VAR */