handle TCO when setting up verify_attributes interrupts
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "scryer-prolog"
|
name = "scryer-prolog"
|
||||||
version = "0.8.107"
|
version = "0.8.108"
|
||||||
authors = ["Mark Thom <markjordanthom@gmail.com>"]
|
authors = ["Mark Thom <markjordanthom@gmail.com>"]
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
repository = "https://github.com/mthom/scryer-prolog"
|
repository = "https://github.com/mthom/scryer-prolog"
|
||||||
|
|||||||
@@ -40,7 +40,12 @@ impl AttrVarInitializer {
|
|||||||
impl MachineState {
|
impl MachineState {
|
||||||
pub(super) fn push_attr_var_binding(&mut self, h: usize, addr: Addr) {
|
pub(super) fn push_attr_var_binding(&mut self, h: usize, addr: Addr) {
|
||||||
if self.attr_var_init.bindings.is_empty() {
|
if self.attr_var_init.bindings.is_empty() {
|
||||||
self.attr_var_init.cp = self.p.local();
|
if self.last_call {
|
||||||
|
self.attr_var_init.cp = self.cp;
|
||||||
|
} else {
|
||||||
|
self.attr_var_init.cp = self.p.local();
|
||||||
|
}
|
||||||
|
|
||||||
self.p = CodePtr::VerifyAttrInterrupt(self.attr_var_init.verify_attrs_loc);
|
self.p = CodePtr::VerifyAttrInterrupt(self.attr_var_init.verify_attrs_loc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1046,7 +1046,7 @@ impl MachineState {
|
|||||||
|
|
||||||
match self.p {
|
match self.p {
|
||||||
CodePtr::VerifyAttrInterrupt(_) => {
|
CodePtr::VerifyAttrInterrupt(_) => {
|
||||||
self.p = CodePtr::Local(self.attr_var_init.cp);// + 1);
|
self.p = CodePtr::Local(self.attr_var_init.cp);
|
||||||
|
|
||||||
if !self.verify_attr_stepper(indices, policies, code_repo, prolog_stream) {
|
if !self.verify_attr_stepper(indices, policies, code_repo, prolog_stream) {
|
||||||
if self.fail {
|
if self.fail {
|
||||||
|
|||||||
Reference in New Issue
Block a user