[GHC] #14375: Implement with# primop

GHC ghc-devs at haskell.org
Mon Oct 23 13:31:43 UTC 2017


#14375: Implement with# primop
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.1
      Resolution:                    |             Keywords:  JoinPoints
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #14346            |  Differential Rev(s):  ​Phab:D4110
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 I think I was going too fast.  Let's try this instead:

 * `maskAsyncExceptions#` is allowed to have `\s.e` as its argument.
 Perhaps even required.

 * The codegen looks like
 {{{
 cgExpr (maskAsyncExceptions (\s.e) s2)
   = do { emit (mask frame)
        ; bind s:=s2 (cgExpr e) }
 }}}

 Essentially just push the stack frame and carry on with e.

 For the "exception handler" argument for `catch#`, a join might make more
 sense.  But the "main event" argument for `catch#` should work as above.

 Does that make more sense?

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


More information about the ghc-tickets mailing list