summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2018-08-22 08:52:50 +0300
committerÖmer Sinan Ağacan <omeragacan@gmail.com>2018-08-22 08:52:50 +0300
commitab55b4ddb717dab13d8b4900024ccbc8e9280c5c (patch)
tree897aabfb95baa09defda64593d48d4d5d471a703
parent21f0f56164f50844c2150c62f950983b2376f8b6 (diff)
downloadhaskell-ab55b4ddb717dab13d8b4900024ccbc8e9280c5c.tar.gz
Revert "Properly tag fun field of PAPs generated by ap_0_fast"
This reverts commit 2693eb11f55f2001701c90c24183e21c794a8be1. This patch isn't ready yet, see D5051.
-rw-r--r--rts/Apply.cmm14
1 files changed, 6 insertions, 8 deletions
diff --git a/rts/Apply.cmm b/rts/Apply.cmm
index 7e23609638..15d8250f52 100644
--- a/rts/Apply.cmm
+++ b/rts/Apply.cmm
@@ -106,9 +106,6 @@ again:
pap = Hp - SIZEOF_StgPAP + WDS(1);
SET_HDR(pap, stg_PAP_info, CCCS);
StgPAP_arity(pap) = arity;
- if (arity <= TAG_MASK) {
- fun = untaggedfun + arity;
- }
StgPAP_fun(pap) = fun;
StgPAP_n_args(pap) = 0;
return (pap);
@@ -120,8 +117,9 @@ again:
return (fun);
} else {
// We're going to copy this PAP, and put the new CCS in it
+ fun = untaggedfun;
W_ size;
- size = SIZEOF_StgPAP + WDS(TO_W_(StgPAP_n_args(untaggedfun)));
+ size = SIZEOF_StgPAP + WDS(TO_W_(StgPAP_n_args(fun)));
HP_CHK_GEN(size);
TICK_ALLOC_PAP(size, 0);
// attribute this allocation to the "overhead of profiling"
@@ -129,13 +127,13 @@ again:
P_ pap;
pap = Hp - size + WDS(1);
// We'll lose the original PAP, so we should enter its CCS
- ccall enterFunCCS(BaseReg "ptr", StgHeader_ccs(untaggedfun) "ptr");
+ ccall enterFunCCS(BaseReg "ptr", StgHeader_ccs(fun) "ptr");
SET_HDR(pap, stg_PAP_info, CCCS);
- StgPAP_arity(pap) = StgPAP_arity(untaggedfun);
- StgPAP_n_args(pap) = StgPAP_n_args(untaggedfun);
+ StgPAP_arity(pap) = StgPAP_arity(fun);
+ StgPAP_n_args(pap) = StgPAP_n_args(fun);
StgPAP_fun(pap) = StgPAP_fun(fun);
W_ i;
- i = TO_W_(StgPAP_n_args(untaggedfun));
+ i = TO_W_(StgPAP_n_args(fun));
loop:
if (i == 0) {
return (pap);