use crate::targets::*;
use crate::temp_v;
use crate::types::*;
+use crate::variable_records::*;
use crate::instr;
use crate::machine::disjuncts::*;
code: &mut CodeDeque,
) -> RegType {
self.mark_var::<QueryInstruction>(var_num, Level::Shallow, vr, term_loc, code);
-
vr.get().norm()
}
self.mark_var_in_non_callable(var_num, term_loc, vr, code);
temp_v!(arg)
} else {
+ match &self.var_data.records[var_num].allocation {
+ VarAlloc::Perm(_, PermVarAllocation::Pending) => {
+ self.mark_var_in_non_callable(var_num, term_loc, vr, code);
+ }
+ _ => {}
+ }
+
self.increment_running_count(var_num);
RegType::Perm(p)
}
}
}
_ => {
- unreachable!();
}
}
#[inline(always)]
pub fn get_binding(&self, var_num: usize) -> RegType {
- self.var_data.records[var_num].allocation.as_reg_type()
+ self.var_data.records[var_num].allocation.as_reg_type()
}
pub fn num_perm_vars(&self) -> usize {
RegType::Temp(0) => {
let o = self.alloc_reg_to_var::<Target>(var_num, lvl, term_loc, code);
cell.set(VarReg::Norm(RegType::Temp(o)));
-
(RegType::Temp(o), true)
}
RegType::Perm(0) => {
let p = self.alloc_perm_var(var_num, term_loc.chunk_num());
+ cell.set(VarReg::Norm(RegType::Perm(p)));
(RegType::Perm(p), true)
}
r @ RegType::Perm(_) => {