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:
@@ -6,6 +6,7 @@ macro_rules! instructions {
|
||||
} => {
|
||||
|
||||
$(
|
||||
#[allow(dead_code)]
|
||||
pub const $variant: InstOp = $value;
|
||||
)*
|
||||
|
||||
|
||||
@@ -102,7 +102,6 @@ pub enum Value {
|
||||
Name(String),
|
||||
Here,
|
||||
Addr(Box<Value>, IntSize),
|
||||
//Array(Vec<Value>),
|
||||
}
|
||||
|
||||
impl Value {
|
||||
|
||||
@@ -5,6 +5,7 @@ macro_rules! registers {
|
||||
pub type Reg = u8;
|
||||
|
||||
$(
|
||||
#[allow(dead_code)]
|
||||
pub const $variant: Reg = $value;
|
||||
)*
|
||||
|
||||
|
||||
@@ -239,9 +239,6 @@ impl State {
|
||||
// TODO - dump
|
||||
}
|
||||
}
|
||||
if next_ip > 100 {
|
||||
panic!("{:?}", next_ip);
|
||||
}
|
||||
self.set_reg_unchecked(IP, next_ip);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user