pop AND stack frames after unwinding the trail (#250)

This commit is contained in:
Mark Thom
2019-12-03 23:11:57 -07:00
parent 43b39538ff
commit 9ae029b04d
2 changed files with 11 additions and 7 deletions

View File

@@ -3172,9 +3172,9 @@ impl MachineState {
self.p += 1;
}
pub(super) fn pop_stack_frames(&mut self) {
if self.and_stack.len() > self.e {
let and_gi = self.and_stack[self.e].global_index;
pub(super) fn pop_stack_frames(&mut self, e: usize) {
if self.and_stack.len() > e {
let and_gi = self.and_stack[e].global_index;
let or_gi = self
.or_stack
.top()
@@ -3182,7 +3182,7 @@ impl MachineState {
.unwrap_or(0);
if and_gi > or_gi {
self.and_stack.truncate(self.e + 1);
self.and_stack.truncate(e + 1);
}
}
}