codegen fix

This commit is contained in:
Mark Thom
2016-10-30 00:19:25 -06:00
parent 63075c9739
commit 509b7838c7
3 changed files with 14 additions and 9 deletions

View File

@@ -71,9 +71,12 @@ pub fn compile_query<'a>(t: &'a Term) -> Program
max_reg_used = counter;
for t in terms.iter().rev() {
let r = if t.is_variable() {
variable_allocs.get(t.name()).unwrap().0
} else {
if t.is_variable() {
counter -= 1;
continue;
}
let r = {
let oc = counter;
counter -= 1;
oc

View File

@@ -171,6 +171,8 @@ impl MachineState {
self.h += 1;
}
};
self.s += 1;
},
MachineInstruction::UnifyValue(reg) => {
let s = self.s;