diff options
author | Ben.Lippmeier@anu.edu.au <unknown> | 2010-01-02 05:37:54 +0000 |
---|---|---|
committer | Ben.Lippmeier@anu.edu.au <unknown> | 2010-01-02 05:37:54 +0000 |
commit | 7854ec4b11e117f8514553890851d14a66690fbb (patch) | |
tree | f96e7dd94f39eda39fe86da0298e3f628a35ef65 /compiler/codeGen/CgExtCode.hs | |
parent | e5fba2f55f560b41e27047bf59958729d51aca84 (diff) | |
download | haskell-7854ec4b11e117f8514553890851d14a66690fbb.tar.gz |
Tag ForeignCalls with the package they correspond to
Diffstat (limited to 'compiler/codeGen/CgExtCode.hs')
-rw-r--r-- | compiler/codeGen/CgExtCode.hs | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/compiler/codeGen/CgExtCode.hs b/compiler/codeGen/CgExtCode.hs index 03ac75e0ba..0e0a802445 100644 --- a/compiler/codeGen/CgExtCode.hs +++ b/compiler/codeGen/CgExtCode.hs @@ -21,7 +21,6 @@ module CgExtCode ( newLabel, newFunctionName, newImport, - lookupLabel, lookupName, @@ -42,7 +41,7 @@ import CgMonad import CLabel import Cmm -import BasicTypes +-- import BasicTypes import BlockId import FastString import Module @@ -146,14 +145,13 @@ newFunctionName name pkg -- | Add an imported foreign label to the list of local declarations. -- If this is done at the start of the module the declaration will scope -- over the whole module. --- CLabel's labelDynamic classifies these labels as dynamic, hence the --- code generator emits PIC code for them. -newImport :: (Maybe PackageId, FastString) -> ExtFCode () -newImport (Nothing, name) - = addVarDecl name (CmmLit (CmmLabel (mkForeignLabel name Nothing True IsFunction))) - -newImport (Just pkg, name) - = addVarDecl name (CmmLit (CmmLabel (mkCmmCodeLabel pkg name))) +newImport + :: (FastString, CLabel) + -> ExtFCode () + +newImport (name, cmmLabel) + = addVarDecl name (CmmLit (CmmLabel cmmLabel)) + -- | Lookup the BlockId bound to the label with this name. -- If one hasn't been bound yet, create a fresh one based on the |