Use PackedOption<Ebb> in the Layout implementation.

The doubly linked lists are terminated with None.

Remove NO_EBB and the Default impl for Ebb.
This commit is contained in:
Jakob Stoklund Olesen
2017-01-19 13:59:57 -08:00
parent 2f6a33f16d
commit b8200d7be9
3 changed files with 49 additions and 47 deletions

View File

@@ -72,15 +72,6 @@ impl Ebb {
}
}
/// A guaranteed invalid EBB reference.
pub const NO_EBB: Ebb = Ebb(u32::MAX);
impl Default for Ebb {
fn default() -> Ebb {
NO_EBB
}
}
/// An opaque reference to an instruction in a function.
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug, PartialOrd, Ord)]
pub struct Inst(u32);