[commit: ghc] wip/rwbarton-dump: Revert "Fix bug in previous fix for #5654" (98c6839)

git at git.haskell.org git at git.haskell.org
Wed Apr 26 21:20:47 UTC 2017


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

On branch  : wip/rwbarton-dump
Link       : http://ghc.haskell.org/trac/ghc/changeset/98c6839fa056d25b2d6598193345897e77e352be/ghc

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

commit 98c6839fa056d25b2d6598193345897e77e352be
Author: Reid Barton <rwbarton at gmail.com>
Date:   Fri Mar 24 15:20:46 2017 -0400

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


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

98c6839fa056d25b2d6598193345897e77e352be
 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