This commit is contained in:
Chris Fallin 2021-12-17 00:25:04 -08:00
parent 7719d26177
commit 693c691b59

View file

@ -238,3 +238,29 @@ impl WasmRegion {
}
}
}
#[derive(Clone, Debug)]
pub struct BlockOrder {
pub blocks: Vec<BlockOrderEntry>,
}
#[derive(Clone, Debug)]
pub enum BlockOrderEntry {
StartBlock,
EndBlock,
StartLoop,
EndLoop,
Block(BlockId, Vec<BlockOrderTarget>),
}
#[derive(Clone, Debug)]
pub struct BlockOrderTarget {
pub target: BlockId,
pub relative_branch: usize,
}
impl BlockOrder {
pub fn compute(cfg: &CFGInfo, wasm_region: &WasmRegion) -> BlockOrder {
todo!()
}
}