diff options
author | Patrick Palka <patrick@parcs.ath.cx> | 2013-11-27 09:04:25 -0500 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2013-11-28 12:52:23 +0000 |
commit | e9b0d3686486b79537a5f9acdf6244afa81e7c78 (patch) | |
tree | 83534086ca226ac5622ec5e0abc4b44b46dc5a98 /compiler/cmm/CmmInfo.hs | |
parent | 4d1ea482885481073d2fee0ea0355848b9d853a1 (diff) | |
download | haskell-e9b0d3686486b79537a5f9acdf6244afa81e7c78.tar.gz |
Fix up shortcut for slow calls
Diffstat (limited to 'compiler/cmm/CmmInfo.hs')
-rw-r--r-- | compiler/cmm/CmmInfo.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/cmm/CmmInfo.hs b/compiler/cmm/CmmInfo.hs index 641f29b880..42c9e6ba53 100644 --- a/compiler/cmm/CmmInfo.hs +++ b/compiler/cmm/CmmInfo.hs @@ -496,16 +496,16 @@ funInfoTable dflags info_ptr -- Takes the info pointer of a function, returns the function's arity funInfoArity :: DynFlags -> CmmExpr -> CmmExpr funInfoArity dflags iptr - = cmmToWord dflags (cmmLoadIndex dflags rep fun_info offset) + = cmmToWord dflags (cmmLoadIndex dflags rep fun_info (offset `div` rep_bytes)) where fun_info = funInfoTable dflags iptr rep = cmmBits (widthFromBytes rep_bytes) (rep_bytes, offset) - | tablesNextToCode dflags = ( pc_REP_StgFunInfoExtraFwd_arity pc - , oFFSET_StgFunInfoExtraFwd_arity dflags ) - | otherwise = ( pc_REP_StgFunInfoExtraRev_arity pc + | tablesNextToCode dflags = ( pc_REP_StgFunInfoExtraRev_arity pc , oFFSET_StgFunInfoExtraRev_arity dflags ) + | otherwise = ( pc_REP_StgFunInfoExtraFwd_arity pc + , oFFSET_StgFunInfoExtraFwd_arity dflags ) pc = sPlatformConstants (settings dflags) |