From: Michael D. Adams Date: Mon, 6 Aug 2007 05:00:19 +0000 (+0000) Subject: Added a case for non-zero arity INFO_TABLE_FUN to the Cmm parser. X-Git-Tag: Before_type_family_merge~34 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=805692401866497554a48ce02619121bbdca87c6 Added a case for non-zero arity INFO_TABLE_FUN to the Cmm parser. This is needed in order to write Main_main from pure Cmm. --- diff --git a/compiler/cmm/CmmParse.y b/compiler/cmm/CmmParse.y index 5a56dd3..50f2c8b 100644 --- a/compiler/cmm/CmmParse.y +++ b/compiler/cmm/CmmParse.y @@ -250,6 +250,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