[Webkit-unassigned] [Bug 153981] [ES6] Arrow function syntax. Emit loading&putting this/super only if they are used in arrow function

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Feb 28 09:34:13 PST 2016


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

GSkachkov <gskachkov at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #272424|                            |review?, commit-queue-
              Flags|                            |

--- Comment #49 from GSkachkov <gskachkov at gmail.com> ---
Comment on attachment 272424
  --> https://bugs.webkit.org/attachment.cgi?id=272424
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=272424&action=review

>>>>> Source/JavaScriptCore/parser/Parser.cpp:3883
>>>>> +        if (currentFunctionScope()->isArrowFunction()) {
>>>> 
>>>> I don't understand this code. Why does this happen unconditionally?
>>>> Shouldn't it depend on if "baseIsSuper == true"?
>>>> Also, does this miss the case where you just have "super" without
>>>> a property access or function call afterward?
>>>> I.e:
>>>> ()=>super;
>>> 
>>> I don't understand this code. Why does this happen unconditionally?
>>> Shouldn't it depend on if "baseIsSuper == true"?
>>> Also, does this miss the case where you just have "super" without
>>> a property access or function call afterward?
>>> I.e:
>>> ()=>super;
>> 
>> I don't understand this code. Why does this happen unconditionally?
>> Shouldn't it depend on if "baseIsSuper == true"?
>> Also, does this miss the case where you just have "super" without
>> a property access or function call afterward?
>> I.e:
>> ()=>super;
> 
> I don't understand this code. Why does this happen unconditionally?
> Shouldn't it depend on if "baseIsSuper == true"?
> Also, does this miss the case where you just have "super" without
> a property access or function call afterward?
> I.e:
> ()=>super;

My idea was to check hasDirectSuper & needsSuperBinding that is set when baseIsSuper == true by (setNeedsSuperBinding & setHasDirectSuper), but I see you point, that my current solution is not optimal, it is my fault. I'll rewrite. 

In general '()=>super;' should return syntax error: 'Cannot reference super', and it do.

-- 
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/20160228/61d0c3ae/attachment-0001.html>


More information about the webkit-unassigned mailing list