<div class="gmail_quote">On Tue, Jul 16, 2013 at 3:05 PM, Justin Lebar <span dir="ltr"><<a href="mailto:justin.lebar@gmail.com" target="_blank">justin.lebar@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


The scheme under which f1 keeps alive only v1 and f2 keeps alive only<br>
v2 is called a "safe-for-space closure".  It's apparently difficult to<br>
do right, so we shouldn't expect JS engines to do this anytime soon.<br>
See <a href="http://flint.cs.yale.edu/flint/publications/escc.html" target="_blank">http://flint.cs.yale.edu/flint/publications/escc.html</a>.<br></blockquote></div><br>I filed bug 894971 on optimizing this further with some ideas of things we could short of true "safe-for-space" closures.  Brian Hackett also wrote an analysis that points out these sort of issues in bug 894669.  We're going to look at the output that gives on Gaia and see if it's manageable.<br>
<br>- Kyle<br>