= HscC
| HscAsm
| HscJava
+#ifdef ILX
+ | HscILX
+#endif
| HscInterpreted
deriving (Eq, Show)
opt_FoldrBuildOn = lookUp SLIT("-ffoldr-build-on")
opt_LiberateCaseThreshold = lookup_def_int "-fliberate-case-threshold" (10::Int)
opt_StgDoLetNoEscapes = lookUp SLIT("-flet-no-escape")
-opt_UnfoldCasms = lookUp SLIT("-funfold-casms-in-hi-file")
+opt_UnfoldCasms = lookUp SLIT("-funfold-casms-in-hi-file")
opt_UsageSPOn = lookUp SLIT("-fusagesp-on")
opt_UnboxStrictFields = lookUp SLIT("-funbox-strict-fields")
opt_KeepStgTypes = lookUp SLIT("-fkeep-stg-types")
-- Simplifier switches
-opt_SimplNoPreInlining = lookUp SLIT("-fno-pre-inlining")
+opt_SimplNoPreInlining = lookUp SLIT("-fno-pre-inlining")
-- NoPreInlining is there just to see how bad things
-- get if you don't do it!
-opt_SimplDoEtaReduction = lookUp SLIT("-fdo-eta-reduction")
-opt_SimplDoLambdaEtaExpansion = lookUp SLIT("-fdo-lambda-eta-expansion")
-opt_SimplCaseMerge = lookUp SLIT("-fcase-merge")
-opt_SimplExcessPrecision = lookUp SLIT("-fexcess-precision")
+opt_SimplDoEtaReduction = lookUp SLIT("-fdo-eta-reduction")
+opt_SimplDoLambdaEtaExpansion = lookUp SLIT("-fdo-lambda-eta-expansion")
+opt_SimplCaseMerge = lookUp SLIT("-fcase-merge")
+opt_SimplExcessPrecision = lookUp SLIT("-fexcess-precision")
-- Unfolding control
opt_UF_HiFileThreshold = lookup_def_int "-funfolding-interface-threshold" (45::Int)
opt_UF_CheapOp = ( 1 :: Int) -- Only one instruction; and the args are charged for
opt_UF_DearOp = ( 4 :: Int)
-opt_NoPruneDecls = lookUp SLIT("-fno-prune-decls")
-opt_NoPruneTyDecls = lookUp SLIT("-fno-prune-tydecls")
-opt_Static = lookUp SLIT("-static")
-opt_Unregisterised = lookUp SLIT("-funregisterised")
+opt_NoPruneDecls = lookUp SLIT("-fno-prune-decls")
+opt_NoPruneTyDecls = lookUp SLIT("-fno-prune-tydecls")
+opt_Static = lookUp SLIT("-static")
+opt_Unregisterised = lookUp SLIT("-funregisterised")
\end{code}
%************************************************************************
>> return stub_names
HscJava -> outputJava dflags filenm mod_name tycons core_binds
>> return stub_names
+#ifdef ILX
+ HscILX -> outputIlx mod_name tycons stg_binds
+#endif
}
doOutput :: String -> (Handle -> IO ()) -> IO ()
%************************************************************************
%* *
+\subsection{Ilx}
+%* *
+%************************************************************************
+
+\begin{code}
+#ifdef ILX
+outputIlx mod tycons stg_binds
+ = doOutput (\ f -> printForC f pp_ilx)
+ where
+ pp_ilx = ilxGen mod tycons stg_binds
+#endif
+\end{code}
+
+
+%************************************************************************
+%* *
\subsection{Foreign import/export}
%* *
%************************************************************************
-----------------------------------------------------------------------------
--- $Id: DriverPhases.hs,v 1.4 2001/01/03 11:13:43 simonmar Exp $
+-- $Id: DriverPhases.hs,v 1.5 2001/02/27 12:36:37 rrt Exp $
--
-- GHC Driver
--
| Hsc
| Cc
| HCc -- Haskellised C (as opposed to vanilla C) compilation
+#ifdef ILX
+ | Ilx -- .NET extended IL
+#endif
| Mangle -- assembly mangling, now done by a separate script.
| SplitMangle -- after mangler if splitting
| SplitAs
phaseInputExt Hsc = "hspp"
phaseInputExt HCc = "hc"
phaseInputExt Cc = "c"
+#ifdef ILX
+phaseInputExt Ilx = "ilx"
+#endif
phaseInputExt Mangle = "raw_s"
phaseInputExt SplitMangle = "split_s" -- not really generated
phaseInputExt As = "s"
-----------------------------------------------------------------------------
--- $Id: DriverPipeline.hs,v 1.51 2001/02/26 15:50:21 simonmar Exp $
+-- $Id: DriverPipeline.hs,v 1.52 2001/02/27 12:36:37 rrt Exp $
--
-- GHC Driver
--
HscJava | split -> not_valid
| otherwise -> error "not implemented: compiling via Java"
+#ifdef ILX
+ HscILX | split -> not_valid
+ | otherwise -> [ Unlit, Cpp, Hsc ]
+#endif
| cish = [ Cc, As ]
HscAsm -> newTempName (phaseInputExt As)
HscC -> newTempName (phaseInputExt HCc)
HscJava -> newTempName "java" -- ToDo
+#ifdef ILX
+ HscILX -> newTempName (phaseInputExt Ilx)
+#endif
HscInterpreted -> return (error "no output file")
-- run the compiler
{-# OPTIONS -fno-warn-incomplete-patterns #-}
-----------------------------------------------------------------------------
--- $Id: Main.hs,v 1.54 2001/02/20 11:04:42 simonmar Exp $
+-- $Id: Main.hs,v 1.55 2001/02/27 12:36:37 rrt Exp $
--
-- GHC Driver program
--
-- new mkdependHS doesn't support all the options that the old one did (-X et al.)
-- time commands when run with -v
-- split marker
--- mkDLL
-- java generation
-- user ways
-- Win32 support: proper signal handling