2005-01-04 02:50:23 +00:00
|
|
|
|
2008-08-29 17:27:11 +01:00
|
|
|
/* This file was generated automatically by "yap -L misc/buildops"
|
|
|
|
please do not update */
|
|
|
|
|
2005-01-04 02:50:23 +00:00
|
|
|
|
|
|
|
static void
|
2011-03-07 16:02:55 +00:00
|
|
|
restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
2005-01-04 02:50:23 +00:00
|
|
|
{
|
2010-01-12 10:08:38 +00:00
|
|
|
yamop *opc = NULL;
|
2005-01-04 02:50:23 +00:00
|
|
|
do {
|
2009-11-02 12:46:39 +00:00
|
|
|
op_numbers op;
|
|
|
|
if (max && pc >= max) return;
|
|
|
|
op = Yap_op_from_opcode(pc->opc);
|
2005-01-04 02:50:23 +00:00
|
|
|
pc->opc = Yap_opcode(op);
|
|
|
|
#ifdef DEBUG_RESTORE2
|
2005-07-06 16:10:18 +01:00
|
|
|
fprintf(stderr, "%s ", Yap_op_names[op]);
|
2005-01-04 02:50:23 +00:00
|
|
|
#endif
|
|
|
|
switch (op) {
|
2010-12-16 22:21:46 +00:00
|
|
|
/* instructions type D */
|
|
|
|
case _write_dbterm:
|
|
|
|
pc->u.D.D = DBGroundTermAdjust(pc->u.D.D);
|
|
|
|
pc = NEXTOP(pc,D);
|
|
|
|
break;
|
2011-06-24 21:08:22 +01:00
|
|
|
/* instructions type Illss */
|
2008-08-29 17:27:11 +01:00
|
|
|
case _enter_lu_pred:
|
2011-06-24 21:08:22 +01:00
|
|
|
pc->u.Illss.I = PtoLUIndexAdjust(pc->u.Illss.I);
|
|
|
|
pc->u.Illss.l1 = PtoOpAdjust(pc->u.Illss.l1);
|
|
|
|
pc->u.Illss.l2 = PtoOpAdjust(pc->u.Illss.l2);
|
|
|
|
pc->u.Illss.s = ConstantAdjust(pc->u.Illss.s);
|
|
|
|
pc->u.Illss.e = ConstantAdjust(pc->u.Illss.e);
|
|
|
|
opc = NEXTOP(pc,Illss);
|
|
|
|
pc = pc->u.Illss.l1;
|
2008-08-29 17:27:11 +01:00
|
|
|
break;
|
|
|
|
/* instructions type L */
|
|
|
|
case _alloc_for_logical_pred:
|
|
|
|
pc->u.L.ClBase = PtoLUClauseAdjust(pc->u.L.ClBase);
|
|
|
|
pc = NEXTOP(pc,L);
|
|
|
|
break;
|
2010-12-16 22:21:46 +00:00
|
|
|
/* instructions type N */
|
|
|
|
case _write_bigint:
|
|
|
|
pc->u.N.b = BlobTermInCodeAdjust(pc->u.N.b);
|
|
|
|
pc = NEXTOP(pc,N);
|
|
|
|
break;
|
2008-09-05 05:22:19 +01:00
|
|
|
/* instructions type Osblp */
|
|
|
|
case _either:
|
|
|
|
case _or_else:
|
|
|
|
OrArgAdjust(pc->u.Osblp.or_arg);
|
|
|
|
pc->u.Osblp.s = ConstantAdjust(pc->u.Osblp.s);
|
|
|
|
pc->u.Osblp.bmap = CellPtoHeapAdjust(pc->u.Osblp.bmap);
|
|
|
|
pc->u.Osblp.l = PtoOpAdjust(pc->u.Osblp.l);
|
|
|
|
pc->u.Osblp.p0 = PtoPredAdjust(pc->u.Osblp.p0);
|
|
|
|
pc = NEXTOP(pc,Osblp);
|
|
|
|
break;
|
|
|
|
/* instructions type Osbmp */
|
|
|
|
case _p_execute:
|
2012-12-07 23:43:00 +00:00
|
|
|
case _p_execute_tail:
|
2008-09-05 05:22:19 +01:00
|
|
|
OrArgAdjust(pc->u.Osbmp.or_arg);
|
|
|
|
pc->u.Osbmp.s = ConstantAdjust(pc->u.Osbmp.s);
|
2010-08-02 19:47:29 +01:00
|
|
|
pc->u.Osbmp.bmap = CellPtoHeapAdjust(pc->u.Osbmp.bmap);
|
|
|
|
pc->u.Osbmp.mod = ModuleAdjust(pc->u.Osbmp.mod);
|
|
|
|
pc->u.Osbmp.p0 = PtoPredAdjust(pc->u.Osbmp.p0);
|
|
|
|
pc = NEXTOP(pc,Osbmp);
|
|
|
|
break;
|
2011-07-30 00:07:35 +01:00
|
|
|
/* instructions type Osbpa */
|
2010-08-02 18:20:03 +01:00
|
|
|
case _ensure_space:
|
2011-07-30 00:07:35 +01:00
|
|
|
OrArgAdjust(pc->u.Osbpa.or_arg);
|
|
|
|
pc->u.Osbpa.s = ConstantAdjust(pc->u.Osbpa.s);
|
|
|
|
pc->u.Osbpa.bmap = CellPtoHeapAdjust(pc->u.Osbpa.bmap);
|
|
|
|
pc->u.Osbpa.p = PtoPredAdjust(pc->u.Osbpa.p);
|
|
|
|
pc->u.Osbpa.i = ArityAdjust(pc->u.Osbpa.i);
|
|
|
|
pc = NEXTOP(pc,Osbpa);
|
2008-09-05 05:22:19 +01:00
|
|
|
break;
|
|
|
|
/* instructions type Osbpp */
|
|
|
|
case _call:
|
|
|
|
case _call_cpred:
|
|
|
|
case _call_usercpred:
|
|
|
|
case _fcall:
|
|
|
|
case _p_execute2:
|
|
|
|
OrArgAdjust(pc->u.Osbpp.or_arg);
|
|
|
|
pc->u.Osbpp.s = ConstantAdjust(pc->u.Osbpp.s);
|
|
|
|
pc->u.Osbpp.bmap = CellPtoHeapAdjust(pc->u.Osbpp.bmap);
|
|
|
|
pc->u.Osbpp.p = PtoPredAdjust(pc->u.Osbpp.p);
|
|
|
|
pc->u.Osbpp.p0 = PtoPredAdjust(pc->u.Osbpp.p0);
|
|
|
|
pc = NEXTOP(pc,Osbpp);
|
|
|
|
break;
|
|
|
|
/* instructions type OtILl */
|
|
|
|
case _count_trust_logical:
|
|
|
|
case _profiled_trust_logical:
|
|
|
|
case _trust_logical:
|
|
|
|
OrArgAdjust(pc->u.OtILl.or_arg);
|
|
|
|
TabEntryAdjust(pc->u.OtILl.te);
|
|
|
|
pc->u.OtILl.block = PtoLUIndexAdjust(pc->u.OtILl.block);
|
|
|
|
pc->u.OtILl.d = PtoLUClauseAdjust(pc->u.OtILl.d);
|
|
|
|
pc->u.OtILl.n = PtoOpAdjust(pc->u.OtILl.n);
|
2010-01-12 10:08:38 +00:00
|
|
|
pc = opc;
|
2008-09-05 05:22:19 +01:00
|
|
|
break;
|
|
|
|
/* instructions type OtaLl */
|
2008-08-29 17:27:11 +01:00
|
|
|
case _count_retry_logical:
|
|
|
|
case _profiled_retry_logical:
|
|
|
|
case _retry_logical:
|
|
|
|
case _try_logical:
|
2008-09-05 05:22:19 +01:00
|
|
|
OrArgAdjust(pc->u.OtaLl.or_arg);
|
|
|
|
TabEntryAdjust(pc->u.OtaLl.te);
|
|
|
|
pc->u.OtaLl.s = ArityAdjust(pc->u.OtaLl.s);
|
|
|
|
pc->u.OtaLl.d = PtoLUClauseAdjust(pc->u.OtaLl.d);
|
|
|
|
pc->u.OtaLl.n = PtoOpAdjust(pc->u.OtaLl.n);
|
2010-01-12 10:08:38 +00:00
|
|
|
pc = pc->u.OtaLl.n;
|
2008-09-05 05:22:19 +01:00
|
|
|
break;
|
|
|
|
/* instructions type OtapFs */
|
2008-08-29 17:27:11 +01:00
|
|
|
#ifdef CUT_C
|
|
|
|
case _cut_c:
|
2005-01-04 02:50:23 +00:00
|
|
|
#endif
|
2008-08-29 17:27:11 +01:00
|
|
|
#ifdef CUT_C
|
|
|
|
case _cut_userc:
|
|
|
|
#endif
|
|
|
|
case _retry_c:
|
|
|
|
case _retry_userc:
|
|
|
|
case _try_c:
|
|
|
|
case _try_userc:
|
2008-09-05 05:22:19 +01:00
|
|
|
OrArgAdjust(pc->u.OtapFs.or_arg);
|
|
|
|
TabEntryAdjust(pc->u.OtapFs.te);
|
|
|
|
pc->u.OtapFs.s = ArityAdjust(pc->u.OtapFs.s);
|
|
|
|
pc->u.OtapFs.p = PtoPredAdjust(pc->u.OtapFs.p);
|
|
|
|
pc->u.OtapFs.f = ExternalFunctionAdjust(pc->u.OtapFs.f);
|
|
|
|
pc->u.OtapFs.extra = ConstantAdjust(pc->u.OtapFs.extra);
|
|
|
|
pc = NEXTOP(pc,OtapFs);
|
|
|
|
break;
|
|
|
|
/* instructions type Otapl */
|
2008-08-29 17:27:11 +01:00
|
|
|
case _count_retry_and_mark:
|
2005-01-04 02:50:23 +00:00
|
|
|
case _count_retry_me:
|
|
|
|
case _count_trust_me:
|
|
|
|
case _profiled_retry_and_mark:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _profiled_retry_me:
|
|
|
|
case _profiled_trust_me:
|
2005-01-04 02:50:23 +00:00
|
|
|
case _retry:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _retry_and_mark:
|
|
|
|
case _retry_me:
|
|
|
|
case _spy_or_trymark:
|
2005-01-04 02:50:23 +00:00
|
|
|
case _trust:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trust_me:
|
|
|
|
case _try_and_mark:
|
|
|
|
case _try_clause:
|
|
|
|
case _try_me:
|
2008-09-05 05:22:19 +01:00
|
|
|
OrArgAdjust(pc->u.Otapl.or_arg);
|
|
|
|
TabEntryAdjust(pc->u.Otapl.te);
|
|
|
|
pc->u.Otapl.s = ArityAdjust(pc->u.Otapl.s);
|
|
|
|
pc->u.Otapl.p = PtoPredAdjust(pc->u.Otapl.p);
|
|
|
|
pc->u.Otapl.d = PtoOpAdjust(pc->u.Otapl.d);
|
|
|
|
pc = NEXTOP(pc,Otapl);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2009-04-07 23:55:16 +01:00
|
|
|
/* instructions type aFlp */
|
|
|
|
case _native_me:
|
|
|
|
pc->u.aFlp.n = ArityAdjust(pc->u.aFlp.n);
|
|
|
|
pc->u.aFlp.native = ExternalFunctionAdjust(pc->u.aFlp.native);
|
|
|
|
pc->u.aFlp.native_next = PtoOpAdjust(pc->u.aFlp.native_next);
|
2009-04-08 00:32:36 +01:00
|
|
|
pc->u.aFlp.p = PtoPredAdjust(pc->u.aFlp.p);
|
2009-04-07 23:55:16 +01:00
|
|
|
pc = NEXTOP(pc,aFlp);
|
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type c */
|
|
|
|
case _write_atom:
|
|
|
|
pc->u.c.c = ConstantTermAdjust(pc->u.c.c);
|
|
|
|
pc = NEXTOP(pc,c);
|
2006-10-10 15:08:17 +01:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type cc */
|
|
|
|
case _get_2atoms:
|
|
|
|
pc->u.cc.c1 = ConstantTermAdjust(pc->u.cc.c1);
|
|
|
|
pc->u.cc.c2 = ConstantTermAdjust(pc->u.cc.c2);
|
|
|
|
pc = NEXTOP(pc,cc);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type ccc */
|
|
|
|
case _get_3atoms:
|
|
|
|
pc->u.ccc.c1 = ConstantTermAdjust(pc->u.ccc.c1);
|
|
|
|
pc->u.ccc.c2 = ConstantTermAdjust(pc->u.ccc.c2);
|
|
|
|
pc->u.ccc.c3 = ConstantTermAdjust(pc->u.ccc.c3);
|
|
|
|
pc = NEXTOP(pc,ccc);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type cccc */
|
|
|
|
case _get_4atoms:
|
|
|
|
pc->u.cccc.c1 = ConstantTermAdjust(pc->u.cccc.c1);
|
|
|
|
pc->u.cccc.c2 = ConstantTermAdjust(pc->u.cccc.c2);
|
|
|
|
pc->u.cccc.c3 = ConstantTermAdjust(pc->u.cccc.c3);
|
|
|
|
pc->u.cccc.c4 = ConstantTermAdjust(pc->u.cccc.c4);
|
|
|
|
pc = NEXTOP(pc,cccc);
|
2005-12-17 03:25:39 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type ccccc */
|
|
|
|
case _get_5atoms:
|
|
|
|
pc->u.ccccc.c1 = ConstantTermAdjust(pc->u.ccccc.c1);
|
|
|
|
pc->u.ccccc.c2 = ConstantTermAdjust(pc->u.ccccc.c2);
|
|
|
|
pc->u.ccccc.c3 = ConstantTermAdjust(pc->u.ccccc.c3);
|
|
|
|
pc->u.ccccc.c4 = ConstantTermAdjust(pc->u.ccccc.c4);
|
|
|
|
pc->u.ccccc.c5 = ConstantTermAdjust(pc->u.ccccc.c5);
|
|
|
|
pc = NEXTOP(pc,ccccc);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type cccccc */
|
|
|
|
case _get_6atoms:
|
|
|
|
pc->u.cccccc.c1 = ConstantTermAdjust(pc->u.cccccc.c1);
|
|
|
|
pc->u.cccccc.c2 = ConstantTermAdjust(pc->u.cccccc.c2);
|
|
|
|
pc->u.cccccc.c3 = ConstantTermAdjust(pc->u.cccccc.c3);
|
|
|
|
pc->u.cccccc.c4 = ConstantTermAdjust(pc->u.cccccc.c4);
|
|
|
|
pc->u.cccccc.c5 = ConstantTermAdjust(pc->u.cccccc.c5);
|
|
|
|
pc->u.cccccc.c6 = ConstantTermAdjust(pc->u.cccccc.c6);
|
|
|
|
pc = NEXTOP(pc,cccccc);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type clll */
|
|
|
|
case _if_not_then:
|
|
|
|
pc->u.clll.c = ConstantTermAdjust(pc->u.clll.c);
|
|
|
|
pc->u.clll.l1 = PtoOpAdjust(pc->u.clll.l1);
|
|
|
|
pc->u.clll.l2 = PtoOpAdjust(pc->u.clll.l2);
|
|
|
|
pc->u.clll.l3 = PtoOpAdjust(pc->u.clll.l3);
|
|
|
|
pc = NEXTOP(pc,clll);
|
|
|
|
break;
|
|
|
|
/* instructions type d */
|
|
|
|
case _write_float:
|
|
|
|
DoubleInCodeAdjust(pc->u.d.d);
|
|
|
|
pc = NEXTOP(pc,d);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
|
|
|
/* instructions type e */
|
2008-08-29 17:27:11 +01:00
|
|
|
case _Nstop:
|
|
|
|
case _allocate:
|
2005-01-04 02:50:23 +00:00
|
|
|
case _copy_idb_term:
|
2013-01-07 09:47:14 +00:00
|
|
|
case _enter_exo:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _expand_index:
|
|
|
|
case _index_blob:
|
|
|
|
case _index_dbref:
|
2009-02-09 21:56:40 +00:00
|
|
|
case _index_long:
|
2005-01-04 02:50:23 +00:00
|
|
|
case _index_pred:
|
2007-11-26 23:43:10 +00:00
|
|
|
case _lock_pred:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _op_fail:
|
|
|
|
case _p_equal:
|
|
|
|
case _p_functor:
|
|
|
|
case _pop:
|
2006-04-27 15:13:24 +01:00
|
|
|
#ifdef BEAM
|
|
|
|
case _retry_eam:
|
|
|
|
#endif
|
2008-08-29 17:27:11 +01:00
|
|
|
case _spy_pred:
|
2008-03-25 22:03:14 +00:00
|
|
|
#ifdef THREADS
|
2005-01-04 02:50:23 +00:00
|
|
|
case _thread_local:
|
|
|
|
#endif
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trust_fail:
|
2005-01-04 02:50:23 +00:00
|
|
|
case _undef_p:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _unify_idb_term:
|
2005-01-04 02:50:23 +00:00
|
|
|
case _unlock_lu:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _write_l_list:
|
|
|
|
case _write_list:
|
|
|
|
case _write_void:
|
|
|
|
if (op == _Nstop || op == _copy_idb_term || op == _unify_idb_term) return;
|
2005-01-04 02:50:23 +00:00
|
|
|
pc = NEXTOP(pc,e);
|
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type fa */
|
|
|
|
case _write_l_struc:
|
|
|
|
case _write_struct:
|
|
|
|
pc->u.fa.f = FuncAdjust(pc->u.fa.f);
|
|
|
|
pc->u.fa.a = ArityAdjust(pc->u.fa.a);
|
|
|
|
pc = NEXTOP(pc,fa);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type i */
|
|
|
|
case _write_longint:
|
|
|
|
IntegerInCodeAdjust(pc->u.i.i);
|
|
|
|
pc = NEXTOP(pc,i);
|
2006-09-20 21:03:51 +01:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type l */
|
|
|
|
case _Ystop:
|
|
|
|
case _jump:
|
|
|
|
case _jump_if_var:
|
|
|
|
case _move_back:
|
|
|
|
case _p_dif:
|
|
|
|
case _p_eq:
|
|
|
|
case _retry2:
|
|
|
|
case _retry3:
|
|
|
|
case _retry4:
|
|
|
|
case _skip:
|
|
|
|
case _try_clause2:
|
|
|
|
case _try_clause3:
|
|
|
|
case _try_clause4:
|
|
|
|
case _try_in:
|
|
|
|
pc->u.l.l = PtoOpAdjust(pc->u.l.l);
|
|
|
|
if (op == _Ystop) return;
|
|
|
|
pc = NEXTOP(pc,l);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type llll */
|
|
|
|
case _switch_on_type:
|
|
|
|
pc->u.llll.l1 = PtoOpAdjust(pc->u.llll.l1);
|
|
|
|
pc->u.llll.l2 = PtoOpAdjust(pc->u.llll.l2);
|
|
|
|
pc->u.llll.l3 = PtoOpAdjust(pc->u.llll.l3);
|
|
|
|
pc->u.llll.l4 = PtoOpAdjust(pc->u.llll.l4);
|
|
|
|
pc = NEXTOP(pc,llll);
|
2008-04-01 09:42:46 +01:00
|
|
|
break;
|
2009-02-12 21:35:31 +00:00
|
|
|
/* instructions type lp */
|
2013-01-08 12:35:18 +00:00
|
|
|
case _retry_all_exo:
|
2013-01-07 09:47:14 +00:00
|
|
|
case _retry_exo:
|
2013-01-08 12:35:18 +00:00
|
|
|
case _try_all_exo:
|
2013-01-07 09:47:14 +00:00
|
|
|
case _try_exo:
|
2009-02-12 21:35:31 +00:00
|
|
|
case _user_switch:
|
|
|
|
pc->u.lp.l = PtoOpAdjust(pc->u.lp.l);
|
|
|
|
pc->u.lp.p = PtoPredAdjust(pc->u.lp.p);
|
|
|
|
pc = NEXTOP(pc,lp);
|
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type o */
|
|
|
|
case _unify_l_list:
|
|
|
|
case _unify_l_list_write:
|
|
|
|
case _unify_l_void:
|
|
|
|
case _unify_l_void_write:
|
|
|
|
case _unify_list:
|
|
|
|
case _unify_list_write:
|
|
|
|
case _unify_void:
|
|
|
|
case _unify_void_write:
|
|
|
|
pc->u.o.opcw = OpcodeAdjust(pc->u.o.opcw);
|
|
|
|
pc = NEXTOP(pc,o);
|
2008-04-01 09:42:46 +01:00
|
|
|
break;
|
2010-12-16 20:39:53 +00:00
|
|
|
/* instructions type oD */
|
|
|
|
case _unify_dbterm:
|
|
|
|
case _unify_l_dbterm:
|
|
|
|
pc->u.oD.opcw = OpcodeAdjust(pc->u.oD.opcw);
|
|
|
|
pc->u.oD.D = DBGroundTermAdjust(pc->u.oD.D);
|
|
|
|
pc = NEXTOP(pc,oD);
|
|
|
|
break;
|
2010-12-16 22:21:46 +00:00
|
|
|
/* instructions type oN */
|
|
|
|
case _unify_bigint:
|
|
|
|
case _unify_l_bigint:
|
|
|
|
pc->u.oN.opcw = OpcodeAdjust(pc->u.oN.opcw);
|
|
|
|
pc->u.oN.b = BlobTermInCodeAdjust(pc->u.oN.b);
|
|
|
|
pc = NEXTOP(pc,oN);
|
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type oc */
|
|
|
|
case _unify_atom:
|
|
|
|
case _unify_atom_write:
|
|
|
|
case _unify_l_atom:
|
|
|
|
case _unify_l_atom_write:
|
|
|
|
pc->u.oc.opcw = OpcodeAdjust(pc->u.oc.opcw);
|
|
|
|
pc->u.oc.c = ConstantTermAdjust(pc->u.oc.c);
|
|
|
|
pc = NEXTOP(pc,oc);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type od */
|
|
|
|
case _unify_float:
|
|
|
|
case _unify_float_write:
|
|
|
|
case _unify_l_float:
|
|
|
|
case _unify_l_float_write:
|
|
|
|
pc->u.od.opcw = OpcodeAdjust(pc->u.od.opcw);
|
|
|
|
DoubleInCodeAdjust(pc->u.od.d);
|
|
|
|
pc = NEXTOP(pc,od);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type ofa */
|
|
|
|
case _unify_l_struc:
|
|
|
|
case _unify_l_struc_write:
|
|
|
|
case _unify_struct:
|
|
|
|
case _unify_struct_write:
|
|
|
|
pc->u.ofa.opcw = OpcodeAdjust(pc->u.ofa.opcw);
|
|
|
|
pc->u.ofa.f = FuncAdjust(pc->u.ofa.f);
|
|
|
|
pc->u.ofa.a = ArityAdjust(pc->u.ofa.a);
|
|
|
|
pc = NEXTOP(pc,ofa);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type oi */
|
|
|
|
case _unify_l_longint:
|
|
|
|
case _unify_l_longint_write:
|
|
|
|
case _unify_longint:
|
|
|
|
case _unify_longint_write:
|
|
|
|
pc->u.oi.opcw = OpcodeAdjust(pc->u.oi.opcw);
|
|
|
|
IntegerInCodeAdjust(pc->u.oi.i);
|
|
|
|
pc = NEXTOP(pc,oi);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type ollll */
|
|
|
|
case _switch_list_nl:
|
|
|
|
pc->u.ollll.pop = OpcodeAdjust(pc->u.ollll.pop);
|
|
|
|
pc->u.ollll.l1 = PtoOpAdjust(pc->u.ollll.l1);
|
|
|
|
pc->u.ollll.l2 = PtoOpAdjust(pc->u.ollll.l2);
|
|
|
|
pc->u.ollll.l3 = PtoOpAdjust(pc->u.ollll.l3);
|
|
|
|
pc->u.ollll.l4 = PtoOpAdjust(pc->u.ollll.l4);
|
|
|
|
pc = NEXTOP(pc,ollll);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type os */
|
|
|
|
#ifdef BEAM
|
|
|
|
case _run_eam:
|
|
|
|
#endif
|
|
|
|
case _unify_l_n_voids:
|
|
|
|
case _unify_l_n_voids_write:
|
|
|
|
case _unify_n_voids:
|
|
|
|
case _unify_n_voids_write:
|
|
|
|
pc->u.os.opcw = OpcodeAdjust(pc->u.os.opcw);
|
|
|
|
pc->u.os.s = ConstantAdjust(pc->u.os.s);
|
|
|
|
pc = NEXTOP(pc,os);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type osc */
|
|
|
|
case _unify_n_atoms:
|
|
|
|
case _unify_n_atoms_write:
|
|
|
|
pc->u.osc.opcw = OpcodeAdjust(pc->u.osc.opcw);
|
|
|
|
pc->u.osc.s = ConstantAdjust(pc->u.osc.s);
|
|
|
|
pc->u.osc.c = ConstantTermAdjust(pc->u.osc.c);
|
|
|
|
pc = NEXTOP(pc,osc);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
|
|
|
/* instructions type ox */
|
2008-08-29 17:27:11 +01:00
|
|
|
case _save_appl_x:
|
|
|
|
case _save_appl_x_write:
|
|
|
|
case _save_pair_x:
|
|
|
|
case _save_pair_x_write:
|
|
|
|
case _unify_l_x_loc:
|
|
|
|
case _unify_l_x_loc_write:
|
|
|
|
case _unify_l_x_val:
|
|
|
|
case _unify_l_x_val_write:
|
2005-01-04 02:50:23 +00:00
|
|
|
case _unify_l_x_var:
|
|
|
|
case _unify_l_x_var_write:
|
|
|
|
case _unify_x_loc:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _unify_x_loc_write:
|
|
|
|
case _unify_x_val:
|
|
|
|
case _unify_x_val_write:
|
|
|
|
case _unify_x_var:
|
|
|
|
case _unify_x_var_write:
|
|
|
|
pc->u.ox.opcw = OpcodeAdjust(pc->u.ox.opcw);
|
2005-01-04 02:50:23 +00:00
|
|
|
pc->u.ox.x = XAdjust(pc->u.ox.x);
|
|
|
|
pc = NEXTOP(pc,ox);
|
|
|
|
break;
|
|
|
|
/* instructions type oxx */
|
|
|
|
case _unify_l_x_var2:
|
|
|
|
case _unify_l_x_var2_write:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _unify_x_var2:
|
|
|
|
case _unify_x_var2_write:
|
|
|
|
pc->u.oxx.opcw = OpcodeAdjust(pc->u.oxx.opcw);
|
2005-01-04 02:50:23 +00:00
|
|
|
pc->u.oxx.xl = XAdjust(pc->u.oxx.xl);
|
|
|
|
pc->u.oxx.xr = XAdjust(pc->u.oxx.xr);
|
|
|
|
pc = NEXTOP(pc,oxx);
|
|
|
|
break;
|
|
|
|
/* instructions type oy */
|
2008-08-29 17:27:11 +01:00
|
|
|
case _save_appl_y:
|
|
|
|
case _save_appl_y_write:
|
|
|
|
case _save_pair_y:
|
|
|
|
case _save_pair_y_write:
|
|
|
|
case _unify_l_y_loc:
|
|
|
|
case _unify_l_y_loc_write:
|
|
|
|
case _unify_l_y_val:
|
|
|
|
case _unify_l_y_val_write:
|
2005-01-04 02:50:23 +00:00
|
|
|
case _unify_l_y_var:
|
|
|
|
case _unify_l_y_var_write:
|
|
|
|
case _unify_y_loc:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _unify_y_loc_write:
|
|
|
|
case _unify_y_val:
|
|
|
|
case _unify_y_val_write:
|
|
|
|
case _unify_y_var:
|
|
|
|
case _unify_y_var_write:
|
|
|
|
pc->u.oy.opcw = OpcodeAdjust(pc->u.oy.opcw);
|
|
|
|
pc->u.oy.y = YAdjust(pc->u.oy.y);
|
|
|
|
pc = NEXTOP(pc,oy);
|
2006-09-20 21:03:51 +01:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type p */
|
|
|
|
case _count_call:
|
|
|
|
case _count_retry:
|
2008-08-30 16:24:44 +01:00
|
|
|
case _deallocate:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _enter_profiling:
|
|
|
|
case _lock_lu:
|
|
|
|
case _procceed:
|
|
|
|
case _retry_profiled:
|
2013-01-22 16:01:37 +00:00
|
|
|
case _retry_udi:
|
|
|
|
case _try_udi:
|
2008-08-29 17:27:11 +01:00
|
|
|
pc->u.p.p = PtoPredAdjust(pc->u.p.p);
|
|
|
|
pc = NEXTOP(pc,p);
|
2006-09-20 21:03:51 +01:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type plxxs */
|
|
|
|
case _call_bfunc_xx:
|
|
|
|
pc->u.plxxs.p = PtoPredAdjust(pc->u.plxxs.p);
|
|
|
|
pc->u.plxxs.f = PtoOpAdjust(pc->u.plxxs.f);
|
|
|
|
pc->u.plxxs.x1 = XAdjust(pc->u.plxxs.x1);
|
|
|
|
pc->u.plxxs.x2 = XAdjust(pc->u.plxxs.x2);
|
|
|
|
pc->u.plxxs.flags = ConstantAdjust(pc->u.plxxs.flags);
|
|
|
|
pc = NEXTOP(pc,plxxs);
|
2008-04-01 09:42:46 +01:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type plxys */
|
|
|
|
case _call_bfunc_xy:
|
|
|
|
case _call_bfunc_yx:
|
|
|
|
pc->u.plxys.p = PtoPredAdjust(pc->u.plxys.p);
|
|
|
|
pc->u.plxys.f = PtoOpAdjust(pc->u.plxys.f);
|
|
|
|
pc->u.plxys.x = XAdjust(pc->u.plxys.x);
|
|
|
|
pc->u.plxys.y = YAdjust(pc->u.plxys.y);
|
|
|
|
pc->u.plxys.flags = ConstantAdjust(pc->u.plxys.flags);
|
|
|
|
pc = NEXTOP(pc,plxys);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type plyys */
|
|
|
|
case _call_bfunc_yy:
|
|
|
|
pc->u.plyys.p = PtoPredAdjust(pc->u.plyys.p);
|
|
|
|
pc->u.plyys.f = PtoOpAdjust(pc->u.plyys.f);
|
|
|
|
pc->u.plyys.y1 = YAdjust(pc->u.plyys.y1);
|
|
|
|
pc->u.plyys.y2 = YAdjust(pc->u.plyys.y2);
|
|
|
|
pc->u.plyys.flags = ConstantAdjust(pc->u.plyys.flags);
|
|
|
|
pc = NEXTOP(pc,plyys);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type pp */
|
|
|
|
case _dexecute:
|
|
|
|
case _execute:
|
|
|
|
case _execute_cpred:
|
|
|
|
pc->u.pp.p = PtoPredAdjust(pc->u.pp.p);
|
|
|
|
pc->u.pp.p0 = PtoPredAdjust(pc->u.pp.p0);
|
|
|
|
pc = NEXTOP(pc,pp);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
|
|
|
/* instructions type s */
|
2011-02-14 14:57:16 +00:00
|
|
|
case _cut:
|
|
|
|
case _cut_e:
|
|
|
|
case _cut_t:
|
2005-01-04 02:50:23 +00:00
|
|
|
case _pop_n:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _write_n_voids:
|
|
|
|
pc->u.s.s = ConstantAdjust(pc->u.s.s);
|
2005-01-04 02:50:23 +00:00
|
|
|
pc = NEXTOP(pc,s);
|
|
|
|
break;
|
|
|
|
/* instructions type sc */
|
2008-08-29 17:27:11 +01:00
|
|
|
case _write_n_atoms:
|
|
|
|
pc->u.sc.s = ConstantAdjust(pc->u.sc.s);
|
|
|
|
pc->u.sc.c = ConstantTermAdjust(pc->u.sc.c);
|
2005-01-04 02:50:23 +00:00
|
|
|
pc = NEXTOP(pc,sc);
|
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type sllll */
|
|
|
|
case _switch_on_sub_arg_type:
|
|
|
|
pc->u.sllll.s = ConstantAdjust(pc->u.sllll.s);
|
|
|
|
pc->u.sllll.l1 = PtoOpAdjust(pc->u.sllll.l1);
|
|
|
|
pc->u.sllll.l2 = PtoOpAdjust(pc->u.sllll.l2);
|
|
|
|
pc->u.sllll.l3 = PtoOpAdjust(pc->u.sllll.l3);
|
|
|
|
pc->u.sllll.l4 = PtoOpAdjust(pc->u.sllll.l4);
|
|
|
|
pc = NEXTOP(pc,sllll);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-12-09 12:54:27 +00:00
|
|
|
/* instructions type slp */
|
|
|
|
case _call_c_wfail:
|
|
|
|
pc->u.slp.s = ConstantAdjust(pc->u.slp.s);
|
|
|
|
pc->u.slp.l = PtoOpAdjust(pc->u.slp.l);
|
|
|
|
pc->u.slp.p = PtoPredAdjust(pc->u.slp.p);
|
|
|
|
pc = NEXTOP(pc,slp);
|
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type sssl */
|
|
|
|
case _go_on_cons:
|
|
|
|
case _go_on_func:
|
|
|
|
case _if_cons:
|
|
|
|
case _if_func:
|
|
|
|
case _switch_on_cons:
|
|
|
|
case _switch_on_func:
|
|
|
|
pc->u.sssl.s = ConstantAdjust(pc->u.sssl.s);
|
|
|
|
pc->u.sssl.e = ConstantAdjust(pc->u.sssl.e);
|
|
|
|
pc->u.sssl.w = ConstantAdjust(pc->u.sssl.w);
|
|
|
|
pc->u.sssl.l = PtoOpAdjust(pc->u.sssl.l);
|
|
|
|
AdjustSwitchTable(op, pc->u.sssl.l, pc->u.sssl.s);
|
|
|
|
pc = NEXTOP(pc,sssl);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type sssllp */
|
|
|
|
case _expand_clauses:
|
|
|
|
pc->u.sssllp.s1 = ConstantAdjust(pc->u.sssllp.s1);
|
|
|
|
pc->u.sssllp.s2 = ConstantAdjust(pc->u.sssllp.s2);
|
|
|
|
pc->u.sssllp.s3 = ConstantAdjust(pc->u.sssllp.s3);
|
|
|
|
pc->u.sssllp.sprev = PtoOpAdjust(pc->u.sssllp.sprev);
|
|
|
|
pc->u.sssllp.snext = PtoOpAdjust(pc->u.sssllp.snext);
|
|
|
|
pc->u.sssllp.p = PtoPredAdjust(pc->u.sssllp.p);
|
|
|
|
pc = NEXTOP(pc,sssllp);
|
2005-11-24 15:35:29 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type x */
|
2013-01-07 09:47:14 +00:00
|
|
|
case _get_atom_exo:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _get_list:
|
|
|
|
case _put_list:
|
|
|
|
case _save_b_x:
|
|
|
|
case _write_x_loc:
|
|
|
|
case _write_x_val:
|
|
|
|
case _write_x_var:
|
|
|
|
pc->u.x.x = XAdjust(pc->u.x.x);
|
|
|
|
pc = NEXTOP(pc,x);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2010-12-16 20:39:53 +00:00
|
|
|
/* instructions type xD */
|
2008-08-29 17:27:11 +01:00
|
|
|
case _get_dbterm:
|
2010-12-16 22:21:46 +00:00
|
|
|
case _put_dbterm:
|
2010-12-16 20:39:53 +00:00
|
|
|
pc->u.xD.x = XAdjust(pc->u.xD.x);
|
|
|
|
pc->u.xD.D = DBGroundTermAdjust(pc->u.xD.D);
|
|
|
|
pc = NEXTOP(pc,xD);
|
|
|
|
break;
|
2010-12-16 22:21:46 +00:00
|
|
|
/* instructions type xN */
|
|
|
|
case _get_bigint:
|
|
|
|
case _put_bigint:
|
|
|
|
pc->u.xN.x = XAdjust(pc->u.xN.x);
|
|
|
|
pc->u.xN.b = BlobTermInCodeAdjust(pc->u.xN.b);
|
|
|
|
pc = NEXTOP(pc,xN);
|
|
|
|
break;
|
2010-12-16 20:39:53 +00:00
|
|
|
/* instructions type xc */
|
|
|
|
case _get_atom:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _put_atom:
|
|
|
|
pc->u.xc.x = XAdjust(pc->u.xc.x);
|
|
|
|
pc->u.xc.c = ConstantTermAdjust(pc->u.xc.c);
|
|
|
|
pc = NEXTOP(pc,xc);
|
|
|
|
break;
|
|
|
|
/* instructions type xd */
|
|
|
|
case _get_float:
|
|
|
|
case _put_float:
|
|
|
|
pc->u.xd.x = XAdjust(pc->u.xd.x);
|
|
|
|
DoubleInCodeAdjust(pc->u.xd.d);
|
|
|
|
pc = NEXTOP(pc,xd);
|
|
|
|
break;
|
|
|
|
/* instructions type xfa */
|
|
|
|
case _get_struct:
|
|
|
|
case _put_struct:
|
|
|
|
pc->u.xfa.x = XAdjust(pc->u.xfa.x);
|
|
|
|
pc->u.xfa.f = FuncAdjust(pc->u.xfa.f);
|
|
|
|
pc->u.xfa.a = ArityAdjust(pc->u.xfa.a);
|
|
|
|
pc = NEXTOP(pc,xfa);
|
|
|
|
break;
|
|
|
|
/* instructions type xi */
|
|
|
|
case _get_longint:
|
|
|
|
case _put_longint:
|
|
|
|
pc->u.xi.x = XAdjust(pc->u.xi.x);
|
|
|
|
IntegerInCodeAdjust(pc->u.xi.i);
|
|
|
|
pc = NEXTOP(pc,xi);
|
|
|
|
break;
|
|
|
|
/* instructions type xl */
|
|
|
|
case _p_atom_x:
|
|
|
|
case _p_atomic_x:
|
|
|
|
case _p_compound_x:
|
|
|
|
case _p_db_ref_x:
|
|
|
|
case _p_float_x:
|
|
|
|
case _p_integer_x:
|
|
|
|
case _p_nonvar_x:
|
|
|
|
case _p_number_x:
|
|
|
|
case _p_primitive_x:
|
|
|
|
case _p_var_x:
|
|
|
|
pc->u.xl.x = XAdjust(pc->u.xl.x);
|
|
|
|
pc->u.xl.F = PtoOpAdjust(pc->u.xl.F);
|
|
|
|
pc = NEXTOP(pc,xl);
|
|
|
|
break;
|
|
|
|
/* instructions type xll */
|
|
|
|
case _jump_if_nonvar:
|
|
|
|
pc->u.xll.x = XAdjust(pc->u.xll.x);
|
|
|
|
pc->u.xll.l1 = PtoOpAdjust(pc->u.xll.l1);
|
|
|
|
pc->u.xll.l2 = PtoOpAdjust(pc->u.xll.l2);
|
|
|
|
pc = NEXTOP(pc,xll);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
|
|
|
/* instructions type xllll */
|
|
|
|
case _switch_on_arg_type:
|
|
|
|
pc->u.xllll.x = XAdjust(pc->u.xllll.x);
|
|
|
|
pc->u.xllll.l1 = PtoOpAdjust(pc->u.xllll.l1);
|
|
|
|
pc->u.xllll.l2 = PtoOpAdjust(pc->u.xllll.l2);
|
|
|
|
pc->u.xllll.l3 = PtoOpAdjust(pc->u.xllll.l3);
|
|
|
|
pc->u.xllll.l4 = PtoOpAdjust(pc->u.xllll.l4);
|
|
|
|
pc = NEXTOP(pc,xllll);
|
|
|
|
break;
|
2011-02-14 19:29:20 +00:00
|
|
|
/* instructions type xps */
|
2008-08-30 02:39:36 +01:00
|
|
|
case _commit_b_x:
|
2011-02-14 19:29:20 +00:00
|
|
|
pc->u.xps.x = XAdjust(pc->u.xps.x);
|
|
|
|
pc->u.xps.p0 = PtoPredAdjust(pc->u.xps.p0);
|
|
|
|
pc->u.xps.s = ConstantAdjust(pc->u.xps.s);
|
|
|
|
pc = NEXTOP(pc,xps);
|
2008-08-30 02:39:36 +01:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type xx */
|
|
|
|
case _get_x_val:
|
|
|
|
case _get_x_var:
|
|
|
|
case _gl_void_valx:
|
|
|
|
case _gl_void_varx:
|
|
|
|
case _glist_valx:
|
|
|
|
case _put_x_val:
|
|
|
|
case _put_x_var:
|
|
|
|
pc->u.xx.xl = XAdjust(pc->u.xx.xl);
|
|
|
|
pc->u.xx.xr = XAdjust(pc->u.xx.xr);
|
|
|
|
pc = NEXTOP(pc,xx);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2009-12-06 00:37:48 +00:00
|
|
|
/* instructions type xxc */
|
|
|
|
case _p_func2s_cv:
|
|
|
|
pc->u.xxc.x = XAdjust(pc->u.xxc.x);
|
|
|
|
pc->u.xxc.xi = XAdjust(pc->u.xxc.xi);
|
|
|
|
pc->u.xxc.c = ConstantTermAdjust(pc->u.xxc.c);
|
|
|
|
pc = NEXTOP(pc,xxc);
|
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type xxn */
|
|
|
|
case _p_and_vc:
|
|
|
|
case _p_arg_cv:
|
|
|
|
case _p_div_cv:
|
|
|
|
case _p_div_vc:
|
|
|
|
case _p_func2s_vc:
|
|
|
|
case _p_minus_cv:
|
|
|
|
case _p_or_vc:
|
|
|
|
case _p_plus_vc:
|
|
|
|
case _p_sll_cv:
|
|
|
|
case _p_sll_vc:
|
|
|
|
case _p_slr_cv:
|
|
|
|
case _p_slr_vc:
|
|
|
|
case _p_times_vc:
|
|
|
|
pc->u.xxn.x = XAdjust(pc->u.xxn.x);
|
|
|
|
pc->u.xxn.xi = XAdjust(pc->u.xxn.xi);
|
|
|
|
pc->u.xxn.c = IntegerAdjust(pc->u.xxn.c);
|
|
|
|
pc = NEXTOP(pc,xxn);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
|
|
|
/* instructions type xxx */
|
|
|
|
case _p_and_vv:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _p_arg_vv:
|
|
|
|
case _p_div_vv:
|
|
|
|
case _p_func2f_xx:
|
|
|
|
case _p_func2s_vv:
|
|
|
|
case _p_minus_vv:
|
2005-01-04 02:50:23 +00:00
|
|
|
case _p_or_vv:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _p_plus_vv:
|
2005-01-04 02:50:23 +00:00
|
|
|
case _p_sll_vv:
|
|
|
|
case _p_slr_vv:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _p_times_vv:
|
|
|
|
pc->u.xxx.x = XAdjust(pc->u.xxx.x);
|
2005-01-04 02:50:23 +00:00
|
|
|
pc->u.xxx.x1 = XAdjust(pc->u.xxx.x1);
|
|
|
|
pc->u.xxx.x2 = XAdjust(pc->u.xxx.x2);
|
|
|
|
pc = NEXTOP(pc,xxx);
|
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type xxxx */
|
|
|
|
case _put_xx_val:
|
|
|
|
pc->u.xxxx.xl1 = XAdjust(pc->u.xxxx.xl1);
|
|
|
|
pc->u.xxxx.xl2 = XAdjust(pc->u.xxxx.xl2);
|
|
|
|
pc->u.xxxx.xr1 = XAdjust(pc->u.xxxx.xr1);
|
|
|
|
pc->u.xxxx.xr2 = XAdjust(pc->u.xxxx.xr2);
|
|
|
|
pc = NEXTOP(pc,xxxx);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-21 13:38:25 +01:00
|
|
|
/* instructions type xxy */
|
2005-01-04 02:50:23 +00:00
|
|
|
case _p_func2f_xy:
|
2008-08-21 13:38:25 +01:00
|
|
|
pc->u.xxy.x = XAdjust(pc->u.xxy.x);
|
|
|
|
pc->u.xxy.x1 = XAdjust(pc->u.xxy.x1);
|
2008-08-29 17:27:11 +01:00
|
|
|
pc->u.xxy.y2 = YAdjust(pc->u.xxy.y2);
|
2008-08-21 13:38:25 +01:00
|
|
|
pc = NEXTOP(pc,xxy);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type y */
|
|
|
|
case _save_b_y:
|
|
|
|
case _write_y_loc:
|
|
|
|
case _write_y_val:
|
|
|
|
case _write_y_var:
|
|
|
|
pc->u.y.y = YAdjust(pc->u.y.y);
|
|
|
|
pc = NEXTOP(pc,y);
|
|
|
|
break;
|
|
|
|
/* instructions type yl */
|
|
|
|
case _p_atom_y:
|
|
|
|
case _p_atomic_y:
|
|
|
|
case _p_compound_y:
|
|
|
|
case _p_db_ref_y:
|
|
|
|
case _p_float_y:
|
|
|
|
case _p_integer_y:
|
|
|
|
case _p_nonvar_y:
|
2008-10-07 22:32:15 +01:00
|
|
|
case _p_number_y:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _p_primitive_y:
|
|
|
|
case _p_var_y:
|
|
|
|
pc->u.yl.y = YAdjust(pc->u.yl.y);
|
|
|
|
pc->u.yl.F = PtoOpAdjust(pc->u.yl.F);
|
|
|
|
pc = NEXTOP(pc,yl);
|
|
|
|
break;
|
2011-02-14 19:29:20 +00:00
|
|
|
/* instructions type yps */
|
2008-08-30 02:39:36 +01:00
|
|
|
case _commit_b_y:
|
2011-02-14 19:29:20 +00:00
|
|
|
pc->u.yps.y = YAdjust(pc->u.yps.y);
|
|
|
|
pc->u.yps.p0 = PtoPredAdjust(pc->u.yps.p0);
|
|
|
|
pc->u.yps.s = ConstantAdjust(pc->u.yps.s);
|
|
|
|
pc = NEXTOP(pc,yps);
|
2008-08-30 02:39:36 +01:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type yx */
|
|
|
|
case _get_y_val:
|
|
|
|
case _get_y_var:
|
2009-03-05 16:12:21 +00:00
|
|
|
case _gl_void_valy:
|
|
|
|
case _gl_void_vary:
|
|
|
|
case _glist_valy:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _put_unsafe:
|
|
|
|
case _put_y_val:
|
|
|
|
case _put_y_var:
|
|
|
|
pc->u.yx.y = YAdjust(pc->u.yx.y);
|
|
|
|
pc->u.yx.x = XAdjust(pc->u.yx.x);
|
|
|
|
pc = NEXTOP(pc,yx);
|
|
|
|
break;
|
2008-08-30 23:00:50 +01:00
|
|
|
/* instructions type yxn */
|
2008-08-29 17:27:11 +01:00
|
|
|
case _p_and_y_vc:
|
|
|
|
case _p_arg_y_cv:
|
|
|
|
case _p_div_y_cv:
|
|
|
|
case _p_div_y_vc:
|
|
|
|
case _p_func2s_y_cv:
|
|
|
|
case _p_func2s_y_vc:
|
|
|
|
case _p_minus_y_cv:
|
|
|
|
case _p_or_y_vc:
|
|
|
|
case _p_plus_y_vc:
|
|
|
|
case _p_sll_y_cv:
|
|
|
|
case _p_sll_y_vc:
|
|
|
|
case _p_slr_y_cv:
|
|
|
|
case _p_slr_y_vc:
|
|
|
|
case _p_times_y_vc:
|
2008-10-07 22:32:15 +01:00
|
|
|
pc->u.yxn.y = YAdjust(pc->u.yxn.y);
|
|
|
|
pc->u.yxn.xi = XAdjust(pc->u.yxn.xi);
|
2008-08-30 23:00:50 +01:00
|
|
|
pc->u.yxn.c = IntegerAdjust(pc->u.yxn.c);
|
|
|
|
pc = NEXTOP(pc,yxn);
|
2008-08-29 17:27:11 +01:00
|
|
|
break;
|
2005-01-04 02:50:23 +00:00
|
|
|
/* instructions type yxx */
|
|
|
|
case _p_and_y_vv:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _p_arg_y_vv:
|
|
|
|
case _p_div_y_vv:
|
|
|
|
case _p_func2f_yx:
|
|
|
|
case _p_func2s_y_vv:
|
|
|
|
case _p_minus_y_vv:
|
2005-01-04 02:50:23 +00:00
|
|
|
case _p_or_y_vv:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _p_plus_y_vv:
|
2005-01-04 02:50:23 +00:00
|
|
|
case _p_sll_y_vv:
|
|
|
|
case _p_slr_y_vv:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _p_times_y_vv:
|
|
|
|
pc->u.yxx.y = YAdjust(pc->u.yxx.y);
|
2005-01-04 02:50:23 +00:00
|
|
|
pc->u.yxx.x1 = XAdjust(pc->u.yxx.x1);
|
|
|
|
pc->u.yxx.x2 = XAdjust(pc->u.yxx.x2);
|
|
|
|
pc = NEXTOP(pc,yxx);
|
|
|
|
break;
|
|
|
|
/* instructions type yyx */
|
|
|
|
case _p_func2f_yy:
|
|
|
|
pc->u.yyx.y1 = YAdjust(pc->u.yyx.y1);
|
|
|
|
pc->u.yyx.y2 = YAdjust(pc->u.yyx.y2);
|
|
|
|
pc->u.yyx.x = XAdjust(pc->u.yyx.x);
|
|
|
|
pc = NEXTOP(pc,yyx);
|
|
|
|
break;
|
2009-03-03 10:04:13 +00:00
|
|
|
/* instructions type yyxx */
|
|
|
|
case _get_yy_var:
|
|
|
|
case _put_y_vals:
|
|
|
|
pc->u.yyxx.y1 = YAdjust(pc->u.yyxx.y1);
|
|
|
|
pc->u.yyxx.y2 = YAdjust(pc->u.yyxx.y2);
|
|
|
|
pc->u.yyxx.x1 = XAdjust(pc->u.yyxx.x1);
|
|
|
|
pc->u.yyxx.x2 = XAdjust(pc->u.yyxx.x2);
|
|
|
|
pc = NEXTOP(pc,yyxx);
|
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
#ifdef YAPOR
|
2008-09-05 05:22:19 +01:00
|
|
|
/* instructions type Otapl */
|
2008-08-29 17:27:11 +01:00
|
|
|
case _getwork:
|
|
|
|
case _getwork_seq:
|
|
|
|
case _sync:
|
2008-09-05 05:22:19 +01:00
|
|
|
OrArgAdjust(pc->u.Otapl.or_arg);
|
|
|
|
TabEntryAdjust(pc->u.Otapl.te);
|
|
|
|
pc->u.Otapl.s = ArityAdjust(pc->u.Otapl.s);
|
|
|
|
pc->u.Otapl.p = PtoPredAdjust(pc->u.Otapl.p);
|
|
|
|
pc->u.Otapl.d = PtoOpAdjust(pc->u.Otapl.d);
|
|
|
|
pc = NEXTOP(pc,Otapl);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type e */
|
|
|
|
case _getwork_first_time:
|
|
|
|
if (op == _Nstop || op == _copy_idb_term || op == _unify_idb_term) return;
|
|
|
|
pc = NEXTOP(pc,e);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
#endif
|
|
|
|
#ifdef TABLING
|
2008-09-05 05:22:19 +01:00
|
|
|
/* instructions type Otapl */
|
2008-08-29 17:27:11 +01:00
|
|
|
case _table_answer_resolution:
|
2011-12-22 16:50:20 +00:00
|
|
|
#ifdef THREADS_CONSUMER_SHARING
|
|
|
|
case _table_answer_resolution_completion:
|
2012-01-05 11:41:46 +00:00
|
|
|
#endif
|
|
|
|
case _table_completion:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _table_load_answer:
|
|
|
|
case _table_retry:
|
|
|
|
case _table_retry_me:
|
|
|
|
case _table_trust:
|
|
|
|
case _table_trust_me:
|
|
|
|
case _table_try:
|
|
|
|
case _table_try_answer:
|
|
|
|
case _table_try_me:
|
|
|
|
case _table_try_single:
|
2008-09-05 05:22:19 +01:00
|
|
|
OrArgAdjust(pc->u.Otapl.or_arg);
|
|
|
|
TabEntryAdjust(pc->u.Otapl.te);
|
|
|
|
pc->u.Otapl.s = ArityAdjust(pc->u.Otapl.s);
|
|
|
|
pc->u.Otapl.p = PtoPredAdjust(pc->u.Otapl.p);
|
|
|
|
pc->u.Otapl.d = PtoOpAdjust(pc->u.Otapl.d);
|
|
|
|
pc = NEXTOP(pc,Otapl);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type e */
|
|
|
|
#ifdef TABLING_INNER_CUTS
|
|
|
|
case _clause_with_cut:
|
|
|
|
#endif
|
|
|
|
if (op == _Nstop || op == _copy_idb_term || op == _unify_idb_term) return;
|
|
|
|
pc = NEXTOP(pc,e);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type s */
|
|
|
|
case _table_new_answer:
|
|
|
|
pc->u.s.s = ConstantAdjust(pc->u.s.s);
|
|
|
|
pc = NEXTOP(pc,s);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
/* instructions type e */
|
2010-04-15 01:09:59 +01:00
|
|
|
case _trie_do_appl:
|
|
|
|
case _trie_do_appl_in_pair:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trie_do_atom:
|
2010-04-15 01:09:59 +01:00
|
|
|
case _trie_do_atom_in_pair:
|
|
|
|
case _trie_do_double:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trie_do_extension:
|
2010-04-15 01:09:59 +01:00
|
|
|
case _trie_do_gterm:
|
|
|
|
case _trie_do_longint:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trie_do_null:
|
2010-04-15 01:09:59 +01:00
|
|
|
case _trie_do_null_in_pair:
|
2009-07-05 05:14:08 +01:00
|
|
|
case _trie_do_pair:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trie_do_val:
|
2010-04-15 01:09:59 +01:00
|
|
|
case _trie_do_val_in_pair:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trie_do_var:
|
2010-04-15 01:09:59 +01:00
|
|
|
case _trie_do_var_in_pair:
|
|
|
|
case _trie_retry_appl:
|
|
|
|
case _trie_retry_appl_in_pair:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trie_retry_atom:
|
2010-04-15 01:09:59 +01:00
|
|
|
case _trie_retry_atom_in_pair:
|
|
|
|
case _trie_retry_double:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trie_retry_extension:
|
2010-04-15 01:09:59 +01:00
|
|
|
case _trie_retry_gterm:
|
|
|
|
case _trie_retry_longint:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trie_retry_null:
|
2010-04-15 01:09:59 +01:00
|
|
|
case _trie_retry_null_in_pair:
|
2009-07-05 05:14:08 +01:00
|
|
|
case _trie_retry_pair:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trie_retry_val:
|
2010-04-15 01:09:59 +01:00
|
|
|
case _trie_retry_val_in_pair:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trie_retry_var:
|
2010-04-15 01:09:59 +01:00
|
|
|
case _trie_retry_var_in_pair:
|
|
|
|
case _trie_trust_appl:
|
|
|
|
case _trie_trust_appl_in_pair:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trie_trust_atom:
|
2010-04-15 01:09:59 +01:00
|
|
|
case _trie_trust_atom_in_pair:
|
|
|
|
case _trie_trust_double:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trie_trust_extension:
|
2010-04-15 01:09:59 +01:00
|
|
|
case _trie_trust_gterm:
|
|
|
|
case _trie_trust_longint:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trie_trust_null:
|
2010-04-15 01:09:59 +01:00
|
|
|
case _trie_trust_null_in_pair:
|
2009-07-05 05:14:08 +01:00
|
|
|
case _trie_trust_pair:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trie_trust_val:
|
2010-04-15 01:09:59 +01:00
|
|
|
case _trie_trust_val_in_pair:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trie_trust_var:
|
2010-04-15 01:09:59 +01:00
|
|
|
case _trie_trust_var_in_pair:
|
|
|
|
case _trie_try_appl:
|
|
|
|
case _trie_try_appl_in_pair:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trie_try_atom:
|
2010-04-15 01:09:59 +01:00
|
|
|
case _trie_try_atom_in_pair:
|
|
|
|
case _trie_try_double:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trie_try_extension:
|
2010-04-15 01:09:59 +01:00
|
|
|
case _trie_try_gterm:
|
|
|
|
case _trie_try_longint:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trie_try_null:
|
2010-04-15 01:09:59 +01:00
|
|
|
case _trie_try_null_in_pair:
|
2009-07-05 05:14:08 +01:00
|
|
|
case _trie_try_pair:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trie_try_val:
|
2010-04-15 01:09:59 +01:00
|
|
|
case _trie_try_val_in_pair:
|
2008-08-29 17:27:11 +01:00
|
|
|
case _trie_try_var:
|
2010-04-15 01:09:59 +01:00
|
|
|
case _trie_try_var_in_pair:
|
2008-08-29 17:27:11 +01:00
|
|
|
if (op == _Nstop || op == _copy_idb_term || op == _unify_idb_term) return;
|
|
|
|
pc = NEXTOP(pc,e);
|
2005-01-04 02:50:23 +00:00
|
|
|
break;
|
2008-08-29 17:27:11 +01:00
|
|
|
#endif
|
|
|
|
/* this instruction is hardwired */
|
|
|
|
case _or_last:
|
|
|
|
#ifdef YAPOR
|
2008-09-05 05:22:19 +01:00
|
|
|
OrArgAdjust(pc->u.Osblp.or_arg);
|
|
|
|
pc->u.Osblp.s = ConstantAdjust(pc->u.Osblp.s);
|
|
|
|
pc->u.Osblp.bmap = CellPtoHeapAdjust(pc->u.Osblp.bmap);
|
|
|
|
pc->u.Osblp.l = PtoOpAdjust(pc->u.Osblp.l);
|
|
|
|
pc->u.Osblp.p0 = PtoPredAdjust(pc->u.Osblp.p0);
|
|
|
|
pc = NEXTOP(pc,Osblp);
|
2008-08-29 17:27:11 +01:00
|
|
|
break;
|
|
|
|
#else
|
|
|
|
pc->u.p.p = PtoPredAdjust(pc->u.p.p);
|
|
|
|
pc = NEXTOP(pc,p);
|
|
|
|
break;
|
|
|
|
#endif
|
2005-01-04 02:50:23 +00:00
|
|
|
}
|
|
|
|
} while (TRUE);
|
|
|
|
}
|