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-09-23 15:09:09 by simonpj]
[ghc-hetmet.git]
/
ghc
/
compiler
/
basicTypes
/
Literal.lhs
diff --git
a/ghc/compiler/basicTypes/Literal.lhs
b/ghc/compiler/basicTypes/Literal.lhs
index
d71bedf
..
edc77b7
100644
(file)
--- a/
ghc/compiler/basicTypes/Literal.lhs
+++ b/
ghc/compiler/basicTypes/Literal.lhs
@@
-288,10
+288,12
@@
litIsDupable other = True
litSize :: Literal -> Int
-- Used by CoreUnfold.sizeExpr
litSize :: Literal -> Int
-- Used by CoreUnfold.sizeExpr
-litSize (MachStr str) = 1 + (lengthFS str `div` 4)
+litSize (MachStr str) = 1 + ((lengthFS str + 3) `div` 4)
-- Every literal has size at least 1, otherwise
-- f "x"
-- might be too small
-- Every literal has size at least 1, otherwise
-- f "x"
-- might be too small
+ -- [Sept03: make literal strings a bit bigger to avoid fruitless
+ -- duplication of little strings]
litSize _other = 1
\end{code}
litSize _other = 1
\end{code}