Minor code cleanup and surpress warnings for unused inst and register constants

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2020-02-25 13:46:38 -05:00
parent b8a769c80f
commit 0ff189bc1b
4 changed files with 2 additions and 4 deletions

View File

@@ -6,6 +6,7 @@ macro_rules! instructions {
} => { } => {
$( $(
#[allow(dead_code)]
pub const $variant: InstOp = $value; pub const $variant: InstOp = $value;
)* )*

View File

@@ -102,7 +102,6 @@ pub enum Value {
Name(String), Name(String),
Here, Here,
Addr(Box<Value>, IntSize), Addr(Box<Value>, IntSize),
//Array(Vec<Value>),
} }
impl Value { impl Value {

View File

@@ -5,6 +5,7 @@ macro_rules! registers {
pub type Reg = u8; pub type Reg = u8;
$( $(
#[allow(dead_code)]
pub const $variant: Reg = $value; pub const $variant: Reg = $value;
)* )*

View File

@@ -239,9 +239,6 @@ impl State {
// TODO - dump // TODO - dump
} }
} }
if next_ip > 100 {
panic!("{:?}", next_ip);
}
self.set_reg_unchecked(IP, next_ip); self.set_reg_unchecked(IP, next_ip);
Ok(()) Ok(())
} }