% Code generation for tail calls.
\begin{code}
+{-# OPTIONS -w #-}
+-- The above warning supression flag is a temporary kludge.
+-- While working on this module you are encouraged to remove it and fix
+-- any warnings in the module. See
+-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
+-- for details
+
module CgTailCall (
cgTailCall, performTailCall,
performReturn, performPrimReturn,
; EndOfBlockInfo sp _ <- getEndOfBlockInfo
; this_pkg <- getThisPackage
- ; case (getCallMethod this_pkg fun_name lf_info (length arg_amodes)) of
+ ; case (getCallMethod fun_name lf_info (length arg_amodes)) of
-- Node must always point to things we enter
EnterIt -> do
-- No, enter the closure.
; enterClosure
; labelC is_constr
- ; stmtC (CmmJump (CmmLit (CmmLabel lbl)) [])
+ ; stmtC (CmmJump (entryCode $ CmmLit (CmmLabel lbl)) [])
}
{-
-- This is a scrutinee for a case expression