X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=Mate%2FBasicBlocks.hs;h=229325d6a36423514d95f29dee312746a215854b;hb=dedebead7a042963f8445ecd23858418b0f8c573;hp=59e30521b5b33937262059169ea653d5b12dfd43;hpb=e9bbf51a0b41aee0b904936c4f1b69ca555d2648;p=mate.git diff --git a/Mate/BasicBlocks.hs b/Mate/BasicBlocks.hs index 59e3052..229325d 100644 --- a/Mate/BasicBlocks.hs +++ b/Mate/BasicBlocks.hs @@ -21,22 +21,10 @@ import JVM.Converter import JVM.Assembler import Mate.Utilities +import Mate.Types -type BlockID = Int --- Represents a CFG node -data BasicBlock = BasicBlock { - -- inputs :: [Variable], - -- outputs :: [Variable], - code :: [Instruction], - successor :: BBEnd } - --- describes (leaving) edges of a CFG node -data BBEnd = Return | FallThrough BlockID | OneTarget BlockID | TwoTarget BlockID BlockID deriving Show - -type MapBB = M.Map BlockID BasicBlock - --- for immediate representation for determine BBs +-- for immediate representation to determine BBs type Offset = (Int, Maybe BBEnd) -- (offset in bytecode, offset to jump target) type OffIns = (Offset, Instruction)