Strictness in data declaration not matched in assembler?
Tyson Whitehead
twhitehead at gmail.com
Wed Oct 15 10:58:47 EDT 2008
On Wednesday 15 October 2008 10:48:26 you wrote:
> Strictness does not imply unboxing.
>
> To see why not, think about the fact that unboxing breaks sharing. By
> keeping the pointer-indirection in place, we can share even strict
> fields between related values.
I believe I realize that. What I was wondering about was the fact that it
seemed to think the pointer might be to a thunk (instead of constructor
closure). Doesn't the strictness flag mean the following assembler would work
sni_info:
movq 7(%rbx),%rbx
movq $snj_info,(%rbp)
jmp snj_info
(which could be cleaned up further by combining it with snj_info) instead of
sni_info:
movq 7(%rbx),%rbx
movq $snj_info,(%rbp)
testq $7,%rbx
jne snj_info
jmp *(%rbx)
(i.e., the whole test if it is a thunk and conditionally evaluate it bit is
unnecessary due to constructor the strictness flag).
Cheers! -Tyson
More information about the Glasgow-haskell-users
mailing list