[commit: ghc] wip/T15449, wip/T16188, wip/llvm-configure-opts: Cleanup in parser/Ctype.hs (ced729f)
git at git.haskell.org
git at git.haskell.org
Sun Feb 10 21:30:49 UTC 2019
Repository : ssh://git@git.haskell.org/ghc
On branches: wip/T15449,wip/T16188,wip/llvm-configure-opts
Link : http://ghc.haskell.org/trac/ghc/changeset/ced729f6f4651b67151015e25a98c93792794aee/ghc
>---------------------------------------------------------------
commit ced729f6f4651b67151015e25a98c93792794aee
Author: Sylvain Henry <sylvain at haskus.fr>
Date: Tue Feb 5 15:55:03 2019 +0100
Cleanup in parser/Ctype.hs
* GHC now performs constant folding on bit operations like (.|.) so we
use them and we remove the misleading comment
* we use Word8 instead of Int and we remove the useless conversion to
Int32. Hopefully future releases of GHC could transform the big case in
`charType` into a value table indexing instead of a jump table. Word8
would make the table smaller.
* we use INLINABLE pragma instead of INLINE on `is_ctype`: in my test,
the latter *prevents* `is_ctype` to be inlined because `charType` is
inlined into `is_ctype` (to call charType`s worker on the unboxed Char
directly).
>---------------------------------------------------------------
ced729f6f4651b67151015e25a98c93792794aee
compiler/parser/Ctype.hs | 273 +++++++++++++++++++++++------------------------
1 file changed, 135 insertions(+), 138 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc ced729f6f4651b67151015e25a98c93792794aee
More information about the ghc-commits
mailing list