[GHC] #15536: Unify unlifted pointer equality primitives

#15536: Unify unlifted pointer equality primitives -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: (none) Type: feature | Status: new request | Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.4.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- We have a bunch of different primops to test pointer equality between various unlifted pointer types (`MutableArray#`, `MutVar#`, etc.). Now that we have the necessary type machinery, I believe we should be able to get away with just one: {{{#!hs unliftedPtrEquality# :: forall (a :: TYPE 'UnliftedRep). a -> a -> Int# }}} All the rest can then be defined as regular functions in `GHC.Exts` or some such. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15536 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15536: Unify unlifted pointer equality primitives -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): Yes, I believe GHC can do this now. +1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15536#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15536: Unify unlifted pointer equality primitives -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by dfeuer): I started looking into implementation, and I see a couple wrinkles: 1. The one that blocked me is that I don't know how to express the type I want in `primops.txt.pp`, if it's possible. Anyone know? If it's not possible, where would I have to override a bogus type with the correct one? 2. `StableName#` is not implemented using a pointer equality test. Instead, it seems that we check the stable name table indices for equality. I don't, however, see a reason for this. Isn't there precisely one stable name object per stable name table entry? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15536#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC