Commit fb38b8ba authored by simonpj@microsoft.com's avatar simonpj@microsoft.com
Browse files

Remove ILX from the GHC altogether (although I left the source file IlxGen in...

Remove ILX from the GHC altogether (although I left the source file IlxGen in case anyone wants to see it)
parent 7eb7a2d9
......@@ -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
......@@ -93,13 +89,6 @@ codeOutput dflags this_mod location foreign_stubs pkg_deps flat_abstractC
outputJava dflags filenm mod_name tycons core_binds;
#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
......@@ -209,22 +198,6 @@ outputJava dflags filenm mod tycons core_binds
\end{code}
%************************************************************************
%* *
\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}
......
......@@ -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" ]
......
......@@ -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
......
......@@ -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
......
......@@ -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 ->
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment