From e956c113f38ae5cf78d79cf00de776f0331a332c Mon Sep 17 00:00:00 2001 From: Bernhard Urban Date: Mon, 18 Jun 2012 18:33:26 +0200 Subject: [PATCH] codegen: typestuff for compiling classpath files --- Mate/Utilities.hs | 1 + Mate/X86CodeGen.hs | 1 + 2 files changed, 2 insertions(+) diff --git a/Mate/Utilities.hs b/Mate/Utilities.hs index 211b68f..89020a5 100644 --- a/Mate/Utilities.hs +++ b/Mate/Utilities.hs @@ -44,6 +44,7 @@ methodHaveReturnValue :: Class Direct -> Word16 -> Bool methodHaveReturnValue cls idx = case ret of ReturnsVoid -> False; (Returns BoolType) -> True + (Returns CharByte) -> True (Returns IntType) -> True; (Returns (Array _ _)) -> True (Returns (ObjectType _)) -> True; diff --git a/Mate/X86CodeGen.hs b/Mate/X86CodeGen.hs index d619879..b4b72b1 100644 --- a/Mate/X86CodeGen.hs +++ b/Mate/X86CodeGen.hs @@ -272,6 +272,7 @@ emitFromBB method sig cls hmap = do emit (LDC2 x) = do value <- case constsPool cls M.! x of (CString s) -> liftIO $ getUniqueStringAddr s + (CInteger i) -> liftIO $ return i e -> error $ "LDCI... missing impl.: " ++ show e push value emit (GETFIELD x) = do -- 2.25.1