distinguish eq from structural_eq on strings
This commit is contained in:
@@ -6,7 +6,6 @@ use prolog::machine::machine_errors::*;
|
||||
use prolog::num::{BigInt, BigUint, Zero, One};
|
||||
use prolog::or_stack::*;
|
||||
use prolog::read::*;
|
||||
use prolog::string_list::*;
|
||||
use prolog::tabled_rc::*;
|
||||
|
||||
use downcast::Any;
|
||||
@@ -299,7 +298,6 @@ impl Default for MachineFlags {
|
||||
|
||||
pub struct MachineState {
|
||||
pub(crate) atom_tbl: TabledData<Atom>,
|
||||
pub(crate) string_tbl: TabledData<StringListWrapper>,
|
||||
pub(super) s: usize,
|
||||
pub(super) p: CodePtr,
|
||||
pub(super) b: usize,
|
||||
@@ -626,15 +624,7 @@ pub(crate) trait CallPolicy: Any {
|
||||
return_from_clause!(machine_st.last_call, machine_st)
|
||||
},
|
||||
&BuiltInClauseType::Eq => {
|
||||
let a1 = machine_st[temp_v!(1)].clone();
|
||||
let a2 = machine_st[temp_v!(2)].clone();
|
||||
|
||||
machine_st.fail = if let Ordering::Equal = machine_st.compare_term_test(&a1, &a2) {
|
||||
false
|
||||
} else {
|
||||
true
|
||||
};
|
||||
|
||||
machine_st.fail = machine_st.eq_test();
|
||||
return_from_clause!(machine_st.last_call, machine_st)
|
||||
},
|
||||
&BuiltInClauseType::Ground => {
|
||||
|
||||
Reference in New Issue
Block a user