make module code entries immutable (re: issue #27)

This commit is contained in:
Mark Thom
2018-04-18 19:24:32 -06:00
parent a4789a73ef
commit 989d44d702
7 changed files with 73 additions and 59 deletions

View File

@@ -909,7 +909,7 @@ impl MachineState {
self.registers[arity - 1] = pred;
if let Some((name, arity)) = self.setup_call_n(arity - 1) {
if let Some(idx) = code_dirs.get(name.clone(), arity, &self.p.clone()) {
if let Some(idx) = code_dirs.get(name.clone(), arity, self.p.module_name()) {
try_or_fail!(self, call_policy.try_execute(self, name, arity, idx));
return;
}