[commit: ghc] master: Revert "Properly tag fun field of PAPs generated by ap_0_fast" (ab55b4d)

git at git.haskell.org git at git.haskell.org
Wed Aug 22 05:54:12 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/ab55b4ddb717dab13d8b4900024ccbc8e9280c5c/ghc

>---------------------------------------------------------------

commit ab55b4ddb717dab13d8b4900024ccbc8e9280c5c
Author: Ömer Sinan Ağacan <omeragacan at gmail.com>
Date:   Wed Aug 22 08:52:50 2018 +0300

    Revert "Properly tag fun field of PAPs generated by ap_0_fast"
    
    This reverts commit 2693eb11f55f2001701c90c24183e21c794a8be1.
    
    This patch isn't ready yet, see D5051.


>---------------------------------------------------------------

ab55b4ddb717dab13d8b4900024ccbc8e9280c5c
 rts/Apply.cmm | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/rts/Apply.cmm b/rts/Apply.cmm
index 7e23609..15d8250 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);



More information about the ghc-commits mailing list