[GHC] #9289: add anyToAddr# :: (#a#)-> Addr# primop (inverse of addrToAny#)

GHC ghc-devs at haskell.org
Wed Jul 9 21:14:19 UTC 2014


#9289: add anyToAddr# :: (#a#)-> Addr# primop (inverse of addrToAny#)
-------------------------------------+------------------------------------
        Reporter:  carter            |            Owner:
            Type:  feature request   |           Status:  new
        Priority:  normal            |        Milestone:  7.10.1
       Component:  Compiler          |          Version:  7.8.2
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by rwbarton):

 In particular, you could use it to prefetch a heap object without making
 any assumptions about the representation of pointers to heap objects
 (imagine if we used a pointer tagging scheme that used bits 48-62 on
 x86_64, or compressed pointers). Not sure off-hand what else it would be
 useful for given that the GC could move the object after we get the
 `Addr#`; maybe it makes more sense to add a variant of prefetch `a -> Int#
 -> (# a #)` instead.

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


More information about the ghc-tickets mailing list