codegen fix
This commit is contained in:
@@ -71,9 +71,12 @@ pub fn compile_query<'a>(t: &'a Term) -> Program
|
|||||||
max_reg_used = counter;
|
max_reg_used = counter;
|
||||||
|
|
||||||
for t in terms.iter().rev() {
|
for t in terms.iter().rev() {
|
||||||
let r = if t.is_variable() {
|
if t.is_variable() {
|
||||||
variable_allocs.get(t.name()).unwrap().0
|
counter -= 1;
|
||||||
} else {
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
let r = {
|
||||||
let oc = counter;
|
let oc = counter;
|
||||||
counter -= 1;
|
counter -= 1;
|
||||||
oc
|
oc
|
||||||
|
|||||||
@@ -171,6 +171,8 @@ impl MachineState {
|
|||||||
self.h += 1;
|
self.h += 1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
self.s += 1;
|
||||||
},
|
},
|
||||||
MachineInstruction::UnifyValue(reg) => {
|
MachineInstruction::UnifyValue(reg) => {
|
||||||
let s = self.s;
|
let s = self.s;
|
||||||
|
|||||||
Reference in New Issue
Block a user