projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2003-10-08 10:37:25 by wolfgang]
[ghc-hetmet.git]
/
ghc
/
utils
/
genprimopcode
/
Main.hs
diff --git
a/ghc/utils/genprimopcode/Main.hs
b/ghc/utils/genprimopcode/Main.hs
index
d92d3a9
..
e486403
100644
(file)
--- a/
ghc/utils/genprimopcode/Main.hs
+++ b/
ghc/utils/genprimopcode/Main.hs
@@
-290,10
+290,12
@@
gen_primop_list (Info defaults entries)
) where (first:rest) = filter is_primop entries
gen_primop_tag (Info defaults entries)
) where (first:rest) = filter is_primop entries
gen_primop_tag (Info defaults entries)
- = unlines (zipWith f (filter is_primop entries) [1..])
+ = unlines (max_def : zipWith f primop_entries [1..])
where
where
+ primop_entries = filter is_primop entries
f i n = "tagOf_PrimOp " ++ cons i
++ " = _ILIT(" ++ show n ++ ") :: FastInt"
f i n = "tagOf_PrimOp " ++ cons i
++ " = _ILIT(" ++ show n ++ ") :: FastInt"
+ max_def = "maxPrimOpTag = " ++ show (length primop_entries) ++ " :: Int"
gen_data_decl (Info defaults entries)
= let conss = map cons (filter is_primop entries)
gen_data_decl (Info defaults entries)
= let conss = map cons (filter is_primop entries)