From: Mark Thom Date: Fri, 8 Mar 2019 06:32:41 +0000 (-0700) Subject: make clause/2 global in scope X-Git-Tag: v0.8.110~196 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=3cb1996e61aa4f1d27478e4453106143044ce936;p=scryer-prolog.git make clause/2 global in scope --- diff --git a/src/prolog/machine/system_calls.rs b/src/prolog/machine/system_calls.rs index 5299c0f6..91fef9cc 100644 --- a/src/prolog/machine/system_calls.rs +++ b/src/prolog/machine/system_calls.rs @@ -873,25 +873,20 @@ impl MachineState { &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(()); },