make clause/2 global in scope
@@ -873,25 +873,20 @@ pub(super) fn system_call(&mut self,
&SystemClauseType::GetClause => {
let head = self[temp_v!(1)].clone();
- let (module, subsection) = match self.store(self.deref(head)) {
+ let subsection = match self.store(self.deref(head)) {
Addr::Str(s) =>
match self.heap[s].clone() {
HeapCellValue::NamedStr(arity, name, ..) =>
- (name.owning_module(), indices.get_clause_subsection(name, arity)),
+ indices.get_clause_subsection(name, arity),
_ => unreachable!()
},
Addr::Con(Constant::Atom(name, _)) =>
- (name.owning_module(), indices.get_clause_subsection(name, 0)),
+ indices.get_clause_subsection(name, 0),
_ => unreachable!()
};
match subsection {
Some(dynamic_predicate_info) => {
- if dynamic_predicate_info.module_src != module {
- self.fail = true;
- return Ok(());
- }
-
self.execute_at_index(2, dynamic_predicate_info.clauses_subsection_p);
return Ok(());
},
