[commit: ghc] ghc-8.2: Revert "Fix bug in previous fix for #5654" (58f055d)

git at git.haskell.org git at git.haskell.org
Tue Mar 21 14:52:03 UTC 2017


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

On branch  : ghc-8.2
Link       : http://ghc.haskell.org/trac/ghc/changeset/58f055dae77ab57247ffa96c70d62d8ddd3193e4/ghc

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

commit 58f055dae77ab57247ffa96c70d62d8ddd3193e4
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Sat Mar 18 12:09:06 2017 -0400

    Revert "Fix bug in previous fix for #5654"
    
    This reverts commit 2a02040b2e23daa4f791afc290c33c9bbe3c620c.


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

58f055dae77ab57247ffa96c70d62d8ddd3193e4
 rts/Apply.cmm | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/rts/Apply.cmm b/rts/Apply.cmm
index b18c347..3a73ce0 100644
--- a/rts/Apply.cmm
+++ b/rts/Apply.cmm
@@ -57,7 +57,6 @@ stg_ap_0_fast ( P_ fun )
 again:
     W_  info;
     W_ untaggedfun;
-    W_ arity;
     untaggedfun = UNTAG(fun);
     info = %INFO_PTR(untaggedfun);
     switch [INVALID_OBJECT .. N_CLOSURE_TYPES]
@@ -69,11 +68,6 @@ again:
             fun = StgInd_indirectee(fun);
             goto again;
         }
-        case BCO:
-        {
-            arity = TO_W_(StgBCO_arity(untaggedfun));
-            goto dofun;
-        }
         case
             FUN,
             FUN_1_0,
@@ -81,10 +75,9 @@ again:
             FUN_2_0,
             FUN_1_1,
             FUN_0_2,
-            FUN_STATIC:
+            FUN_STATIC,
+            BCO:
         {
-            arity = TO_W_(StgFunInfoExtra_arity(%FUN_INFO(info)));
-        dofun:
             if (CCCS == StgHeader_ccs(untaggedfun)) {
                 return (fun);
             } else {
@@ -99,8 +92,10 @@ again:
                 // attribute this allocation to the "overhead of profiling"
                 CCS_ALLOC(BYTES_TO_WDS(SIZEOF_StgPAP), CCS_OVERHEAD);
                 P_ pap;
+                W_ arity;
                 pap = Hp - SIZEOF_StgPAP + WDS(1);
                 SET_HDR(pap, stg_PAP_info, CCCS);
+                arity = TO_W_(StgFunInfoExtra_arity(%FUN_INFO(info)));
                 StgPAP_arity(pap) = arity;
                 StgPAP_fun(pap)   = fun;
                 StgPAP_n_args(pap) = 0;



More information about the ghc-commits mailing list