summaryrefslogtreecommitdiff
path: root/compiler/cmm/CmmParse.y
diff options
context:
space:
mode:
authorMichael D. Adams <adamsmd@cs.indiana.edu>2007-08-06 05:00:19 +0000
committerMichael D. Adams <adamsmd@cs.indiana.edu>2007-08-06 05:00:19 +0000
commit805692401866497554a48ce02619121bbdca87c6 (patch)
tree6f1513b5965234686cb905a4fd4fbea26cf4b6fb /compiler/cmm/CmmParse.y
parentfc395f40b0cc45be084027b38d3e28c2f498227d (diff)
downloadhaskell-805692401866497554a48ce02619121bbdca87c6.tar.gz
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.
Diffstat (limited to 'compiler/cmm/CmmParse.y')
-rw-r--r--compiler/cmm/CmmParse.y13
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler/cmm/CmmParse.y b/compiler/cmm/CmmParse.y
index 5a56dd34e6..50f2c8b08f 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