]> Repositorios git - scryer-prolog.git/commitdiff
mark chunk boundary at beginning of disjunct in disjuncts.rs (#1843)
authorMark <[email protected]>
Sat, 24 Jun 2023 23:03:46 +0000 (17:03 -0600)
committerMark <[email protected]>
Sat, 24 Jun 2023 23:18:00 +0000 (17:18 -0600)
src/machine/disjuncts.rs

index 3ef2bbf810483221894d62d190a3febfb714da3d..f2a6685158c6d61882674f4f557d07cc30090abe 100644 (file)
@@ -598,6 +598,9 @@ impl VariableClassifier {
                             if let TraversalState::BuildDisjunct(build_stack_len) = state_stack[final_disjunct_loc] {
                                 state_stack[final_disjunct_loc] = TraversalState::BuildFinalDisjunct(build_stack_len);
                             }
+
+                            self.current_chunk_type = ChunkType::Mid;
+                            self.current_chunk_num += 1;
                         }
                         Term::Clause(_, atom!("->"), mut terms) if terms.len() == 2 => {
                             let then_term = terms.pop().unwrap();
@@ -632,6 +635,9 @@ impl VariableClassifier {
                             state_stack.push(TraversalState::Term(not_term));
                             state_stack.push(TraversalState::GetCutPoint { var_num: self.var_num, prev_b: true });
 
+                            self.current_chunk_type = ChunkType::Mid;
+                            self.current_chunk_num += 1;
+
                             self.var_num += 1;
                         }
                         Term::Clause(_, atom!(":"), mut terms) if terms.len() == 2 => {