reset attributed variable state between toplevel queries (#242)

This commit is contained in:
Mark Thom
2019-11-28 19:08:08 -07:00
parent 7eb0de7f52
commit 335202b9d9
4 changed files with 9 additions and 2 deletions

View File

@@ -32,9 +32,9 @@ impl AttrVarInitializer {
#[inline]
pub(super) fn reset(&mut self) {
self.attribute_goals.clear();
self.attr_var_queue.clear();
self.bindings.clear();
self.attribute_goals.clear();
}
}

View File

@@ -1680,6 +1680,9 @@ impl MachineState {
}
};
},
&SystemClauseType::ResetAttrVarState => {
self.attr_var_init.reset();
}
&SystemClauseType::RemoveCallPolicyCheck => {
let restore_default = match call_policy.downcast_mut::<CWILCallPolicy>().ok() {
Some(call_policy) => {