diff options
author | Simon Marlow <marlowsd@gmail.com> | 2011-08-24 10:38:58 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2011-08-25 11:12:33 +0100 |
commit | 3a179c20d180ef8302dfccd3470b668c2b2cdeef (patch) | |
tree | c0f5baef87d0108ae295a538ec17da3e731684dc /compiler/codeGen/StgCmmBind.hs | |
parent | 4a86a0bff7e8fb3e87708f29adf87bf566632861 (diff) | |
download | haskell-3a179c20d180ef8302dfccd3470b668c2b2cdeef.tar.gz |
Refactoring: reduce usage of mkConInfo, with a view to killing it
Diffstat (limited to 'compiler/codeGen/StgCmmBind.hs')
-rw-r--r-- | compiler/codeGen/StgCmmBind.hs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/compiler/codeGen/StgCmmBind.hs b/compiler/codeGen/StgCmmBind.hs index 3823fa15b0..281ad31fa2 100644 --- a/compiler/codeGen/StgCmmBind.hs +++ b/compiler/codeGen/StgCmmBind.hs @@ -379,8 +379,11 @@ closureCodeBody :: Bool -- whether this is a top-level binding closureCodeBody top_lvl bndr cl_info cc args arity body fv_details | length args == 0 -- No args i.e. thunk - = emitClosureProcAndInfoTable top_lvl bndr cl_info [] $ + = emitClosureProcAndInfoTable top_lvl bndr lf_info info_tbl [] $ \(_, node, _) -> thunkCode cl_info fv_details cc node arity body + where + lf_info = closureLFInfo cl_info + info_tbl = mkCmmInfo cl_info closureCodeBody top_lvl bndr cl_info cc args arity body fv_details = ASSERT( length args > 0 ) @@ -392,8 +395,12 @@ closureCodeBody top_lvl bndr cl_info cc args arity body fv_details ; emitTickyCounter cl_info (map stripNV args) ; setTickyCtrLabel ticky_ctr_lbl $ do + ; let + lf_info = closureLFInfo cl_info + info_tbl = mkCmmInfo cl_info + -- Emit the main entry code - ; emitClosureProcAndInfoTable top_lvl bndr cl_info args $ + ; emitClosureProcAndInfoTable top_lvl bndr lf_info info_tbl args $ \(offset, node, arg_regs) -> do -- Emit slow-entry code (for entering a closure through a PAP) { mkSlowEntryCode cl_info arg_regs |