diff options
author | Simon Marlow <marlowsd@gmail.com> | 2011-08-22 13:56:17 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2011-08-25 11:12:30 +0100 |
commit | 5b167f5edad7d3268de20452da7af05c38972f7c (patch) | |
tree | 36a14e64b510ede91e4e334f3e44d865321adcde /compiler/codeGen/CgTicky.hs | |
parent | 3108accd634a521b25471df19f063c2061d6d3ee (diff) | |
download | haskell-5b167f5edad7d3268de20452da7af05c38972f7c.tar.gz |
Snapshot of codegen refactoring to share with simonpj
Diffstat (limited to 'compiler/codeGen/CgTicky.hs')
-rw-r--r-- | compiler/codeGen/CgTicky.hs | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/compiler/codeGen/CgTicky.hs b/compiler/codeGen/CgTicky.hs index 629754fcb5..daeba9274b 100644 --- a/compiler/codeGen/CgTicky.hs +++ b/compiler/codeGen/CgTicky.hs @@ -85,8 +85,8 @@ emitTickyCounter :: ClosureInfo -> [Id] -> Int -> Code emitTickyCounter cl_info args on_stk = ifTicky $ do { mod_name <- getModuleName - ; fun_descr_lit <- mkStringCLit (fun_descr mod_name) - ; arg_descr_lit <- mkStringCLit arg_descr + ; fun_descr_lit <- newStringCLit (fun_descr mod_name) + ; arg_descr_lit <- newStringCLit arg_descr ; emitDataLits ticky_ctr_label -- Must match layout of StgEntCounter -- krc: note that all the fields are I32 now; some were I16 before, -- but the code generator wasn't handling that properly and it led to chaos, @@ -246,18 +246,16 @@ tickyDynAlloc :: ClosureInfo -> Code -- Called when doing a dynamic heap allocation tickyDynAlloc cl_info = ifTicky $ - case smRepClosureType (closureSMRep cl_info) of - Just Constr -> tick_alloc_con - Just ConstrNoCaf -> tick_alloc_con - Just Fun -> tick_alloc_fun - Just Thunk -> tick_alloc_thk - Just ThunkSelector -> tick_alloc_thk + case closureLFInfo cl_info of + LFCon {} -> tick_alloc_con + LFReEntrant {} -> tick_alloc_fun + LFThunk {} -> tick_alloc_thk -- black hole - Nothing -> return () + _ -> return () where -- will be needed when we fill in stubs - _cl_size = closureSize cl_info - _slop_size = slopSize cl_info + _cl_size = closureSize cl_info +-- _slop_size = slopSize cl_info tick_alloc_thk | closureUpdReqd cl_info = tick_alloc_up_thk |