summaryrefslogtreecommitdiff
path: root/rts/StgMiscClosures.cmm
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2016-12-20 14:32:11 +0000
committerSimon Marlow <marlowsd@gmail.com>2017-01-06 15:53:36 +0000
commit3a18baff06abc193569b1b76358da26375b3c8d6 (patch)
treec80e30dc27fb548eca50b9697d1fdd2a248a891a /rts/StgMiscClosures.cmm
parent508811004d1806b28a91c3ff4a5c2247e2ad4655 (diff)
downloadhaskell-3a18baff06abc193569b1b76358da26375b3c8d6.tar.gz
More fixes for #5654
* In stg_ap_0_fast, if we're evaluating a thunk, the thunk might evaluate to a function in which case we may have to adjust its CCS. * The interpreter has its own implementation of stg_ap_0_fast, so we have to do the same shenanigans with creating empty PAPs and copying PAPs there. * GHCi creates Cost Centres as children of CCS_MAIN, which enterFunCCS() wrongly assumed to imply that they were CAFs. Now we use the is_caf flag for this, which we have to correctly initialise when we create a Cost Centre in GHCi.
Diffstat (limited to 'rts/StgMiscClosures.cmm')
-rw-r--r--rts/StgMiscClosures.cmm10
1 files changed, 10 insertions, 0 deletions
diff --git a/rts/StgMiscClosures.cmm b/rts/StgMiscClosures.cmm
index aa22c99be4..e8a5b8fed5 100644
--- a/rts/StgMiscClosures.cmm
+++ b/rts/StgMiscClosures.cmm
@@ -55,6 +55,16 @@ INFO_TABLE_RET (stg_restore_cccs, RET_SMALL, W_ info_ptr, W_ cccs)
jump %ENTRY_CODE(Sp(0)) [*]; // NB. all registers live!
}
+
+INFO_TABLE_RET (stg_restore_cccs_eval, RET_SMALL, W_ info_ptr, W_ cccs)
+ return (P_ ret)
+{
+#if defined(PROFILING)
+ CCCS = cccs;
+#endif
+ jump stg_ap_0_fast(ret);
+}
+
/* ----------------------------------------------------------------------------
Support for the bytecode interpreter.
------------------------------------------------------------------------- */