fix branch subsumption bug (#1840, #1841)

This commit is contained in:
Mark
2023-06-24 10:59:29 -06:00
parent 2ec45b7413
commit 9f209dadd9
3 changed files with 116 additions and 72 deletions

View File

@@ -937,13 +937,14 @@ impl<'b> CodeGenerator<'b> {
branch_code_stack.add_new_branch_stack();
branch_code_stack.add_new_branch();
self.marker.add_branch_stack(num_branches);
self.marker.branch_stack.add_branch_stack(num_branches);
self.marker.add_branch();
}
ClauseItem::NextBranch => {
branch_code_stack.add_new_branch();
self.marker.add_branch();
self.marker.incr_current_branch();
self.marker.branch_stack.incr_current_branch();
}
ClauseItem::BranchEnd(depth) => {
if !clause_iter.in_tail_position() {
@@ -951,7 +952,7 @@ impl<'b> CodeGenerator<'b> {
self.marker.pop_branch(depth, subsumed_hits);
branch_code_stack.push_jump_instrs(depth);
} else {
self.marker.drain_branches(depth);
self.marker.branch_stack.drain_branches(depth);
}
let settings = CodeGenSettings {