Remove very dead Java backend code.
authorDavid Terei <davidterei@gmail.com>
Mon, 9 May 2011 07:48:40 +0000 (00:48 -0700)
committerDavid Terei <davidterei@gmail.com>
Tue, 31 May 2011 07:53:31 +0000 (00:53 -0700)
compiler/main/CodeOutput.lhs
compiler/main/DynFlags.hs
compiler/main/HscMain.lhs

index f5e3394..b58b7cd 100644 (file)
@@ -13,12 +13,6 @@ import LlvmCodeGen ( llvmCodeGen )
 
 import UniqSupply      ( mkSplitUniqSupply )
 
 
 import UniqSupply      ( mkSplitUniqSupply )
 
-#ifdef JAVA
-import JavaGen         ( javaGen )
-import qualified PrintJava
-import OccurAnal       ( occurAnalyseBinds )
-#endif
-
 import Finder          ( mkStubPaths )
 import PprC            ( writeCs )
 import CmmLint         ( cmmLint )
 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;
              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
              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}
 %*                                                                     *
 %************************************************************************
 \subsection{Foreign import/export}
 %*                                                                     *
 %************************************************************************
index d9f3246..b49b860 100644 (file)
@@ -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.
   = 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)
   | 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 HscC           = "-fvia-c"
 showHscTargetFlag HscAsm         = "-fasm"
 showHscTargetFlag HscLlvm        = "-fllvm"
-showHscTargetFlag HscJava        = panic "No flag for HscJava"
 showHscTargetFlag HscInterpreted = "-fbyte-code"
 showHscTargetFlag HscNothing     = "-fno-code"
 
 showHscTargetFlag HscInterpreted = "-fbyte-code"
 showHscTargetFlag HscNothing     = "-fno-code"
 
index 6a5552f..3e37f5b 100644 (file)
@@ -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
 
 
 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',
 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',