Commit 74ac5be0 authored by dterei's avatar dterei
Browse files

Tabs -> Spaces + formatting fixes

parent 974f4510
......@@ -5,12 +5,6 @@
\section[CgBindery]{Utility functions related to doing @CgBindings@}
\begin{code}
{-# OPTIONS -fno-warn-tabs #-}
-- The above warning supression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and
-- detab the module (please do the detabbing in a separate patch). See
-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
-- for details
module CgBindery (
CgBindings, CgIdInfo,
......@@ -64,7 +58,6 @@ import FastString
\end{code}
%************************************************************************
%* *
\subsection[Bindery-datatypes]{Data types}
......@@ -152,9 +145,7 @@ data StableLoc
| VoidLoc -- Used only for VoidRep variables. They never need to
-- be saved, so it makes sense to treat treat them as
-- having a stable location
\end{code}
\begin{code}
instance PlatformOutputable CgIdInfo where
pprPlatform platform (CgIdInfo id _ vol stb _ _)
-- TODO, pretty pring the tag info
......@@ -265,7 +256,7 @@ maybeLetNoEscape _ = Nothing
%* *
%************************************************************************
.There are three basic routines, for adding (@addBindC@), modifying
There are three basic routines, for adding (@addBindC@), modifying
(@modifyBindC@) and looking up (@getCgIdInfo@) bindings.
A @Id@ is bound to a @(VolatileLoc, StableLoc)@ triple.
......@@ -382,7 +373,6 @@ forget the volatile one.
\begin{code}
getVolatileRegs :: StgLiveVars -> FCode [GlobalReg]
getVolatileRegs vars = do
do { stuff <- mapFCs snaffle_it (varSetElems vars)
; returnFC $ catMaybes stuff }
......@@ -410,9 +400,7 @@ getVolatileRegs vars = do
}
nuke_vol_bind info = info { cg_vol = NoVolatileLoc }
\end{code}
\begin{code}
getArgAmode :: StgArg -> FCode (CgRep, CmmExpr)
getArgAmode (StgVarArg var)
= do { info <- getCgIdInfo var
......@@ -479,9 +467,7 @@ bindNewToReg name reg lf_info
= addBindC name info
where
info = mkCgIdInfo name (RegLoc reg) NoStableLoc lf_info
\end{code}
\begin{code}
rebindToStack :: Id -> VirtualSpOffset -> Code
rebindToStack name offset
= modifyBindC name replace_stable_fn
......@@ -553,9 +539,7 @@ dead_slots live_vars fbs ds ((v,i):bs)
where
size :: WordOff
size = cgRepSizeW (cg_rep i)
\end{code}
\begin{code}
getLiveStackSlots :: FCode [VirtualSpOffset]
-- Return the offsets of slots in stack containig live pointers
getLiveStackSlots
......@@ -563,9 +547,7 @@ getLiveStackSlots
; return [off | CgIdInfo { cg_stb = VirStkLoc off,
cg_rep = rep } <- varEnvElts binds,
isFollowableArg rep] }
\end{code}
\begin{code}
getLiveStackBindings :: FCode [(VirtualSpOffset, CgIdInfo)]
getLiveStackBindings
= do { binds <- getBinds
......@@ -575,3 +557,4 @@ getLiveStackBindings
cg_rep = rep} <- [bind],
isFollowableArg rep] }
\end{code}
This diff is collapsed.
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