fixes to binding.

This commit is contained in:
Mark Thom
2016-10-30 21:49:27 -06:00
parent 1272d97311
commit d46197f1fd
3 changed files with 16 additions and 22 deletions

View File

@@ -29,17 +29,8 @@ pub enum MachineInstruction {
pub type Program = Vec<MachineInstruction>;
#[derive(Clone, Copy, PartialEq)]
#[derive(Clone, Copy, PartialEq)]
pub enum Addr {
HeapCell(usize),
RegNum(usize)
}
impl Addr {
pub fn heap_offset(&self) -> usize {
match self {
&Addr::HeapCell(hc) => hc,
&Addr::RegNum(reg) => reg
}
}
}