From 693c691b590e25c2fce55aed14dee1ee29ca449e Mon Sep 17 00:00:00 2001 From: Chris Fallin Date: Fri, 17 Dec 2021 00:25:04 -0800 Subject: [PATCH] WIP. --- src/cfg/structured.rs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/cfg/structured.rs b/src/cfg/structured.rs index f222187..0812775 100644 --- a/src/cfg/structured.rs +++ b/src/cfg/structured.rs @@ -238,3 +238,29 @@ impl WasmRegion { } } } + +#[derive(Clone, Debug)] +pub struct BlockOrder { + pub blocks: Vec, +} + +#[derive(Clone, Debug)] +pub enum BlockOrderEntry { + StartBlock, + EndBlock, + StartLoop, + EndLoop, + Block(BlockId, Vec), +} + +#[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!() + } +}