fix checking profiled choice-points (obs from Jose Santos).
This commit is contained in:
parent
a69a34f3a5
commit
390408d5af
14
C/heapgc.c
14
C/heapgc.c
@ -1863,7 +1863,10 @@ mark_delays(attvar_record *top, attvar_record *bottom)
|
|||||||
static void
|
static void
|
||||||
mark_choicepoints(register choiceptr gc_B, tr_fr_ptr saved_TR, int very_verbose)
|
mark_choicepoints(register choiceptr gc_B, tr_fr_ptr saved_TR, int very_verbose)
|
||||||
{
|
{
|
||||||
OPCODE trust_lu = Yap_opcode(_trust_logical);
|
OPCODE
|
||||||
|
trust_lu = Yap_opcode(_trust_logical),
|
||||||
|
count_trust_lu = Yap_opcode(_count_trust_logical),
|
||||||
|
profiled_trust_lu = Yap_opcode(_profiled_trust_logical);
|
||||||
|
|
||||||
yamop *lu_cl0 = NEXTOP(PredLogUpdClause0->CodeOfPred,Otapl),
|
yamop *lu_cl0 = NEXTOP(PredLogUpdClause0->CodeOfPred,Otapl),
|
||||||
*lu_cl = NEXTOP(PredLogUpdClause->CodeOfPred,Otapl),
|
*lu_cl = NEXTOP(PredLogUpdClause->CodeOfPred,Otapl),
|
||||||
@ -2148,7 +2151,9 @@ mark_choicepoints(register choiceptr gc_B, tr_fr_ptr saved_TR, int very_verbose)
|
|||||||
space
|
space
|
||||||
*/
|
*/
|
||||||
yamop *end = rtp->u.OtaLl.n;
|
yamop *end = rtp->u.OtaLl.n;
|
||||||
while (end->opc != trust_lu)
|
while (end->opc != trust_lu &&
|
||||||
|
end->opc != count_trust_lu &&
|
||||||
|
end->opc != profiled_trust_lu )
|
||||||
end = end->u.OtaLl.n;
|
end = end->u.OtaLl.n;
|
||||||
mark_ref_in_use((DBRef)end->u.OtILl.block);
|
mark_ref_in_use((DBRef)end->u.OtILl.block);
|
||||||
}
|
}
|
||||||
@ -2225,7 +2230,10 @@ mark_choicepoints(register choiceptr gc_B, tr_fr_ptr saved_TR, int very_verbose)
|
|||||||
if (gc_B->cp_ap == su_cl) {
|
if (gc_B->cp_ap == su_cl) {
|
||||||
mark_db_fixed((CELL *)pt);
|
mark_db_fixed((CELL *)pt);
|
||||||
} else {
|
} else {
|
||||||
while (pt->opc != trust_lu)
|
while (pt->opc != trust_lu &&
|
||||||
|
pt->opc != count_trust_lu &&
|
||||||
|
pt->opc != profiled_trust_lu
|
||||||
|
)
|
||||||
pt = pt->u.OtaLl.n;
|
pt = pt->u.OtaLl.n;
|
||||||
mark_ref_in_use((DBRef)pt->u.OtILl.block);
|
mark_ref_in_use((DBRef)pt->u.OtILl.block);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user