
#12622: Unboxed static pointers lead to missing SPT entries -------------------------------------+------------------------------------- Reporter: mboes | Owner: | facundo.dominguez Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2709 Wiki Page: | Phab:D2720 -------------------------------------+------------------------------------- Comment (by simonpj): Well, maybe. There is a complexity-budget cost that I remain anxious about. If you want to pursue the current line, let's not introduce a "twin" data constructor. Rather, how about this: * Make `(static e)` expand into the ordinary function call `makeStatic e` * Make the float-out pass spot those calls (instead of spotting the `StaticPtr` data constructor) and float them to the top. * Make the SPT construction spot those calls, gather them into a table, generate a GUID or whatever for each, and allocate a `StaticPtr` data consructor for each. That way all the magic of building `StaticPtr` constructors is in one place. Would that work? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12622#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler