Skip to content

Cleanup in parser/Ctype.hs

Sylvain Henry requested to merge hsyl20/ghc:hsyl20-parser-ctype into master
  • 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).

Merge request reports