[GHC] #6135: Unboxed Booleans
GHC
cvs-ghc at haskell.org
Fri Jun 8 11:33:23 CEST 2012
#6135: Unboxed Booleans
---------------------------------+------------------------------------------
Reporter: benl | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.4.1
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Comment(by simonmar):
Note that the case expressions are optimised to a simple inline comparison
in the code generator, so it's not as bad as it seems.
However, the special case in the code generator is annoying, so I had been
meaning to change all these primops to return `Int#`.
In your example:
{{{
case x <# 0# || x >=# aWidth
|| y <# 0# || y >=# aHeight of
True -> ...
False -> ...
}}}
We would want to end up with
{{{
case x <# 0# `or#` x >=# aWidth
`or#` y <# 0# `or#` y >=# aHeight of
0# -> ...
_ -> ...
}}}
But getting there could be a bit tricky. Still, I think changing the
primops is a good first step.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6135#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list