fix restoring of LU try chains.
This commit is contained in:
parent
5824e5ecea
commit
e41c7a05c1
|
@ -6,6 +6,7 @@
|
||||||
static void
|
static void
|
||||||
restore_opcodes(yamop *pc, yamop *max)
|
restore_opcodes(yamop *pc, yamop *max)
|
||||||
{
|
{
|
||||||
|
yamop *opc = NULL;
|
||||||
do {
|
do {
|
||||||
op_numbers op;
|
op_numbers op;
|
||||||
if (max && pc >= max) return;
|
if (max && pc >= max) return;
|
||||||
|
@ -21,7 +22,8 @@ restore_opcodes(yamop *pc, yamop *max)
|
||||||
pc->u.Ills.l1 = PtoOpAdjust(pc->u.Ills.l1);
|
pc->u.Ills.l1 = PtoOpAdjust(pc->u.Ills.l1);
|
||||||
pc->u.Ills.l2 = PtoOpAdjust(pc->u.Ills.l2);
|
pc->u.Ills.l2 = PtoOpAdjust(pc->u.Ills.l2);
|
||||||
pc->u.Ills.s = ConstantAdjust(pc->u.Ills.s);
|
pc->u.Ills.s = ConstantAdjust(pc->u.Ills.s);
|
||||||
pc = NEXTOP(pc,Ills);
|
opc = NEXTOP(pc,Ills);
|
||||||
|
pc = pc->u.Ills.l1;
|
||||||
break;
|
break;
|
||||||
/* instructions type L */
|
/* instructions type L */
|
||||||
case _alloc_for_logical_pred:
|
case _alloc_for_logical_pred:
|
||||||
|
@ -70,7 +72,7 @@ restore_opcodes(yamop *pc, yamop *max)
|
||||||
pc->u.OtILl.block = PtoLUIndexAdjust(pc->u.OtILl.block);
|
pc->u.OtILl.block = PtoLUIndexAdjust(pc->u.OtILl.block);
|
||||||
pc->u.OtILl.d = PtoLUClauseAdjust(pc->u.OtILl.d);
|
pc->u.OtILl.d = PtoLUClauseAdjust(pc->u.OtILl.d);
|
||||||
pc->u.OtILl.n = PtoOpAdjust(pc->u.OtILl.n);
|
pc->u.OtILl.n = PtoOpAdjust(pc->u.OtILl.n);
|
||||||
pc = NEXTOP(pc,OtILl);
|
pc = opc;
|
||||||
break;
|
break;
|
||||||
/* instructions type OtaLl */
|
/* instructions type OtaLl */
|
||||||
case _count_retry_logical:
|
case _count_retry_logical:
|
||||||
|
@ -82,7 +84,7 @@ restore_opcodes(yamop *pc, yamop *max)
|
||||||
pc->u.OtaLl.s = ArityAdjust(pc->u.OtaLl.s);
|
pc->u.OtaLl.s = ArityAdjust(pc->u.OtaLl.s);
|
||||||
pc->u.OtaLl.d = PtoLUClauseAdjust(pc->u.OtaLl.d);
|
pc->u.OtaLl.d = PtoLUClauseAdjust(pc->u.OtaLl.d);
|
||||||
pc->u.OtaLl.n = PtoOpAdjust(pc->u.OtaLl.n);
|
pc->u.OtaLl.n = PtoOpAdjust(pc->u.OtaLl.n);
|
||||||
pc = NEXTOP(pc,OtaLl);
|
pc = pc->u.OtaLl.n;
|
||||||
break;
|
break;
|
||||||
/* instructions type OtapFs */
|
/* instructions type OtapFs */
|
||||||
#ifdef CUT_C
|
#ifdef CUT_C
|
||||||
|
|
|
@ -79,6 +79,7 @@ header_rclause(W) :-
|
||||||
static void
|
static void
|
||||||
restore_opcodes(yamop *pc, yamop *max)
|
restore_opcodes(yamop *pc, yamop *max)
|
||||||
{
|
{
|
||||||
|
yamop *opc = NULL;
|
||||||
do {
|
do {
|
||||||
op_numbers op;
|
op_numbers op;
|
||||||
if (max && pc >= max) return;
|
if (max && pc >= max) return;
|
||||||
|
@ -167,9 +168,10 @@ output_type(T, C) :-
|
||||||
output_typeinfo(C,T) :-
|
output_typeinfo(C,T) :-
|
||||||
tinfo(T, Info),
|
tinfo(T, Info),
|
||||||
dump_fields(C,Info,T,T),
|
dump_fields(C,Info,T,T),
|
||||||
special_formats(C,T),
|
special_formats(C,T), !,
|
||||||
format(C,' pc = NEXTOP(pc,~s);
|
format(C,' pc = NEXTOP(pc,~s);
|
||||||
break;~n',[T]).
|
break;~n',[T]).
|
||||||
|
output_typeinfo(_,_).
|
||||||
|
|
||||||
% tables require access to the table info.
|
% tables require access to the table info.
|
||||||
special_formats(C,"e") :- !,
|
special_formats(C,"e") :- !,
|
||||||
|
@ -178,6 +180,22 @@ special_formats(C,"l") :- !,
|
||||||
format(C,' if (op == _Ystop) return;~n',[]).
|
format(C,' if (op == _Ystop) return;~n',[]).
|
||||||
special_formats(C,"sssl") :- !,
|
special_formats(C,"sssl") :- !,
|
||||||
format(C,' AdjustSwitchTable(op, pc->u.sssl.l, pc->u.sssl.s);~n',[]).
|
format(C,' AdjustSwitchTable(op, pc->u.sssl.l, pc->u.sssl.s);~n',[]).
|
||||||
|
special_formats(C,"Ills") :- !,
|
||||||
|
format(C,' opc = NEXTOP(pc,Ills);
|
||||||
|
pc = pc->u.Ills.l1;
|
||||||
|
break;~n',[]),
|
||||||
|
% don't go to NEXTOP
|
||||||
|
fail.
|
||||||
|
special_formats(C,"OtaLl") :- !,
|
||||||
|
format(C,' pc = pc->u.OtaLl.n;
|
||||||
|
break;~n',[]),
|
||||||
|
% don't go to NEXTOP
|
||||||
|
fail.
|
||||||
|
special_formats(C,"OtILl") :- !,
|
||||||
|
format(C,' pc = opc;
|
||||||
|
break;~n',[]),
|
||||||
|
% don't go to NEXTOP
|
||||||
|
fail.
|
||||||
special_formats(_,_).
|
special_formats(_,_).
|
||||||
|
|
||||||
dump_fields(_,[],"e",_).
|
dump_fields(_,[],"e",_).
|
||||||
|
|
Reference in New Issue