* Refactor CLabel.RtsLabel to CLabel.CmmLabel
authorBen.Lippmeier@anu.edu.au <unknown>
Fri, 6 Nov 2009 03:05:30 +0000 (03:05 +0000)
committerBen.Lippmeier@anu.edu.au <unknown>
Fri, 6 Nov 2009 03:05:30 +0000 (03:05 +0000)
commita02e7f40afc1aab7fe466f949f505c1d7250713d
treec2e281c50f9bcc84d9cc871012e875e3f36986cb
parentddb7062b0674e8a08bd90b4eca0b9379195d5e40
* Refactor CLabel.RtsLabel to CLabel.CmmLabel

The type of the CmmLabel ctor is now
  CmmLabel :: PackageId -> FastString -> CmmLabelInfo -> CLabel

 - When you construct a CmmLabel you have to explicitly say what
   package it is in. Many of these will just use rtsPackageId, but
   I've left it this way to remind people not to pretend labels are
   in the RTS package when they're not.

 - When parsing a Cmm file, labels that are not defined in the
   current file are assumed to be in the RTS package.

   Labels imported like
      import label
   are assumed to be in a generic "foreign" package, which is different
   from the current one.

   Labels imported like
      import "package-name" label
   are marked as coming from the named package.

   This last one is needed for the integer-gmp library as we want to
   refer to labels that are not in the same compilation unit, but
   are in the same non-rts package.

   This should help remove the nasty #ifdef __PIC__ stuff from
   integer-gmp/cbits/gmp-wrappers.cmm
23 files changed:
compiler/cmm/CLabel.hs
compiler/cmm/CmmBuildInfoTables.hs
compiler/cmm/CmmCPSGen.hs
compiler/cmm/CmmParse.y
compiler/codeGen/CgCallConv.hs
compiler/codeGen/CgClosure.lhs
compiler/codeGen/CgCon.lhs
compiler/codeGen/CgExtCode.hs [new file with mode: 0644]
compiler/codeGen/CgForeignCall.hs
compiler/codeGen/CgHeapery.lhs
compiler/codeGen/CgMonad.lhs
compiler/codeGen/CgPrimOp.hs
compiler/codeGen/CgProf.hs
compiler/codeGen/CgTicky.hs
compiler/codeGen/CgUtils.hs
compiler/codeGen/StgCmmBind.hs
compiler/codeGen/StgCmmCon.hs
compiler/codeGen/StgCmmHeap.hs
compiler/codeGen/StgCmmPrim.hs
compiler/codeGen/StgCmmProf.hs
compiler/codeGen/StgCmmTicky.hs
compiler/codeGen/StgCmmUtils.hs
compiler/parser/Lexer.x