do some registers

This commit is contained in:
nora 2023-07-08 21:07:42 +02:00
parent a363b7c6d1
commit e28469fcc0
9 changed files with 227 additions and 97 deletions

View file

@ -33,7 +33,7 @@
mod custom;
pub mod info;
mod pretty;
pub mod pretty;
mod validate;
mod visit;
@ -299,3 +299,21 @@ impl Branch {
}
}
}
impl Location {
pub fn start() -> Self {
Self {
bb: BbIdx(0),
stmt: Some(0),
}
}
pub fn terminator(bb: BbIdx) -> Self {
Self { bb, stmt: None }
}
pub fn stmt(bb: BbIdx, stmt: usize) -> Self {
Self {
bb,
stmt: Some(stmt),
}
}
}