[commit: ghc] wip/marge_bot_batch_merge_job: Cleanup in parser/Ctype.hs (d5a9d9c)

git at git.haskell.org git at git.haskell.org
Thu Feb 7 17:12:10 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/marge_bot_batch_merge_job
Link       : http://ghc.haskell.org/trac/ghc/changeset/d5a9d9c54bebeda4363d07ba1b2192498182ad76/ghc

>---------------------------------------------------------------

commit d5a9d9c54bebeda4363d07ba1b2192498182ad76
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).


>---------------------------------------------------------------

d5a9d9c54bebeda4363d07ba1b2192498182ad76
 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 d5a9d9c54bebeda4363d07ba1b2192498182ad76


More information about the ghc-commits mailing list