More fixes for #5654
authorSimon Marlow <marlowsd@gmail.com>
Tue, 20 Dec 2016 14:32:11 +0000 (14:32 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Fri, 6 Jan 2017 15:53:36 +0000 (15:53 +0000)
commit3a18baff06abc193569b1b76358da26375b3c8d6
treec80e30dc27fb548eca50b9697d1fdd2a248a891a
parent508811004d1806b28a91c3ff4a5c2247e2ad4655
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.
includes/stg/MiscClosures.h
rts/Apply.cmm
rts/Interpreter.c
rts/Printer.c
rts/Profiling.c
rts/StgMiscClosures.cmm
testsuite/tests/codeGen/should_run/cgrun057.stderr
testsuite/tests/profiling/should_run/T680.prof.sample
testsuite/tests/profiling/should_run/all.T
testsuite/tests/profiling/should_run/toplevel_scc_1.prof.sample