From: Bernhard Urban Date: Mon, 18 Jun 2012 16:33:26 +0000 (+0200) Subject: codegen: typestuff for compiling classpath files X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mate.git;a=commitdiff_plain;h=e956c113f38ae5cf78d79cf00de776f0331a332c codegen: typestuff for compiling classpath files --- 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