fix attributed variables bug causing weighted_maximum/3 example to omit a variable binding

This commit is contained in:
Mark Thom
2019-10-20 14:50:46 -06:00
parent 24e5e39c28
commit 1b1879a6fa
9 changed files with 44 additions and 26 deletions

View File

@@ -754,7 +754,7 @@ impl MachineState {
offset += 1;
} else {
self.trail[i - offset] = self.trail[i];
},
},
TrailRef::Ref(Ref::StackCell(fr, _)) => {
let fr_gi = self.and_stack[fr].global_index;
let b_gi = if !self.or_stack.is_empty() {
@@ -775,7 +775,7 @@ impl MachineState {
self.tr -= offset;
self.trail.truncate(self.tr);
}
#[inline]
fn write_char_to_string(&mut self, s: &mut StringList, c: char) -> bool {
self.pstr_trail(s.clone());
@@ -3231,6 +3231,8 @@ impl MachineState {
)
),
};
self.last_call = false;
}
pub(super) fn execute_ctrl_instr(
@@ -3266,7 +3268,7 @@ impl MachineState {
self.b0 = self.b;
self.p += offset;
}
&ControlInstruction::Proceed => self.p = CodePtr::Local(self.cp.clone()),
&ControlInstruction::Proceed => self.p = CodePtr::Local(self.cp.clone())
};
}