From: Bernhard Urban Date: Sun, 20 May 2012 20:10:36 +0000 (+0200) Subject: trapmap: delete entry after information is consumed X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=b12b3f367d913549cd51cc4eb66e54f4e3d37d50;p=mate.git trapmap: delete entry after information is consumed --- diff --git a/Mate/ClassPool.hs b/Mate/ClassPool.hs index 0f18289..e476c8b 100644 --- a/Mate/ClassPool.hs +++ b/Mate/ClassPool.hs @@ -97,6 +97,7 @@ getStaticFieldAddr from = do trapmap <- getTrapMap let w32_from = fromIntegral from let sfi = trapmap M.! w32_from + setTrapMap $ M.delete w32_from trapmap case sfi of (SFI (StaticFieldInfo cls field)) -> getStaticFieldOffset cls field _ -> error "getFieldAddr: no trapInfo. abort" diff --git a/Mate/MethodPool.hs b/Mate/MethodPool.hs index 2a3cfed..44e0545 100644 --- a/Mate/MethodPool.hs +++ b/Mate/MethodPool.hs @@ -51,6 +51,7 @@ getMethodEntry signal_from methodtable = do (II _ (MethodInfo methname _ msig)) -> MethodInfo methname (vmap M.! fromIntegral methodtable) msig _ -> error "getMethodEntry: no trapInfo. abort." + setTrapMap $ M.delete w32_from tmap case M.lookup mi' mmap of Nothing -> do cls <- getClassFile cm