BC-breaking changes to C-- CLOSURE syntax.
authorEdward Z. Yang <ezyang@mit.edu>
Mon, 26 Aug 2013 21:52:37 +0000 (14:52 -0700)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Thu, 2 Oct 2014 05:26:38 +0000 (22:26 -0700)
commit3b5a840bba375c4c4c11ccfeb283f84c3a1ef22c
tree0463f156f7ae946744de0cdcda2fb9ffc58f93f3
parentb23ba2a7d612c6b466521399b33fe9aacf5c4f75
BC-breaking changes to C-- CLOSURE syntax.

Summary:
Previously, there were two variants of CLOSURE in C--:

    - Top-level CLOSURE(foo_closure, foo, lits...), which defines a new
      static closure and gives it a name, and

    - Array CLOSURE(foo, lits...), which was used for the static char
      and integer arrays.

They used the same name, were confusing, and didn't even generate
the correct internal label representation!  So now, we have two
new forms:

    - Top-level CLOSURE(foo, lits...) which automatically generates
      foo_closure (along with foo_info, which we were doing already)

    - Array ANONYMOUS_CLOSURE(foo, lits...) which doesn't generate
      a foo_closure identifier.

Part of remove HEAP_ALLOCED patch set (#8199)

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Test Plan: validate

Reviewers: simonmar, austin

Subscribers: simonmar, ezyang, carter, thomie

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

GHC Trac Issues: #8199
compiler/cmm/CLabel.hs
compiler/cmm/CmmLex.x
compiler/cmm/CmmParse.y
rts/StgMiscClosures.cmm