[GHC] #6084: Add stg_ap_pnnv and related call patterns

GHC ghc-devs at haskell.org
Tue Nov 26 19:26:56 UTC 2013


#6084: Add stg_ap_pnnv and related call patterns
-------------------------------------+------------------------------------
        Reporter:  SimonMeier        |            Owner:  simonmar
            Type:  feature request   |           Status:  new
        Priority:  high              |        Milestone:  7.8.1
       Component:  Runtime System    |          Version:  7.7
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:  8313              |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by parcs):

 Shouldn't the `funInfoArity` function be using `StgFunInfoExtraRev.arity`,
 not `StgFunInfoExtraFmd.arity`, when `tablesNextToCode` is true?

 {{{
 #!haskell
 -- Takes the info pointer of a function, returns the function's arity
 funInfoArity :: DynFlags -> CmmExpr -> CmmExpr
 funInfoArity dflags iptr
   = cmmToWord dflags (cmmLoadIndex dflags rep fun_info offset)
   where
    fun_info = funInfoTable dflags iptr
    rep = cmmBits (widthFromBytes rep_bytes)

    (rep_bytes, offset)
     | tablesNextToCode dflags = ( pc_REP_StgFunInfoExtraFwd_arity pc
                                 , oFFSET_StgFunInfoExtraFwd_arity dflags )
     | otherwise               = ( pc_REP_StgFunInfoExtraRev_arity pc
                                 , oFFSET_StgFunInfoExtraRev_arity dflags )

    pc = sPlatformConstants (settings dflags)
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/6084#comment:26>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list