on master help sign in
Drop INLINE annotations for case mapping functions

This should help with gh-116.

commit7e1d59a1ca046aea574ccbb3edf98b4b502e2900 authorBryan O'Sullivan <bos@serpentine.com> dateThu 7 May 2015, 08:45 (11 years ago) parent0923e00
3 files changed+2−8
Data/Text/Internal/Fusion/CaseMapping.hs−4 scripts/CaseFolding.hs+1−2 scripts/SpecialCasing.hs+1−2
Data/Text/Internal/Fusion/CaseMapping.hs−4
@@ -11,7 +11,6 @@ import Data.Char
1111import Data.Text.Internal.Fusion.Types
1212
1313upperMapping :: forall s. Char -> s -> Step (CC s) Char
14−{-# INLINE upperMapping #-}
1514-- LATIN SMALL LETTER SHARP S
1615upperMapping '\x00df' s = Yield '\x0053' (CC s '\x0053' '\x0000')
1716-- LATIN SMALL LIGATURE FF
@@ -218,12 +217,10 @@ upperMapping '\x1fc7' s = Yield '\x0397' (CC s '\x0342' '\x0399')
218217upperMapping '\x1ff7' s = Yield '\x03a9' (CC s '\x0342' '\x0399')
219218upperMapping c s = Yield (toUpper c) (CC s '\0' '\0')
220219lowerMapping :: forall s. Char -> s -> Step (CC s) Char
221−{-# INLINE lowerMapping #-}
222220-- LATIN CAPITAL LETTER I WITH DOT ABOVE
223221lowerMapping '\x0130' s = Yield '\x0069' (CC s '\x0307' '\x0000')
224222lowerMapping c s = Yield (toLower c) (CC s '\0' '\0')
225223titleMapping :: forall s. Char -> s -> Step (CC s) Char
226−{-# INLINE titleMapping #-}
227224-- LATIN SMALL LETTER SHARP S
228225titleMapping '\x00df' s = Yield '\x0053' (CC s '\x0073' '\x0000')
229226-- LATIN SMALL LIGATURE FF
@@ -322,7 +319,6 @@ titleMapping '\x1fc7' s = Yield '\x0397' (CC s '\x0342' '\x0345')
322319titleMapping '\x1ff7' s = Yield '\x03a9' (CC s '\x0342' '\x0345')
323320titleMapping c s = Yield (toTitle c) (CC s '\0' '\0')
324321foldMapping :: forall s. Char -> s -> Step (CC s) Char
325−{-# INLINE foldMapping #-}
326322-- MICRO SIGN
327323foldMapping '\x00b5' s = Yield '\x03bc' (CC s '\x0000' '\x0000')
328324-- LATIN SMALL LETTER SHARP S
scripts/CaseFolding.hs+1−2
@@ -36,8 +36,7 @@ parseCF name = parse entries name <$> readFile name
3636mapCF :: CaseFolding -> [String]
3737mapCF (CF _ ms) = typ ++ (map nice . filter p $ ms) ++ [last]
3838 where
39− typ = ["foldMapping :: forall s. Char -> s -> Step (CC s) Char"
40− ,"{-# INLINE foldMapping #-}"]
39+ typ = ["foldMapping :: forall s. Char -> s -> Step (CC s) Char"]
4140 last = "foldMapping c s = Yield (toLower c) (CC s '\\0' '\\0')"
4241 nice c = "-- " ++ name c ++ "\n" ++
4342 "foldMapping " ++ showC (code c) ++ " s = Yield " ++ x ++ " (CC s " ++ y ++ " " ++ z ++ ")"
scripts/SpecialCasing.hs+1−2
@@ -42,8 +42,7 @@ mapSC :: String -> (Case -> String) -> (Char -> Char) -> SpecialCasing
4242mapSC which access twiddle (SC _ ms) =
4343 typ ++ (map nice . filter p $ ms) ++ [last]
4444 where
45− typ = [which ++ "Mapping :: forall s. Char -> s -> Step (CC s) Char"
46− ,"{-# INLINE " ++ which ++ "Mapping #-}"]
45+ typ = [which ++ "Mapping :: forall s. Char -> s -> Step (CC s) Char"]
4746 last = which ++ "Mapping c s = Yield (to" ++ ucFirst which ++ " c) (CC s '\\0' '\\0')"
4847 nice c = "-- " ++ name c ++ "\n" ++
4948 which ++ "Mapping " ++ showC (code c) ++ " s = Yield " ++ x ++ " (CC s " ++ y ++ " " ++ z ++ ")"