From fb38b8bab2b531ca7ac4ea28ad5b259a00e3759b Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Wed, 4 Oct 2006 12:32:42 +0000 Subject: [PATCH 1/1] Remove ILX from the GHC altogether (although I left the source file IlxGen in case anyone wants to see it) --- compiler/main/CodeOutput.lhs | 27 --------------------------- compiler/main/DriverPhases.hs | 4 ---- compiler/main/DynFlags.hs | 5 +---- compiler/stgSyn/CoreToStg.lhs | 13 ------------- compiler/typecheck/TcForeign.lhs | 4 +--- 5 files changed, 2 insertions(+), 51 deletions(-) diff --git a/compiler/main/CodeOutput.lhs b/compiler/main/CodeOutput.lhs index 06e1ee7..a66a836 100644 --- a/compiler/main/CodeOutput.lhs +++ b/compiler/main/CodeOutput.lhs @@ -13,10 +13,6 @@ import UniqSupply ( mkSplitUniqSupply ) import AsmCodeGen ( nativeCodeGen ) #endif -#ifdef ILX -import IlxGen ( ilxGen ) -#endif - #ifdef JAVA import JavaGen ( javaGen ) import qualified PrintJava @@ -94,13 +90,6 @@ codeOutput dflags this_mod location foreign_stubs pkg_deps flat_abstractC #else panic "Java support not compiled into this ghc"; #endif - HscILX -> -#ifdef ILX - let tycons = typeEnvTyCons type_env in - outputIlx dflags filenm mod_name tycons stg_binds; -#else - panic "ILX support not compiled into this ghc"; -#endif } ; return stubs_exist } @@ -211,22 +200,6 @@ outputJava dflags filenm mod tycons core_binds %************************************************************************ %* * -\subsection{Ilx} -%* * -%************************************************************************ - -\begin{code} -#ifdef ILX -outputIlx dflags filename mod tycons stg_binds - = doOutput filename (\ f -> printForC f pp_ilx) - where - pp_ilx = ilxGen mod tycons stg_binds -#endif -\end{code} - - -%************************************************************************ -%* * \subsection{Foreign import/export} %* * %************************************************************************ diff --git a/compiler/main/DriverPhases.hs b/compiler/main/DriverPhases.hs index 875c9f6..118b23a 100644 --- a/compiler/main/DriverPhases.hs +++ b/compiler/main/DriverPhases.hs @@ -183,10 +183,6 @@ phaseInputExt SplitAs = "split_s" -- not really generated phaseInputExt CmmCpp = "cmm" phaseInputExt Cmm = "cmmcpp" phaseInputExt StopLn = "o" -#ifdef ILX -phaseInputExt Ilx2Il = "ilx" -phaseInputExt Ilasm = "il" -#endif haskellish_src_suffixes = haskellish_user_src_suffixes ++ [ "hspp", "hscpp", "hcr", "cmm" ] diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index e4b82c8..d93e944 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -304,7 +304,6 @@ data HscTarget = HscC | HscAsm | HscJava - | HscILX | HscInterpreted | HscNothing deriving (Eq, Show) @@ -977,7 +976,6 @@ dynamic_flags = [ , ( "fasm", AnySuffix (\_ -> setTarget HscAsm) ) , ( "fvia-c", NoArg (setTarget HscC) ) , ( "fvia-C", NoArg (setTarget HscC) ) - , ( "filx", NoArg (setTarget HscILX) ) , ( "fglasgow-exts", NoArg (mapM_ setDynFlag glasgowExtsFlags) ) , ( "fno-glasgow-exts", NoArg (mapM_ unSetDynFlag glasgowExtsFlags) ) @@ -1105,12 +1103,11 @@ setPackageName p where pid = stringToPackageId p --- we can only switch between HscC, HscAsmm, and HscILX with dynamic flags +-- we can only switch between HscC, and HscAsmm with dynamic flags -- (-fvia-C, -fasm, -filx respectively). setTarget l = upd (\dfs -> case hscTarget dfs of HscC -> dfs{ hscTarget = l } HscAsm -> dfs{ hscTarget = l } - HscILX -> dfs{ hscTarget = l } _ -> dfs) setOptLevel :: Int -> DynFlags -> DynFlags diff --git a/compiler/stgSyn/CoreToStg.lhs b/compiler/stgSyn/CoreToStg.lhs index 5191771..31837b9 100644 --- a/compiler/stgSyn/CoreToStg.lhs +++ b/compiler/stgSyn/CoreToStg.lhs @@ -21,9 +21,6 @@ import TyCon ( isAlgTyCon ) import Id import Var ( Var, globalIdDetails, idType ) import TyCon ( isUnboxedTupleTyCon, isPrimTyCon, isFunTyCon, isHiBootTyCon ) -#ifdef ILX -import MkId ( unsafeCoerceId ) -#endif import IdInfo import DataCon import CostCentre ( noCCS ) @@ -321,16 +318,6 @@ coreToStgExpr (Note (SCC cc) expr) = coreToStgExpr expr `thenLne` ( \ (expr2, fvs, escs) -> returnLne (StgSCC cc expr2, fvs, escs) ) -#ifdef ILX --- For ILX, convert (__coerce__ to_ty from_ty e) --- into (coerce to_ty from_ty e) --- where coerce is real function -coreToStgExpr (Cast expr co) - = let (from_ty, ty_ty) = coercionKind co in - coreToStgExpr (mkApps (Var unsafeCoerceId) - [Type from_ty, Type to_ty, expr]) -#endif - coreToStgExpr (Note other_note expr) = coreToStgExpr expr diff --git a/compiler/typecheck/TcForeign.lhs b/compiler/typecheck/TcForeign.lhs index 6894238..6c80189 100644 --- a/compiler/typecheck/TcForeign.lhs +++ b/compiler/typecheck/TcForeign.lhs @@ -287,7 +287,6 @@ checkForeignRes non_io_result_ok pred_res_ty ty \end{code} \begin{code} -checkDotnet HscILX = Nothing #if defined(mingw32_TARGET_OS) checkDotnet HscC = Nothing checkDotnet _ = Just (text "requires C code generation (-fvia-C)") @@ -308,10 +307,9 @@ checkCOrAsmOrInterp other checkCOrAsmOrDotNetOrInterp HscC = Nothing checkCOrAsmOrDotNetOrInterp HscAsm = Nothing -checkCOrAsmOrDotNetOrInterp HscILX = Nothing checkCOrAsmOrDotNetOrInterp HscInterpreted = Nothing checkCOrAsmOrDotNetOrInterp other - = Just (text "requires interpreted, C, native or .NET ILX code generation") + = Just (text "requires interpreted, C or native code generation") checkCg check = getDOpts `thenM` \ dflags -> -- 1.7.10.4