import AsmCodeGen ( nativeCodeGen )
#endif
-#ifdef ILX
-import IlxGen ( ilxGen )
-#endif
-
#ifdef JAVA
import JavaGen ( javaGen )
import qualified PrintJava
#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
}
%************************************************************************
%* *
-\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}
%* *
%************************************************************************
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" ]
= HscC
| HscAsm
| HscJava
- | HscILX
| HscInterpreted
| HscNothing
deriving (Eq, Show)
, ( "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) )
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
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 )
= 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
\end{code}
\begin{code}
-checkDotnet HscILX = Nothing
#if defined(mingw32_TARGET_OS)
checkDotnet HscC = Nothing
checkDotnet _ = Just (text "requires C code generation (-fvia-C)")
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 ->