fix excessive trimming in C-interface for backtrackable predicates (obs from José Vieira).
This commit is contained in:
parent
e86a995dd2
commit
324833f84a
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit f6a79007615bf46dc79712c41d61289834f28ba3
|
Subproject commit c325e4564bb8d4e32c27f2061df85f13d315974e
|
@ -1 +1 @@
|
|||||||
Subproject commit eb6d27251c2548c25e6d37fff2a27a014caaa7aa
|
Subproject commit a2d2f03107eecd45462cd61a678035132cf06326
|
Reference in New Issue
Block a user