codegen: typestuff for compiling classpath files
[mate.git] / Mate / MethodPool.hs
index 2a3cfed4364c3eb936b2217b68eb8440246b0c5b..7a0cda170964a761e50affbfe0a3c31d43e940d0 100644 (file)
@@ -45,12 +45,12 @@ getMethodEntry signal_from methodtable = do
   let mi = tmap M.! w32_from
   let mi'@(MethodInfo method cm sig) =
         case mi of
-          (MI x) -> x
-          (VI  _(MethodInfo methname _ msig)) ->
-              MethodInfo methname (vmap M.! fromIntegral methodtable) msig
-          (II _ (MethodInfo methname _ msig)) ->
-              MethodInfo methname (vmap M.! fromIntegral methodtable) msig
-          _ -> error "getMethodEntry: no trapInfo. abort."
+          (StaticMethod x) -> x
+          (VirtualMethod   _ (MethodInfo methname _ msig)) -> newMi methname msig
+          (InterfaceMethod _ (MethodInfo methname _ msig)) -> newMi methname msig
+          _ -> error "getMethodEntry: no TrapCause found. abort."
+        where newMi mn = MethodInfo mn (vmap M.! fromIntegral methodtable)
+  setTrapMap $ M.delete w32_from tmap
   case M.lookup mi' mmap of
     Nothing -> do
       cls <- getClassFile cm