X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mate.git;a=blobdiff_plain;f=Mate%2FX86CodeGen.hs;fp=Mate%2FX86CodeGen.hs;h=79586ef02dd49ab33e512484d7d9c86558844201;hp=03333ce0d35d5163a3b31da763a60eb3d20b6ad6;hb=de9b805eb93b4a39c03e9f7e1cda62c674c87fe3;hpb=3398391fa883278959063506c8051943aba9c4ee diff --git a/Mate/X86CodeGen.hs b/Mate/X86CodeGen.hs index 03333ce..79586ef 100644 --- a/Mate/X86CodeGen.hs +++ b/Mate/X86CodeGen.hs @@ -45,8 +45,8 @@ type BBStarts = M.Map BlockID Int type CompileInfo = (EntryPoint, Int, TrapMap) -emitFromBB :: Class Direct -> RawMethod -> CodeGen e JpcNpcMap (CompileInfo, [Instruction]) -emitFromBB cls method = do +emitFromBB :: Class Direct -> MethodInfo -> RawMethod -> CodeGen e JpcNpcMap (CompileInfo, [Instruction]) +emitFromBB cls miThis method = do let keys = M.keys hmap llmap <- mapM (newNamedLabel . (++) "bb_" . show) keys let lmap = zip keys llmap @@ -218,6 +218,7 @@ emitFromBB cls method = do emit' ATHROW = do trapaddr <- emitSigIllTrap 2 let patcher resp reip = do + (_, jnmap) <- liftIO $ getMethodEntry miThis error "no athrow for you, sorry" emitSigIllTrap 2 return reip