<div dir="ltr">Thank you for your comments.<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 6, 2013 at 4:32 AM, Simon Marlow <span dir="ltr">&lt;<a href="mailto:marlowsd@gmail.com" target="_blank">marlowsd@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Akio, I looked at your first patch, which mostly seems good.  The sequence at the beginning of deRefWeak certainly looks strange - I think it&#39;s ok, but it needs a comment.<br>
</blockquote><div><br>I update my patches and added a comment to that part.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
One thing I&#39;m confused about is the handling of DEAD_WEAK pointers.  You removed the StgDeadWeak struct - how is that possible?  I don&#39;t understand why DEAD_WEAK has 4 payload words, but StgDeadWeak has only one, and furthermore a DEAD_WEAK appears to have the link field in a different place from the WEAK closure.  Something is suspicious here.<br>
</blockquote><div><br>Before my patch, dead weak pointers had the same size as live ones,  but they had the link field in different places.<br></div><div><br>With my patch, dead weak pointers have the same layout as live ones, so they can be accessed with the single StgWeak struct. The only differences between live and dead weak pointers now are the info pointer, and whether the &quot;cfinalizers&quot; field is followed by the GC. The code is simplified a bit because it doesn&#39;t need to deal with two different layouts.<br>
<br>I think I needed this change in order to keep finalizeWeak# atomic, but now that I use lockClosure() to ensure atomicity, probably I can remove this change from the patch. Should I do so?<br><br>- Akio<br><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
Cheers,<br>
        Simon<br>
<br>
</blockquote></div><br></div></div>