fix bad indexing (obs from Jos)

This commit is contained in:
Vitor Santos Costa 2012-12-07 23:43:00 +00:00
parent b98b09e7de
commit f0b44b9b77
7 changed files with 21 additions and 9 deletions

View File

@ -319,9 +319,9 @@
OPCODE(p_func2f_yx ,yxx),
OPCODE(p_func2f_yy ,yyx),
OPCODE(p_functor ,e),
OPCODE(p_execute_tail ,Osbmp),
OPCODE(p_execute2 ,Osbpp),
OPCODE(p_execute ,Osbmp),
OPCODE(p_execute_tail ,Osbpp),
#ifdef YAPOR
OPCODE(getwork_first_time ,e),
OPCODE(getwork ,Otapl),

View File

@ -292,7 +292,7 @@
case _write_void:
cl = NEXTOP(cl,e);
break;
case _write_struct:
case _write_l_struc:
cl = NEXTOP(cl,fa);
break;
case _write_longint:
@ -358,6 +358,12 @@
case _unify_l_float_write:
cl = NEXTOP(cl,od);
break;
case _unify_l_struc:
cl = NEXTOP(cl,ofa);
break;
case _unify_l_struc_write:
cl = NEXTOP(cl,ofa);
break;
case _unify_struct:
cl = NEXTOP(cl,ofa);
break;

View File

@ -327,6 +327,12 @@
case _unify_l_float_write:
cl = NEXTOP(cl,od);
break;
case _unify_l_struc:
cl = NEXTOP(cl,ofa);
break;
case _unify_l_struc_write:
cl = NEXTOP(cl,ofa);
break;
case _unify_struct:
cl = NEXTOP(cl,ofa);
break;

View File

@ -53,6 +53,7 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
break;
/* instructions type Osbmp */
case _p_execute:
case _p_execute_tail:
OrArgAdjust(pc->u.Osbmp.or_arg);
pc->u.Osbmp.s = ConstantAdjust(pc->u.Osbmp.s);
pc->u.Osbmp.bmap = CellPtoHeapAdjust(pc->u.Osbmp.bmap);
@ -75,7 +76,6 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
case _call_usercpred:
case _fcall:
case _p_execute2:
case _p_execute_tail:
OrArgAdjust(pc->u.Osbpp.or_arg);
pc->u.Osbpp.s = ConstantAdjust(pc->u.Osbpp.s);
pc->u.Osbpp.bmap = CellPtoHeapAdjust(pc->u.Osbpp.bmap);

View File

@ -49,6 +49,7 @@
break;
/* instructions type Osbmp */
case _p_execute:
case _p_execute_tail:
#ifdef YAPOR
CHECK(save_OrArg(stream, pc->u.Osbmp.or_arg));
#endif
@ -75,7 +76,6 @@
case _call_usercpred:
case _fcall:
case _p_execute2:
case _p_execute_tail:
#ifdef YAPOR
CHECK(save_OrArg(stream, pc->u.Osbpp.or_arg));
#endif

View File

@ -32,6 +32,7 @@
break;
/* instructions type Osbmp */
case _p_execute:
case _p_execute_tail:
pc = NEXTOP(pc,Osbmp);
break;
/* instructions type Osbpa */
@ -47,8 +48,6 @@
return walk_found_c_pred(pp, startp, endp);
case _p_execute2:
return found_meta_call(startp, endp);
case _p_execute_tail:
return found_meta_call(startp, endp);
case _call:
case _fcall:
clause_code = TRUE;

View File

@ -1034,9 +1034,10 @@ opinfo("unify_l_n_atoms_write",[]).
opinfo("write_n_atoms",[body]).
opinfo("unify_struct",[]).
opinfo("unify_struct_write",[]).
opinfo("unify_l_struct",[]).
opinfo("unify_l_struct_write",[]).
opinfo("write_struct",[body]).
opinfo("unify_l_struc",[]).
opinfo("unify_l_struc_write",[]).
opinfo("write_struc",[body]).
opinfo("write_l_struc",[body]).
opinfo("unify_float",[]).
opinfo("unify_float_write",[]).
opinfo("unify_l_float",[]).