[GHC] #11656: Alllow static pointers to local closed definitions

GHC ghc-devs at haskell.org
Mon May 2 17:27:18 UTC 2016


#11656: Alllow static pointers to local closed definitions
-------------------------------------+-------------------------------------
        Reporter:  mboes             |                Owner:
                                     |  facundo.dominguez
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:  11698             |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D2104
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Facundo Domínguez <facundo.dominguez@…>):

 In [changeset:"36d29f7ce332a2b1fbc36de831b0eef7a6405555/ghc"
 36d29f7c/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="36d29f7ce332a2b1fbc36de831b0eef7a6405555"
 StaticPointers: Allow closed vars in the static form.

 Summary:
 With this patch closed variables are allowed regardless of whether
 they are bound at the top level or not.

 The FloatOut pass is always performed. When optimizations are
 disabled, only expressions that go to the top level are floated.
 Thus, the applications of the StaticPtr data constructor are always
 floated.

 The CoreTidy pass makes sure the floated applications appear in the
 symbol table of object files. It also collects the floated bindings
 and inserts them in the static pointer table.

 The renamer does not check anymore if free variables appearing in the
 static form are top-level. Instead, the typechecker looks at the
 tct_closed flag to decide if the free variables are closed.

 The linter checks that applications of StaticPtr only occur at the
 top of top-level bindings after the FloatOut pass.

 The field spInfoName of StaticPtrInfo has been removed. It used to
 contain the name of the top-level binding that contains the StaticPtr
 application. However, this information is no longer available when the
 StaticPtr is constructed, as the binding name is determined now by the
 FloatOut pass.

 Test Plan: ./validate

 Reviewers: goldfire, simonpj, austin, hvr, bgamari

 Reviewed By: simonpj

 Subscribers: thomie, mpickering, mboes

 Differential Revision: https://phabricator.haskell.org/D2104

 GHC Trac Issues: #11656
 }}}

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


More information about the ghc-tickets mailing list