correct inference counting over index backtracking, built-ins (#1977, #1987)

This commit is contained in:
Mark
2023-09-04 17:15:05 -06:00
parent 2ccc238119
commit 5585e83fd6
8 changed files with 153 additions and 102 deletions

View File

@@ -1205,11 +1205,13 @@ impl Machine {
match &indexed_choice[p] {
&IndexedChoiceInstruction::Try(offset) |
&IndexedChoiceInstruction::Retry(offset) => {
&IndexedChoiceInstruction::Retry(offset) |
&IndexedChoiceInstruction::DefaultRetry(offset) => {
let clause_clause_loc = skeleton.core.clause_clause_locs[p];
(clause_clause_loc, bp + offset)
}
&IndexedChoiceInstruction::Trust(_) => {
&IndexedChoiceInstruction::Trust(_) |
&IndexedChoiceInstruction::DefaultTrust(_) => {
unreachable!()
}
}