<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - The liveness pruning done by ObjectAllocationSinkingPhase ignores the possibility of an object's bytecode liveness being longer than its DFG liveness"
   href="https://bugs.webkit.org/show_bug.cgi?id=144945#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - The liveness pruning done by ObjectAllocationSinkingPhase ignores the possibility of an object's bytecode liveness being longer than its DFG liveness"
   href="https://bugs.webkit.org/show_bug.cgi?id=144945">bug 144945</a>
              from <span class="vcard"><a class="email" href="mailto:fpizlo&#64;apple.com" title="Filip Pizlo &lt;fpizlo&#64;apple.com&gt;"> <span class="fn">Filip Pizlo</span></a>
</span></b>
        <pre>Another test:

var global = null;

function foo(p, q) {
    var o = {f:42};
    if (p)
        global = o;
    var tmp = q + 1;
    return o.f + tmp;
}

noInline(foo);

var lastObject = null;

function validateEscape(when) {
    if (global === lastObject)
        throw &quot;Error: bad value in global &quot; + when + &quot;, identical to lastObject.&quot;;
    if (global === null || !(typeof global == &quot;object&quot;))
        throw &quot;Error: bad value in global &quot; + when + &quot;: it's not an object.&quot;;
    if (global.f != 42)
        throw &quot;Error: bad value in global &quot; + when + &quot;: f isn't 42, it's: &quot; + global.f;
    lastObject = global;
    global = null;
}

for (var i = 0; i &lt; 10000; ++i) {
    var escape = !!(i &amp; 1);
    var result = foo(escape, 42);
    if (result != 42 + 42 + 1)
        throw &quot;Error: bad result: &quot; + result;
    if (escape)
        validateEscape(&quot;in loop&quot;);
    else if (global !== null)
        throw &quot;Error: bad value in global: &quot; + global;
}

var result = foo(true, 2147483647);
if (result != 42 + 2147483647 + 1)
    throw &quot;Error: bad result at end: &quot; + result;
validateEscape(&quot;at end&quot;);</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>