Commit ab55b4dd authored by Ömer Sinan Ağacan's avatar Ömer Sinan Ağacan

Revert "Properly tag fun field of PAPs generated by ap_0_fast"

This reverts commit 2693eb11.

This patch isn't ready yet, see D5051.
parent 21f0f561
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment