fix excessive trimming in C-interface for backtrackable predicates (obs from José Vieira).
This commit is contained in:
@@ -1027,13 +1027,14 @@ YAP_cut_up(void)
|
|||||||
|
|
||||||
cut_pt = B->cp_b;
|
cut_pt = B->cp_b;
|
||||||
CUT_prune_to(cut_pt);
|
CUT_prune_to(cut_pt);
|
||||||
|
Yap_TrimTrail();
|
||||||
B = cut_pt;
|
B = cut_pt;
|
||||||
}
|
}
|
||||||
#else /* YAPOR */
|
#else
|
||||||
|
Yap_TrimTrail();
|
||||||
B = B->cp_b; /* cut_fail */
|
B = B->cp_b; /* cut_fail */
|
||||||
#endif
|
#endif
|
||||||
HB = B->cp_h; /* cut_fail */
|
HB = B->cp_h; /* cut_fail */
|
||||||
Yap_TrimTrail();
|
|
||||||
|
|
||||||
RECOVER_B();
|
RECOVER_B();
|
||||||
}
|
}
|
||||||
|
@@ -387,7 +387,6 @@ static int p_trie_traverse_init(void) {
|
|||||||
|
|
||||||
/* traverse trie */
|
/* traverse trie */
|
||||||
if (!(data = trie_traverse_init((TrEntry) YAP_IntOfTerm(arg_trie), (TrData) YAP_IntOfTerm(arg_init_ref)))) {
|
if (!(data = trie_traverse_init((TrEntry) YAP_IntOfTerm(arg_trie), (TrData) YAP_IntOfTerm(arg_init_ref)))) {
|
||||||
printf("cut fail no init!!!\n");
|
|
||||||
YAP_cut_fail();
|
YAP_cut_fail();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
Submodule packages/chr updated: f6a7900761...c325e4564b
Submodule packages/jpl updated: eb6d27251c...a2d2f03107
Reference in New Issue
Block a user