Commit 589b7946 authored by simonm's avatar simonm
Browse files

[project @ 1999-05-13 17:30:50 by simonm]

Support for "unregisterised" builds.  An unregisterised build doesn't
use the assembly mangler, doesn't do tail jumping (uses the
mini-interpreter), and doesn't use global register variables.

Plenty of cleanups and bugfixes in the process.

Add way 'u' to GhcLibWays to get unregisterised libs & RTS.

[ note: not *quite* working fully yet... there's still a bug or two
  lurking ]
parent 8997af62
# -----------------------------------------------------------------------------
# $Id: Makefile,v 1.55 1999/05/11 16:37:29 keithw Exp $
# $Id: Makefile,v 1.56 1999/05/13 17:30:50 simonm Exp $
TOP = ..
include $(TOP)/mk/boilerplate.mk
......@@ -185,6 +185,9 @@ parser/U_qid_HC_OPTS = -fvia-C '-\#include"hspincl.h"'
parser/U_tree_HC_OPTS = -H12m -fvia-C '-\#include"hspincl.h"'
parser/U_ttype_HC_OPTS = -fvia-C '-\#include"hspincl.h"'
# Avoids Bug in 3.02, it seems
usageSP/UsageSPInf_HC_OPTS = -Onot
prelude/PrimOp_HC_OPTS = -H12m -K3m
reader/Lex_HC_OPTS = -K2m -H16m -fvia-C
......
%
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
% $Id: AbsCSyn.lhs,v 1.22 1999/04/26 16:06:27 simonm Exp $
% $Id: AbsCSyn.lhs,v 1.23 1999/05/13 17:30:52 simonm Exp $
%
\section[AbstractC]{Abstract C: the last stop before machine code}
......@@ -92,9 +92,9 @@ stored in a mixed type location.)
-- (for the benefit of the native code generators)
-- Equivalent to CJump in C land
| CReturn -- This used to be RetVecRegRel
CAddrMode -- Any base address mode
ReturnInfo -- How to get the return address from the base address
| CReturn -- Perform a return
CAddrMode -- Address of a RET_<blah> info table
ReturnInfo -- Whether it's a direct or vectored return
| CSwitch !CAddrMode
[(Literal, AbstractC)] -- alternatives
......
%
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
% $Id: CLabel.lhs,v 1.26 1999/05/11 16:44:04 keithw Exp $
% $Id: CLabel.lhs,v 1.27 1999/05/13 17:30:52 simonm Exp $
%
\section[CLabel]{@CLabel@: Information to make C Labels}
......@@ -35,7 +35,7 @@ module CLabel (
mkAsmTempLabel,
mkErrorStdEntryLabel,
mkUpdEntryLabel,
mkUpdInfoLabel,
mkCAFBlackHoleInfoTableLabel,
mkSECAFBlackHoleInfoTableLabel,
mkRtsPrimOpLabel,
......@@ -45,7 +45,7 @@ module CLabel (
mkCC_Label, mkCCS_Label,
needsCDecl, isReadOnly, isAsmTemp, externallyVisibleCLabel,
needsCDecl, isAsmTemp, externallyVisibleCLabel,
CLabelType(..), labelType, labelDynamic,
......@@ -156,7 +156,7 @@ data RtsLabelInfo
| RtsBlackHoleInfoTbl FAST_STRING -- black hole with info table name
| RtsUpdEntry
| RtsUpdInfo
| RtsSelectorInfoTbl Bool{-updatable-} Int{-offset-} -- Selector thunks
| RtsSelectorEntry Bool{-updatable-} Int{-offset-}
......@@ -210,7 +210,7 @@ mkAsmTempLabel = AsmTempLabel
-- Some fixed runtime system labels
mkErrorStdEntryLabel = RtsLabel RtsShouldNeverHappenCode
mkUpdEntryLabel = RtsLabel RtsUpdEntry
mkUpdInfoLabel = RtsLabel RtsUpdInfo
mkCAFBlackHoleInfoTableLabel = RtsLabel (RtsBlackHoleInfoTbl SLIT("CAF_BLACKHOLE_info"))
mkSECAFBlackHoleInfoTableLabel = if opt_DoTickyProfiling then
RtsLabel (RtsBlackHoleInfoTbl SLIT("SE_CAF_BLACKHOLE_info"))
......@@ -232,7 +232,6 @@ mkCCS_Label ccs = CCS_Label ccs
\begin{code}
needsCDecl :: CLabel -> Bool -- False <=> it's pre-declared; don't bother
isReadOnly :: CLabel -> Bool -- lives in C "text space"
isAsmTemp :: CLabel -> Bool -- is a local temporary for native code generation
externallyVisibleCLabel :: CLabel -> Bool -- not C "static"
\end{code}
......@@ -262,21 +261,6 @@ needsCDecl (CC_Label _) = False
needsCDecl (CCS_Label _) = False
\end{code}
Whether the labelled thing can be put in C "text space":
\begin{code}
isReadOnly (IdLabel _ InfoTbl) = True -- info-tables: yes
isReadOnly (IdLabel _ other) = False -- others: pessimistically, no
isReadOnly (DataConLabel _ _) = True -- and so on, for other
isReadOnly (TyConLabel _) = True
isReadOnly (CaseLabel _ _) = True
isReadOnly (AsmTempLabel _) = True
isReadOnly (RtsLabel _) = True
isReadOnly (CC_Label _) = True
isReadOnly (CCS_Label _) = True
\end{code}
Whether the label is an assembler temporary:
\begin{code}
......@@ -307,6 +291,7 @@ labelType :: CLabel -> CLabelType
labelType (RtsLabel (RtsBlackHoleInfoTbl _)) = InfoTblType
labelType (RtsLabel (RtsSelectorInfoTbl _ _)) = InfoTblType
labelType (RtsLabel (RtsApInfoTbl _ _)) = InfoTblType
labelType (RtsLabel RtsUpdInfo) = InfoTblType
labelType (CaseLabel _ CaseReturnInfo) = InfoTblType
labelType (CaseLabel _ CaseReturnPt) = CodeType
labelType (CaseLabel _ CaseVecTbl) = VecTblType
......@@ -418,7 +403,7 @@ pprCLbl (CaseLabel u CaseBitmap)
pprCLbl (RtsLabel RtsShouldNeverHappenCode) = ptext SLIT("stg_error_entry")
pprCLbl (RtsLabel RtsUpdEntry) = ptext SLIT("Upd_frame_entry")
pprCLbl (RtsLabel RtsUpdInfo) = ptext SLIT("Upd_frame_info")
pprCLbl (RtsLabel (RtsBlackHoleInfoTbl info)) = ptext info
......
......@@ -28,7 +28,7 @@ import AbsCUtils ( getAmodeRep, nonemptyAbsC,
import Constants ( mIN_UPD_SIZE )
import CallConv ( CallConv, callConvAttribute, cCallConv )
import CLabel ( externallyVisibleCLabel, mkErrorStdEntryLabel,
isReadOnly, needsCDecl, pprCLabel,
needsCDecl, pprCLabel,
mkReturnInfoLabel, mkReturnPtLabel, mkClosureTblLabel,
mkStaticClosureLabel,
CLabel, CLabelType(..), labelType, labelDynamic
......@@ -143,7 +143,8 @@ pprAbsC (CReturn am return_info) c
(hcat [text jmp_lit, target, pp_paren_semi ])
where
target = case return_info of
DirectReturn -> hcat [char '(', pprAmode am, rparen]
DirectReturn -> hcat [ptext SLIT("ENTRY_CODE"), lparen,
pprAmode am, rparen]
DynamicVectoredReturn am' -> mk_vector (pprAmode am')
StaticVectoredReturn n -> mk_vector (int n) -- Always positive
mk_vector x = hcat [text "RET_VEC", char '(', pprAmode am, comma,
......@@ -498,32 +499,24 @@ pprAbsC stmt@(CRetDirect uniq code srt liveness) _
LvLarge _ -> SLIT("RET_BIG")
pprAbsC stmt@(CRetVector label amodes srt liveness) _
= vcat [
pp_vector,
= case (pprTempAndExternDecls stmt) of { (_, pp_exts) ->
vcat [
pp_exts,
hcat [
ptext SLIT(" }"), comma, ptext SLIT("\n VEC_INFO_TABLE"),
lparen,
pp_liveness liveness, comma, -- bitmap liveness mask
pp_srt_info srt, -- SRT
ptext type_str, -- or big, depending on the size
-- of the liveness mask.
rparen
],
text "};"
ptext SLIT("VEC_INFO_") <> int size,
lparen,
pprCLabel label, comma,
pp_liveness liveness, comma, -- bitmap liveness mask
pp_srt_info srt, -- SRT
ptext type_str, comma,
ppLocalness label, comma
],
nest 2 (sep (punctuate comma (map ppr_item amodes))),
text ");"
]
}
where
pp_vector =
case (pprTempAndExternDecls stmt) of { (_, pp_exts) ->
vcat [
pp_exts,
hcat [ppLocalness label,
ptext SLIT(" vec_info_"), int size, space,
pprCLabel label, text "= { {"
],
nest 2 (sep (punctuate comma (map ppr_item (reverse amodes))))
] }
ppr_item item = (<>) (text "(F_) ") (ppr_amode item)
size = length amodes
......@@ -538,14 +531,9 @@ pprAbsC (CCostCentreStackDecl ccs) _ = pprCostCentreStackDecl ccs
\begin{code}
ppLocalness label
= (<>) static const
where
static = if (externallyVisibleCLabel label)
= if (externallyVisibleCLabel label)
then empty
else ptext SLIT("static ")
const = if not (isReadOnly label)
then empty
else ptext SLIT("const")
-- Horrible macros for declaring the types and locality of labels (see
-- StgMacros.h).
......@@ -559,10 +547,7 @@ ppLocalnessMacro include_dyn_prefix clabel =
CodeType -> ptext SLIT("F_")
InfoTblType -> ptext SLIT("I_")
ClosureTblType -> ptext SLIT("CP_")
DataType -> ptext SLIT("D_") <>
if isReadOnly clabel
then ptext SLIT("RO_")
else empty
DataType -> ptext SLIT("D_")
]
where
is_visible = externallyVisibleCLabel clabel
......
%
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
% $Id: CgCase.lhs,v 1.27 1999/04/27 12:34:52 simonm Exp $
% $Id: CgCase.lhs,v 1.28 1999/05/13 17:30:55 simonm Exp $
%
%********************************************************
%* *
......@@ -470,7 +470,7 @@ cgEvalAlts cc_slot bndr srt alts
if is_alg && isUnboxedTupleTyCon spec_tycon then
case alts of
[alt] -> let lbl = mkReturnInfoLabel uniq in
cgUnboxedTupleAlt lbl cc_slot True alt
cgUnboxedTupleAlt uniq cc_slot True alt
`thenFC` \ abs_c ->
getSRTLabel `thenFC` \srt_label ->
absC (CRetDirect uniq abs_c (srt_label, srt)
......@@ -515,7 +515,7 @@ cgEvalAlts cc_slot bndr srt alts
(srt_label,srt) liveness_mask) `thenC`
-- Return an amode for the block
returnFC (CaseAlts (CLbl (mkReturnPtLabel uniq) RetRep) Nothing)
returnFC (CaseAlts (CLbl (mkReturnInfoLabel uniq) RetRep) Nothing)
\end{code}
......@@ -654,7 +654,7 @@ cgAlgAlt gc_flag uniq cc_slot must_label_branch
lbl = mkAltLabel uniq tag
cgUnboxedTupleAlt
:: CLabel -- label of the alternative
:: Unique -- unique for label of the alternative
-> Maybe VirtualSpOffset -- Restore cost centre
-> Bool -- ctxt switch
-> (DataCon, [Id], [Bool], StgExpr) -- alternative
......@@ -978,7 +978,7 @@ possibleHeapCheck
-> Bool -- True <=> algebraic case
-> [MagicId] -- live registers
-> [(VirtualSpOffset,Int)] -- stack slots to tag
-> Maybe CLabel -- return address
-> Maybe Unique -- return address unique
-> Code -- continuation
-> Code
......
%
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
% $Id: CgClosure.lhs,v 1.29 1999/05/11 16:44:02 keithw Exp $
% $Id: CgClosure.lhs,v 1.30 1999/05/13 17:30:56 simonm Exp $
%
\section[CgClosure]{Code generation for closures}
......@@ -41,7 +41,7 @@ import CgUsages ( setRealAndVirtualSp, getVirtSp,
getSpRelOffset, getHpRelOffset
)
import CLabel ( CLabel, mkClosureLabel, mkFastEntryLabel,
mkRednCountsLabel, mkStdEntryLabel
mkRednCountsLabel, mkInfoTableLabel
)
import ClosureInfo -- lots and lots of stuff
import CmdLineOpts ( opt_GranMacros, opt_SccProfilingOn, opt_DoTickyProfiling )
......@@ -401,7 +401,7 @@ closureCodeBody binder_info closure_info cc all_args body
enterCostCentreCode closure_info cc IsFunction False `thenC`
-- Do the business
funWrapper closure_info arg_regs stk_tags slow_label (cgExpr body)
funWrapper closure_info arg_regs stk_tags info_label (cgExpr body)
in
-- Make a labelled code-block for the slow and fast entry code
forkAbsC (if slow_code_needed then slow_entry_code else absC AbsCNop)
......@@ -429,7 +429,7 @@ closureCodeBody binder_info closure_info cc all_args body
-- Manufacture labels
name = closureName closure_info
fast_label = mkFastEntryLabel name stg_arity
slow_label = mkStdEntryLabel name
info_label = mkInfoTableLabel name
\end{code}
For lexically scoped profiling we have to load the cost centre from
......@@ -572,10 +572,10 @@ thunkWrapper closure_info label thunk_code
funWrapper :: ClosureInfo -- Closure whose code body this is
-> [MagicId] -- List of argument registers (if any)
-> [(VirtualSpOffset,Int)] -- tagged stack slots
-> CLabel -- slow entry point for heap check ret.
-> CLabel -- info table for heap check ret.
-> Code -- Body of function being compiled
-> Code
funWrapper closure_info arg_regs stk_tags slow_label fun_body
funWrapper closure_info arg_regs stk_tags info_label fun_body
= -- Stack overflow check
nodeMustPointToIt (closureLFInfo closure_info) `thenFC` \ node_points ->
let
......@@ -587,7 +587,7 @@ funWrapper closure_info arg_regs stk_tags slow_label fun_body
else absC AbsCNop) `thenC`
-- heap and/or stack checks
fastEntryChecks arg_regs stk_tags slow_label node_points (
fastEntryChecks arg_regs stk_tags info_label node_points (
-- Finally, do the business
fun_body
......
%
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
% $Id: CgHeapery.lhs,v 1.15 1999/03/08 17:05:41 simonm Exp $
% $Id: CgHeapery.lhs,v 1.16 1999/05/13 17:30:56 simonm Exp $
%
\section[CgHeapery]{Heap management functions}
......@@ -31,6 +31,7 @@ import ClosureInfo ( closureSize, closureGoodStuffSize,
closureSMRep
)
import PrimRep ( PrimRep(..), isFollowableRep )
import Unique ( Unique )
import CmdLineOpts ( opt_SccProfilingOn )
import GlaExts
import Outputable
......@@ -226,7 +227,7 @@ altHeapCheck
-> [MagicId] -- live registers
-> [(VirtualSpOffset,Int)] -- stack slots to tag
-> AbstractC
-> Maybe CLabel -- ret address if not on top of stack.
-> Maybe Unique -- uniq of ret address (possibly)
-> Code
-> Code
......@@ -251,6 +252,12 @@ altHeapCheck is_fun regs tags fail_code (Just ret_addr) code
checking_code tag_assts =
case non_void_regs of
{- no: there might be stuff on top of the retn. addr. on the stack.
[{-no regs-}] ->
CCheck HP_CHK_NOREGS
[mkIntCLit words_required]
tag_assts
-}
-- this will cover all cases for x86
[VanillaReg rep ILIT(1)]
......@@ -258,14 +265,14 @@ altHeapCheck is_fun regs tags fail_code (Just ret_addr) code
CCheck HP_CHK_UT_ALT
[mkIntCLit words_required, mkIntCLit 1, mkIntCLit 0,
CReg (VanillaReg RetRep ILIT(2)),
CLbl ret_addr RetRep]
CLbl (mkReturnInfoLabel ret_addr) RetRep]
tag_assts
| otherwise ->
CCheck HP_CHK_UT_ALT
[mkIntCLit words_required, mkIntCLit 0, mkIntCLit 1,
CReg (VanillaReg RetRep ILIT(2)),
CLbl ret_addr RetRep]
CLbl (mkReturnInfoLabel ret_addr) RetRep]
tag_assts
several_regs ->
......@@ -274,7 +281,10 @@ altHeapCheck is_fun regs tags fail_code (Just ret_addr) code
CCheck HP_CHK_GEN
[mkIntCLit words_required,
mkIntCLit (IBOX(word2Int# liveness)),
CLbl ret_addr RetRep]
-- HP_CHK_GEN needs a direct return address,
-- not an info table (might be different if
-- we're not assembly-mangling/tail-jumping etc.)
CLbl (mkReturnPtLabel ret_addr) RetRep]
tag_assts
-- normal algebraic and primitive case alternatives:
......
%
% (c) The GRASP/AQUA Project, Glasgow University, 1993-1998
%
% $Id: CgLetNoEscape.lhs,v 1.12 1998/12/18 17:40:51 simonpj Exp $
% $Id: CgLetNoEscape.lhs,v 1.13 1999/05/13 17:30:57 simonm Exp $
%
%********************************************************
%* *
......@@ -30,12 +30,13 @@ import CgRetConv ( assignRegs )
import CgStackery ( mkTaggedVirtStkOffsets,
allocStackTop, deAllocStackTop, freeStackSlots )
import CgUsages ( setRealAndVirtualSp, getRealSp, getSpRelOffset )
import CLabel ( mkReturnPtLabel )
import CLabel ( mkReturnInfoLabel )
import ClosureInfo ( mkLFLetNoEscape )
import CostCentre ( CostCentreStack )
import Id ( idPrimRep, Id )
import Var ( idUnique )
import PrimRep ( PrimRep(..), retPrimRepSize )
import Unique ( Unique )
import BasicTypes ( RecFlag(..) )
\end{code}
......@@ -160,7 +161,6 @@ cgLetNoEscapeClosure
arity = length args
lf_info = mkLFLetNoEscape arity
uniq = idUnique binder
lbl = mkReturnPtLabel uniq
in
-- saveVolatileVarsAndRegs done earlier in cgExpr.
......@@ -173,7 +173,7 @@ cgLetNoEscapeClosure
(deAllocStackTop retPrimRepSize `thenFC` \_ ->
buildContLivenessMask uniq `thenFC` \ liveness ->
forkAbsC (cgLetNoEscapeBody binder cc args body lbl)
forkAbsC (cgLetNoEscapeBody binder cc args body uniq)
`thenFC` \ code ->
getSRTLabel `thenFC` \ srt_label ->
absC (CRetDirect uniq code (srt_label,srt) liveness)
......@@ -188,10 +188,10 @@ cgLetNoEscapeBody :: Id
-> CostCentreStack
-> [Id] -- Args
-> StgExpr -- Body
-> CLabel -- Entry label
-> Unique -- Unique for entry label
-> Code
cgLetNoEscapeBody binder cc all_args body lbl
cgLetNoEscapeBody binder cc all_args body uniq
=
-- this is where the stack frame lives:
getRealSp `thenFC` \sp ->
......@@ -221,12 +221,13 @@ cgLetNoEscapeBody binder cc all_args body lbl
-- fill in the frame header only if we fail a heap check:
-- otherwise it isn't needed.
getSpRelOffset sp `thenFC` \sp_rel ->
let frame_hdr_asst = CAssign (CVal sp_rel RetRep) (CLbl lbl RetRep)
let lbl = mkReturnInfoLabel uniq
frame_hdr_asst = CAssign (CVal sp_rel RetRep) (CLbl lbl RetRep)
in
-- Do heap check [ToDo: omit for non-recursive case by recording in
-- in envt and absorbing at call site]
altHeapCheck False arg_regs stk_tags frame_hdr_asst (Just lbl) (
altHeapCheck False arg_regs stk_tags frame_hdr_asst (Just uniq) (
cgExpr body
)
......
%
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
% $Id: CgMonad.lhs,v 1.18 1999/03/02 14:34:38 sof Exp $
% $Id: CgMonad.lhs,v 1.19 1999/05/13 17:30:57 simonm Exp $
%
\section[CgMonad]{The code generation monad}
......@@ -49,7 +49,7 @@ import {-# SOURCE #-} CgUsages ( getSpRelOffset )
import AbsCSyn
import AbsCUtils ( mkAbsCStmts )
import CmdLineOpts ( opt_SccProfilingOn, opt_DoTickyProfiling )
import CLabel ( CLabel, mkUpdEntryLabel )
import CLabel ( CLabel, mkUpdInfoLabel )
import Module ( Module )
import DataCon ( ConTag )
import Id ( Id )
......@@ -163,13 +163,19 @@ type JoinDetails
-- that Sp is pointing to the top word of the return address. This
-- seems unclean but there you go.
-- sequelToAmode returns an amode which refers to an info table. The info
-- table will always be of the RET(_VEC)?_(BIG|SMALL) kind. We're careful
-- not to handle real code pointers, just in case we're compiling for
-- an unregisterised/untailcallish architecture, where info pointers and
-- code pointers aren't the same.
sequelToAmode :: Sequel -> FCode CAddrMode
sequelToAmode (OnStack virt_sp_offset)
= getSpRelOffset virt_sp_offset `thenFC` \ sp_rel ->
returnFC (CVal sp_rel RetRep)
sequelToAmode UpdateCode = returnFC (CLbl mkUpdEntryLabel CodePtrRep)
sequelToAmode UpdateCode = returnFC (CLbl mkUpdInfoLabel RetRep)
sequelToAmode (CaseAlts amode _) = returnFC amode
sequelToAmode (SeqFrame _ _) = panic "sequelToAmode: SeqFrame"
......
%
% (c) The GRASP Project, Glasgow University, 1992-1998
%
% $Id: CgRetConv.lhs,v 1.18 1999/01/22 10:45:21 simonm Exp $
% $Id: CgRetConv.lhs,v 1.19 1999/05/13 17:30:58 simonm Exp $
%
\section[CgRetConv]{Return conventions for the code generator}
......@@ -21,9 +21,10 @@ module CgRetConv (
import AbsCSyn -- quite a few things
import Constants ( mAX_FAMILY_SIZE_FOR_VEC_RETURNS,
mAX_Vanilla_REG, mAX_Float_REG,
mAX_Double_REG, mAX_Real_Double_REG,
mAX_Real_Vanilla_REG, mAX_Real_Float_REG,
mAX_Long_REG, mAX_Real_Long_REG
mAX_Double_REG, mAX_Long_REG
)
import CmdLineOpts ( opt_UseVanillaRegs, opt_UseFloatRegs,
opt_UseDoubleRegs, opt_UseLongRegs
)
import Maybes ( catMaybes )
import DataCon ( dataConRawArgTys, DataCon )
......@@ -182,10 +183,10 @@ that are guaranteed to map to machine registers.
\begin{code}
vanillaRegNos, floatRegNos, doubleRegNos, longRegNos :: [Int]
vanillaRegNos = regList mAX_Real_Vanilla_REG
floatRegNos = regList mAX_Real_Float_REG
doubleRegNos = regList mAX_Real_Double_REG
longRegNos = regList mAX_Real_Long_REG
vanillaRegNos = regList opt_UseVanillaRegs
floatRegNos = regList opt_UseFloatRegs
doubleRegNos = regList opt_UseDoubleRegs
longRegNos = regList opt_UseLongRegs
allVanillaRegNos, allFloatRegNos, allDoubleRegNos, allLongRegNos :: [Int]
allVanillaRegNos = regList mAX_Vanilla_REG
......
%
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
% $Id: CgTailCall.lhs,v 1.18 1999/01/21 10:31:57 simonm Exp $
% $Id: CgTailCall.lhs,v 1.19 1999/05/13 17:30:58 simonm Exp $
%
%********************************************************
%* *
......@@ -38,7 +38,7 @@ import CgRetConv ( dataReturnConvPrim,
import CgStackery ( adjustRealSp, mkTaggedStkAmodes, adjustStackHW )
import CgUsages ( getSpRelOffset )
import CgUpdate ( pushSeqFrame )
import CLabel ( mkUpdEntryLabel, mkRtsPrimOpLabel )
import CLabel ( mkUpdInfoLabel, mkRtsPrimOpLabel )
import ClosureInfo ( nodeMustPointToIt,
getEntryConvention, EntryConvention(..),
LambdaFormInfo
......@@ -168,7 +168,7 @@ mkStaticAlgReturnCode con sequel
UpdateCode -> -- Ha! We can go direct to the update code,
-- (making sure to jump to the *correct* update
-- code.)
absC (CReturn (CLbl mkUpdEntryLabel CodePtrRep)
absC (CReturn (CLbl mkUpdInfoLabel CodePtrRep)
return_info)
CaseAlts _ (Just (alts, _)) -> -- Ho! We know the constructor so
......
......@@ -14,21 +14,15 @@ module CmdLineOpts (
intSwitchSet,
switchIsOn,
opt_AllStrict,
opt_AllowOverlappingInstances,
opt_AllowUndecidableInstances,
opt_AutoSccsOnAllToplevs,
opt_AutoSccsOnExportedToplevs,
opt_AutoSccsOnIndividualCafs,
opt_AutoSccsOnDicts,
opt_CompilingPrelude,
-- debugging opts
opt_D_dump_absC,
opt_D_dump_asm,
opt_D_dump_cpranal,
opt_D_dump_deriv,
opt_D_dump_ds,
opt_D_dump_flatC,
opt_D_dump_inlinings,
opt_D_dump_foreign,
opt_D_dump_inlinings,
opt_D_dump_occur_anal,
opt_D_dump_rdr,
opt_D_dump_realC,
......@@ -38,84 +32,104 @@ module CmdLineOpts (
opt_D_dump_spec,
opt_D_dump_stg,
opt_D_dump_stranal,
opt_D_dump_cpranal,
opt_D_dump_worker_wrapper,
opt_D_dump_tc,
opt_D_dump_usagesp,
opt_D_dump_worker_wrapper,
opt_D_show_passes,
opt_D_show_rn_trace,
opt_D_show_rn_imports,
opt_D_show_rn_stats,
opt_D_show_rn_trace,
opt_D_simplifier_stats,
opt_D_source_stats,
opt_D_verbose_core2core,
opt_D_verbose_stg2stg,
opt_DictsStrict,
opt_DoCoreLinting,
opt_DoUSPLinting,
opt_DoStgLinting,
opt_DoSemiTagging,
opt_DoEtaReduction,
opt_DoUSPLinting,
opt_PprStyle_Debug,
opt_PprStyle_NoPrags,
opt_PprUserLength,
-- warning opts
opt_WarnDuplicateExports,
opt_WarnHiShadows,
opt_WarnIncompletePatterns,
opt_WarnMissingMethods,
opt_WarnMissingSigs,
opt_WarnNameShadowing,
opt_WarnOverlappingPatterns,
opt_WarnSimplePatterns,
opt_WarnTypeDefaults,
opt_WarnUnusedBinds,
opt_WarnUnusedImports,
opt_WarnUnusedMatches,
-- profiling opts
opt_AutoSccsOnAllToplevs,
opt_AutoSccsOnExportedToplevs,
opt_AutoSccsOnIndividualCafs,
opt_AutoSccsOnDicts,
opt_SccGroup,
opt_SccProfilingOn,
opt_DoTickyProfiling,
opt_EmitCExternDecls,
opt_EnsureSplittableC,
-- language opts
opt_AllStrict,
opt_DictsStrict,
opt_MaxContextReductionDepth,
opt_AllowOverlappingInstances,
opt_AllowUndecidableInstances,
opt_GlasgowExts,
opt_IrrefutableTuples,
opt_NumbersStrict,
opt_Parallel,
-- optimisation opts
opt_DoEtaReduction,