[Webkit-unassigned] [Bug 157079] Assertion failure for super() call in arrow function default parameters

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 9 12:54:33 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=157079

--- Comment #10 from GSkachkov <gskachkov at gmail.com> ---
(In reply to comment #8)
> Comment on attachment 278425 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=278425&action=review
> 
> > Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:574
> > +    m_forceLoadThisFromArrowFunctionLexicalEnvironment = false;
> 
> Why do we need this?

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160509/1fc1c5be/attachment-0001.html>


More information about the webkit-unassigned mailing list