On Thu, Jul 14, 2011 at 4:20 PM, Talin <span dir="ltr"><<a href="mailto:viridia@gmail.com">viridia@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">On Thu, Jul 14, 2011 at 9:07 AM, Sanjoy Das <span dir="ltr"><<a href="mailto:sanjoy@playingwithpointers.com" target="_blank">sanjoy@playingwithpointers.com</a>></span> wrote:<br></div><div class="gmail_quote">

<div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi llvm-dev!<br>
<br>
I have attached the current state of my GSoC work in patches [1] for<br>
review; this currently allows LLVM to correctly handle functions running<br>
out of stack space and variable sized stack objects.<br>
<br>
Firstly, since I think it is better to get things merged in small<br>
chunks, I'd like to have some specific feedback on where my work stands<br>
in terms of mergeability.<br>
<br>
Secondly, I had been working on supporting variable arguments before I<br>
started to clean up my work and roll a patch series. The varargs work is<br>
not completed yet; and I recall having a discussion on this list some<br>
time back [2] about adding support for co-routines. Does postponing the<br>
vararg work and seeing if co-routines can be implemented sound more<br>
useful (since we should be able to cheaply create and destroy stacks<br>
now). I understand that segmented stacks will primarily be used by<br>
managed languages; does support for varargs seem important enough in<br>
such cases?<br>
<br></blockquote></div><div>I think I was the one who was interested in support for coroutines. My language doesn't currently use variable arguments, but there might be others who would find it useful.</div><div> </div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">

Thanks!<br>
<br>
[1] I'm working on implementing segmented stacks as a part of GSoC '11.<br>
<br>
[2] The previous discussion has concluded with a suggestion of adding<br>
three intrinsics to LLVM: llvm.stacknew, llvm.stackswitch and<br>
llvm.stackdestroy; which should be enough to allow the frontend<br>
developer to implement his or her own co-routining semantics.<br>
<font color="#888888"><br></font></div></blockquote></div></blockquote><div>Actually, now that I think of it there's something I need that is of higher priority (for me anyway) than either of the things you mention: Will I still be able to iterate through stack frames for purposes of garbage collection? In other words, if I use the segmented stack feature, will I need to modify my code that traces roots on the stack?</div>

<div><br></div><div>Here's what the current code looks like: <a href="http://code.google.com/p/tart/source/browse/trunk/runtime/lib/gc_common.cpp#155">http://code.google.com/p/tart/source/browse/trunk/runtime/lib/gc_common.cpp#155</a></div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im"><font color="#888888">
--<br>
Sanjoy Das<br>
<a href="http://playingwithpointers.com" target="_blank">http://playingwithpointers.com</a><br>
</font><br></div><div class="im">_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
</div><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><font color="#888888">-- Talin<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>-- Talin<br>