limit hash lookups to metacall

This commit is contained in:
Mark Thom
2018-04-02 13:50:01 -06:00
parent 7b160199fd
commit cf741f365c
8 changed files with 272 additions and 146 deletions

View File

@@ -909,11 +909,14 @@ impl MachineState {
self.registers[arity - 1] = pred;
if let Some((name, arity)) = self.setup_call_n(arity - 1) {
try_or_fail!(self, call_policy.try_execute(self, code_dirs, name, arity));
if let Some(idx) = code_dirs.get(name, arity, &self.p.clone()) {
try_or_fail!(self, call_policy.try_execute(self, arity, idx));
return;
}
}
} else {
self.fail = true;
}
self.fail = true;
}
pub(super) fn goto_throw(&mut self) {