X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fcmm%2FCmmParse.y;h=039c6161cacea0e0fcfbc0577bca83eb8b579d01;hp=5a56dd34e6c041976ba1ab8ef46c92b8b6f408ba;hb=17b297d97d327620ed6bfab942f8992b2446f1bf;hpb=fc395f40b0cc45be084027b38d3e28c2f498227d diff --git a/compiler/cmm/CmmParse.y b/compiler/cmm/CmmParse.y index 5a56dd3..039c616 100644 --- a/compiler/cmm/CmmParse.y +++ b/compiler/cmm/CmmParse.y @@ -7,6 +7,13 @@ ----------------------------------------------------------------------------- { +{-# OPTIONS_GHC -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/WorkingConventions#Warnings +-- for details + module CmmParse ( parseCmmFile ) where import CgMonad @@ -250,6 +257,19 @@ info :: { ExtFCode (CLabel, CmmInfoTable, [Maybe LocalReg]) } []) } -- we leave most of the fields zero here. This is only used -- to generate the BCO info table in the RTS at the moment. + + -- A variant with a non-zero arity (needed to write Main_main in Cmm) + | 'INFO_TABLE_FUN' '(' NAME ',' INT ',' INT ',' INT ',' STRING ',' STRING ',' INT ',' INT ')' + -- ptrs, nptrs, closure type, description, type, fun type, arity + { do prof <- profilingInfo $11 $13 + return (mkRtsEntryLabelFS $3, + CmmInfoTable prof (fromIntegral $9) + (FunInfo (fromIntegral $5, fromIntegral $7) NoC_SRT (fromIntegral $15) (fromIntegral $17) + (ArgSpec 0) + zeroCLit), + []) } + -- we leave most of the fields zero here. This is only used + -- to generate the BCO info table in the RTS at the moment. | 'INFO_TABLE_CONSTR' '(' NAME ',' INT ',' INT ',' INT ',' INT ',' STRING ',' STRING ')' -- ptrs, nptrs, tag, closure type, description, type @@ -878,6 +898,7 @@ foreignCall foreignCall conv_string results_code expr_code args_code vols safety ret = do convention <- case conv_string of "C" -> return CCallConv + "stdcall" -> return StdCallConv "C--" -> return CmmCallConv _ -> fail ("unknown calling convention: " ++ conv_string) return $ do