record places after inline instrs

This commit is contained in:
Mark Thom
2017-11-03 21:08:10 -06:00
parent 28069a301e
commit e78ffaabd8

View File

@@ -408,11 +408,16 @@ impl Machine {
while self.ms.p < end_ptr { while self.ms.p < end_ptr {
if let CodePtr::TopLevel(mut cn, p) = self.ms.p { if let CodePtr::TopLevel(mut cn, p) = self.ms.p {
if let &Line::Control(ref ctrl_instr) = &self[CodePtr::TopLevel(cn, p)] { match &self[CodePtr::TopLevel(cn, p)] {
if ctrl_instr.is_jump_instr() { &Line::Control(ref ctrl_instr) if ctrl_instr.is_jump_instr() => {
self.record_var_places(cn, alloc_locs, heap_locs); self.record_var_places(cn, alloc_locs, heap_locs);
cn += 1; cn += 1;
} },
&Line::BuiltIn(BuiltInInstruction::IsAtomic(_))
| &Line::BuiltIn(BuiltInInstruction::IsVar(_)) => {
self.record_var_places(cn, alloc_locs, heap_locs);
},
_ => {}
} }
self.ms.p = CodePtr::TopLevel(cn, p); self.ms.p = CodePtr::TopLevel(cn, p);
@@ -425,10 +430,6 @@ impl Machine {
_ => break _ => break
}; };
} }
if let CodePtr::TopLevel(cn, _) = self.ms.p {
self.record_var_places(cn, alloc_locs, heap_locs);
}
} }
fn fail<'a>(&mut self) -> EvalSession<'a> fn fail<'a>(&mut self) -> EvalSession<'a>