peepmatic: Represent various id types with u16
These ids end up in the automaton, so making them smaller should give us better data cache locality and also smaller serialized sizes.
This commit is contained in:
@@ -414,7 +414,7 @@ where
|
||||
Part::Constant(c) => {
|
||||
let x = c.as_int().ok_or(Else)?;
|
||||
let id = self.peep_opt.integers.already_interned(x).ok_or(Else)?;
|
||||
Ok(id.0)
|
||||
Ok(id.into())
|
||||
}
|
||||
Part::Instruction(i) => {
|
||||
let c = self
|
||||
@@ -423,7 +423,7 @@ where
|
||||
.ok_or(Else)?;
|
||||
let x = c.as_int().ok_or(Else)?;
|
||||
let id = self.peep_opt.integers.already_interned(x).ok_or(Else)?;
|
||||
Ok(id.0)
|
||||
Ok(id.into())
|
||||
}
|
||||
Part::ConditionCode(_) => unreachable!("IntegerValue on condition code"),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user