improve retract/1 and related predicates (#1598)

This commit is contained in:
Mark Thom
2023-01-22 20:14:36 -07:00
parent 5e0e3e2754
commit a7e93db363
11 changed files with 315 additions and 107 deletions

View File

@@ -1869,7 +1869,13 @@ impl<'a, LS: LoadState<'a>> Loader<'a, LS> {
skeleton.clauses[target_pos + 1].clause_start =
skeleton.clauses[target_pos].clause_start;
let index_ptr_opt = if target_pos == 0 {
let update_code_index = target_pos == 0 &&
skeleton.clauses[target_pos + 1]
.opt_arg_index_key
.switch_on_term_loc()
.is_none();
let index_ptr_opt = if update_code_index {
Some(IndexPtr::index(clause_loc))
} else {
None