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

@@ -124,10 +124,14 @@ macro_rules! put_var {
macro_rules! put_structure {
($atom:expr, $arity:expr, $r:expr, Some($fix:expr)) => (
QueryInstruction::PutStructure(ClauseType::Op(clause_name!($atom), $fix), $arity, $r)
QueryInstruction::PutStructure(ClauseType::Op(clause_name!($atom), $fix, CodeIndex::default()),
$arity,
$r)
);
($atom:expr, $arity:expr, $r:expr, None) => (
QueryInstruction::PutStructure(ClauseType::Named(clause_name!($atom)), $arity, $r)
QueryInstruction::PutStructure(ClauseType::Named(clause_name!($atom), CodeIndex::default()),
$arity,
$r)
)
}
@@ -393,10 +397,14 @@ macro_rules! get_constant {
macro_rules! get_structure {
($atom:expr, $arity:expr, $r:expr, Some($fix:expr)) => (
FactInstruction::GetStructure(ClauseType::Op(clause_name!($atom), $fix), $arity, $r)
FactInstruction::GetStructure(ClauseType::Op(clause_name!($atom), $fix, CodeIndex::default()),
$arity,
$r)
);
($atom:expr, $arity:expr, $r:expr, None) => (
FactInstruction::GetStructure(ClauseType::Named(clause_name!($atom)), $arity, $r)
FactInstruction::GetStructure(ClauseType::Named(clause_name!($atom), CodeIndex::default()),
$arity,
$r)
)
}