tweak codegen

This commit is contained in:
Mark Thom
2017-08-05 10:15:40 -06:00
parent 180fca20f9
commit 198eca678c

View File

@@ -256,17 +256,19 @@ impl<'a, TermMarker: Allocator<'a>> CodeGenerator<'a, TermMarker>
body: &mut Code) body: &mut Code)
-> usize -> usize
{ {
let perm_vars = vs.vars_above_threshold(0) + deep_cuts as usize;
if num_clauses > 0 { if num_clauses > 0 {
let perm_vars = vs.vars_above_threshold(0) + deep_cuts as usize;
body.push(Line::Control(ControlInstruction::Allocate(perm_vars))); body.push(Line::Control(ControlInstruction::Allocate(perm_vars)));
if deep_cuts { if deep_cuts {
body.push(Line::Cut(CutInstruction::GetLevel)); body.push(Line::Cut(CutInstruction::GetLevel));
} }
return perm_vars;
} }
perm_vars 0
} }
fn compile_neck_cut_or(&mut self, fn compile_neck_cut_or(&mut self,