Simon,

On Tue, Dec 11, 2012 at 4:29 AM, Simon Peyton-Jones
<simo...@microsoft.com> wrote:
> So I totally refactored everything which cost me a couple of days (because it 
> has quite wide span).  I'm validating now.

Yay for code clean-ups!

> So I changed it to "...AND the unboxed version is at most one field wide".  
> That is we get one field not 2 or 10.  So consider
>
>         data T = MkT !S
>         data S = MkS Int
>
> then my impl will unbox the S field of MkT because the result is only one 
> field wide, namely an Int.

This is the behavior I desired. If it didn't work that way in my
implementation it was an oversight. Another way to define the desired
behavior is to say it preserves the size of the constructor (if we
ignore the Double/Int64/Word64 special case of 32-bit architectures).
This property is what I hope will make it possible to enable this by
default (after extensive testing).

I'm happy to call this -funbox-strict-small-fields. However, I'd like
the documentation to talk about pointer-sized things as that, even
though a bit operational sounding, has a clear meaning in my mind.

-- Johan

_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to