make return_from_clause macro respect verify_attributes
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "scryer-prolog"
|
name = "scryer-prolog"
|
||||||
version = "0.8.53"
|
version = "0.8.54"
|
||||||
authors = ["Mark Thom <markjordanthom@gmail.com>"]
|
authors = ["Mark Thom <markjordanthom@gmail.com>"]
|
||||||
repository = "https://github.com/mthom/scryer-prolog"
|
repository = "https://github.com/mthom/scryer-prolog"
|
||||||
description = "A modern Prolog implementation written mostly in Rust."
|
description = "A modern Prolog implementation written mostly in Rust."
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ Module : Predicate :-
|
|||||||
|
|
||||||
current_prolog_flag(Flag, false) :- Flag == bounded, !.
|
current_prolog_flag(Flag, false) :- Flag == bounded, !.
|
||||||
current_prolog_flag(bounded, false).
|
current_prolog_flag(bounded, false).
|
||||||
current_prolog_flag(Flag, down) :- Flag == integer_rounding_function, !.
|
current_prolog_flag(Flag, toward_zero) :- Flag == integer_rounding_function, !.
|
||||||
current_prolog_flag(integer_rounding_function, down).
|
current_prolog_flag(integer_rounding_function, toward_zero).
|
||||||
current_prolog_flag(Flag, Value) :- Flag == double_quotes, !, '$get_double_quotes'(Value).
|
current_prolog_flag(Flag, Value) :- Flag == double_quotes, !, '$get_double_quotes'(Value).
|
||||||
current_prolog_flag(double_quotes, Value) :- '$get_double_quotes'(Value).
|
current_prolog_flag(double_quotes, Value) :- '$get_double_quotes'(Value).
|
||||||
current_prolog_flag(Flag, _) :- Flag == max_integer, !, '$fail'.
|
current_prolog_flag(Flag, _) :- Flag == max_integer, !, '$fail'.
|
||||||
|
|||||||
@@ -178,6 +178,10 @@ macro_rules! try_eval_session {
|
|||||||
}
|
}
|
||||||
macro_rules! return_from_clause {
|
macro_rules! return_from_clause {
|
||||||
($lco:expr, $machine_st:expr) => {{
|
($lco:expr, $machine_st:expr) => {{
|
||||||
|
if let CodePtr::VerifyAttrInterrupt(_) = $machine_st.p {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
if $lco {
|
if $lco {
|
||||||
$machine_st.p = CodePtr::Local($machine_st.cp.clone());
|
$machine_st.p = CodePtr::Local($machine_st.cp.clone());
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user