[Webkit-unassigned] [Bug 144955] [ES6] Implement ES6 arrow function syntax. Parser of arrow function with execution as common function

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 18 11:18:36 PDT 2015


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

--- Comment #13 from GSkachkov <gskachkov at gmail.com> ---
(In reply to comment #9)
> Comment on attachment 253195 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=253195&action=review
> 
> This looks pretty good to me. 
> It may be worth opening up some follow up bugs that
> will be aimed at getting this to be spec compliant (i.e lexical this, etc)
> and adding this bug as blocking those bugs. It will make it explicit
> what this patch does and doesn't have implemented.
> 
> >> Source/JavaScriptCore/parser/Parser.cpp:1203
> >> +            context.setEndOffset(result, m_lastTokenEndPosition.offset);
> > 
> > What is this setEndOffset for?
> 
> Actually, this is wrong. How does this code not segfault?
> setEndOffset is meant to be called with non-null AST nodes
> 
> > Source/JavaScriptCore/parser/Parser.cpp:1427
> > +            consume(OPENPAREN);
> 
> Nit: you can use next() here. We already know it's an open paren
> 
> > Source/JavaScriptCore/parser/Parser.cpp:2852
> > +    while (newCount--)
> 
> This should be tested.
> 
> > Source/JavaScriptCore/parser/Parser.cpp:2854
> > +    return base;
> 
> Do we currently throw when trying to 'new' an arrow function?

As for now I've created issue where is implemented lexical bind of 'this' and raising exception in case of trying use arrow function with new https://bugs.webkit.org/show_bug.cgi?id=144956, 
also I've add new one    https://bugs.webkit.org/show_bug.cgi?id=145132 and will add one more later.

-- 
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/20150518/09f5c8f8/attachment-0001.html>


More information about the webkit-unassigned mailing list