call_w_fail should know the current P.

This commit is contained in:
Vítor Santos Costa 2015-09-29 23:05:04 +01:00
parent 2ac59d36aa
commit 059e38d8f0

View File

@ -1460,13 +1460,14 @@ a_p(op_numbers opcode, clause_info *clinfo, yamop *code_p, int pass_no, struct i
siglongjmp(cip->CompilerBotch, 1); siglongjmp(cip->CompilerBotch, 1);
} else } else
code_p->opc = emit_op(_call_c_wfail); code_p->opc = emit_op(_call_c_wfail);
code_p->y_u.slp.s = code_p->y_u.slpp.s =
emit_count(-Signed(RealEnvSize) - CELLSIZE * cip->cpc->rnd2); emit_count(-Signed(RealEnvSize) - CELLSIZE * cip->cpc->rnd2);
code_p->y_u.slp.l = emit_fail(cip); code_p->y_u.slpp.l = emit_fail(cip);
code_p->y_u.slp.p = code_p->y_u.slpp.p0 = clinfo->CurrentPred;
code_p->y_u.slpp.p =
emit_pe(RepPredProp(fe)); emit_pe(RepPredProp(fe));
} }
GONEXT(slp); GONEXT(slpp);
} else { } else {
if (pass_no) { if (pass_no) {
code_p->y_u.Osbpp.p = RepPredProp(fe); code_p->y_u.Osbpp.p = RepPredProp(fe);