fix indexing bug (report from Jos DeRoo).
This commit is contained in:
parent
2d54ccf355
commit
e93df788e5
@ -5316,8 +5316,11 @@ kill_unsafe_block(path_stack_entry *sp, op_numbers op, PredEntry *ap, int first,
|
|||||||
{
|
{
|
||||||
yamop *ipc;
|
yamop *ipc;
|
||||||
while ((--sp)->flag != block_entry);
|
while ((--sp)->flag != block_entry);
|
||||||
if (sp->u.cle.entry_code == NULL)
|
if (sp->u.cle.entry_code == NULL) {
|
||||||
|
/* we have reached the top */
|
||||||
|
Yap_RemoveIndexation(ap);
|
||||||
return sp;
|
return sp;
|
||||||
|
}
|
||||||
ipc = *sp->u.cle.entry_code;
|
ipc = *sp->u.cle.entry_code;
|
||||||
if (Yap_op_from_opcode(ipc->opc) == op) {
|
if (Yap_op_from_opcode(ipc->opc) == op) {
|
||||||
/* the new block was the current clause */
|
/* the new block was the current clause */
|
||||||
@ -5869,7 +5872,6 @@ add_to_index(struct intermediates *cint, int first, path_stack_entry *sp, Clause
|
|||||||
current_arity = ArityOfFunctor(f);
|
current_arity = ArityOfFunctor(f);
|
||||||
}
|
}
|
||||||
newpc = fe->u.labp;
|
newpc = fe->u.labp;
|
||||||
|
|
||||||
if (newpc == (yamop *)&(ap->cs.p_code.ExpandCode)) {
|
if (newpc == (yamop *)&(ap->cs.p_code.ExpandCode)) {
|
||||||
/* we found it */
|
/* we found it */
|
||||||
ipc = pop_path(&sp, cls, ap, cint);
|
ipc = pop_path(&sp, cls, ap, cint);
|
||||||
|
Reference in New Issue
Block a user