From c648345e3d82c0c40333bfd8ddea2633e21b08dc Mon Sep 17 00:00:00 2001 From: David Terei Date: Mon, 9 May 2011 00:48:40 -0700 Subject: [PATCH] Remove very dead Java backend code. --- compiler/main/CodeOutput.lhs | 32 -------------------------------- compiler/main/DynFlags.hs | 2 -- compiler/main/HscMain.lhs | 2 +- 3 files changed, 1 insertion(+), 35 deletions(-) diff --git a/compiler/main/CodeOutput.lhs b/compiler/main/CodeOutput.lhs index f5e3394..b58b7cd 100644 --- a/compiler/main/CodeOutput.lhs +++ b/compiler/main/CodeOutput.lhs @@ -13,12 +13,6 @@ import LlvmCodeGen ( llvmCodeGen ) import UniqSupply ( mkSplitUniqSupply ) -#ifdef JAVA -import JavaGen ( javaGen ) -import qualified PrintJava -import OccurAnal ( occurAnalyseBinds ) -#endif - import Finder ( mkStubPaths ) import PprC ( writeCs ) import CmmLint ( cmmLint ) @@ -83,12 +77,6 @@ codeOutput dflags this_mod location foreign_stubs pkg_deps flat_abstractC HscAsm -> outputAsm dflags filenm flat_abstractC; HscC -> outputC dflags filenm flat_abstractC pkg_deps; HscLlvm -> outputLlvm dflags filenm flat_abstractC; - HscJava -> -#ifdef JAVA - outputJava dflags filenm mod_name tycons core_binds; -#else - panic "Java support not compiled into this ghc"; -#endif HscNothing -> panic "codeOutput: HscNothing" } ; return stubs_exist @@ -176,26 +164,6 @@ outputLlvm dflags filenm flat_absC %************************************************************************ %* * -\subsection{Java} -%* * -%************************************************************************ - -\begin{code} -#ifdef JAVA -outputJava dflags filenm mod tycons core_binds - = doOutput filenm (\ f -> printForUser f alwaysQualify pp_java) - -- User style printing for now to keep indentation - where - occ_anal_binds = occurAnalyseBinds core_binds - -- Make sure we have up to date dead-var information - java_code = javaGen mod [{- Should be imports-}] tycons occ_anal_binds - pp_java = PrintJava.compilationUnit java_code -#endif -\end{code} - - -%************************************************************************ -%* * \subsection{Foreign import/export} %* * %************************************************************************ diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index d9f3246..b49b860 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -644,7 +644,6 @@ data HscTarget = HscC -- ^ Generate C code. | HscAsm -- ^ Generate assembly using the native code generator. | HscLlvm -- ^ Generate assembly using the llvm code generator. - | HscJava -- ^ Generate Java bytecode. | HscInterpreted -- ^ Generate bytecode. (Requires 'LinkInMemory') | HscNothing -- ^ Don't generate any code. See notes above. deriving (Eq, Show) @@ -653,7 +652,6 @@ showHscTargetFlag :: HscTarget -> String showHscTargetFlag HscC = "-fvia-c" showHscTargetFlag HscAsm = "-fasm" showHscTargetFlag HscLlvm = "-fllvm" -showHscTargetFlag HscJava = panic "No flag for HscJava" showHscTargetFlag HscInterpreted = "-fbyte-code" showHscTargetFlag HscNothing = "-fno-code" diff --git a/compiler/main/HscMain.lhs b/compiler/main/HscMain.lhs index 6a5552f..3e37f5b 100644 --- a/compiler/main/HscMain.lhs +++ b/compiler/main/HscMain.lhs @@ -430,7 +430,7 @@ makeSimpleDetails hsc_env tc_result = mkBootModDetailsTc hsc_env tc_result It's the task of the compilation proper to compile Haskell, hs-boot and -core files to either byte-code, hard-code (C, asm, Java, ect) or to +core files to either byte-code, hard-code (C, asm, LLVM, ect) or to nothing at all (the module is still parsed and type-checked. This feature is mostly used by IDE's and the likes). Compilation can happen in either 'one-shot', 'batch', 'nothing', -- 1.7.10.4