<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Assertion failure for super() call in arrow function default parameters"
href="https://bugs.webkit.org/show_bug.cgi?id=157079#c10">Comment # 10</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Assertion failure for super() call in arrow function default parameters"
href="https://bugs.webkit.org/show_bug.cgi?id=157079">bug 157079</a>
from <span class="vcard"><a class="email" href="mailto:gskachkov@gmail.com" title="GSkachkov <gskachkov@gmail.com>"> <span class="fn">GSkachkov</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=157079#c8">comment #8</a>)
<span class="quote">> Comment on <span class=""><a href="attachment.cgi?id=278425&action=diff" name="attach_278425" title="Patch">attachment 278425</a> <a href="attachment.cgi?id=278425&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=278425&action=review">https://bugs.webkit.org/attachment.cgi?id=278425&action=review</a>
>
> > Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:574
> > + m_forceLoadThisFromArrowFunctionLexicalEnvironment = false;
>
> Why do we need this?</span >
There is a case:
var f = function () { return (a=this)=>{ return a; };};
var result = f.call({a:'data'})();
So just moving up loading 'this' for arrow function, broke several tests and to cover snipped, we need load 'this' twice before initializeDefaultParameterValuesAndSetupFunctionScopeStack and after. To prevent this I added parameter that allow load 'this' from arrow function scope instead of thisRegister when we access to 'this'. Currently I'm playing with loading 'this' to avoid using this m_forceLoadThisFromArrowFunctionLexicalEnvironment flag.</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>