[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 25 10:45:46 PDT 2015


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

--- Comment #23 from Yusuke Suzuki <utatane.tea at gmail.com> ---
Comment on attachment 253378
  --> https://bugs.webkit.org/attachment.cgi?id=253378
Patch

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

Quick comment.
Maybe I need to learn the control flow profiler context. Saam is good reviewer for the control flow profiler part.
I'll review it again. great work!

> Source/JavaScriptCore/parser/Parser.cpp:1202
> +            return result;

Is there any reason not using `isEndOfArrowFunction`?

> Source/JavaScriptCore/parser/Parser.cpp:1259
> +        break;

This code makes that `=>{}` can be parsed.
But it should be SyntaxError.
And when passing `=>{}`, assertion failure occurs.

> Source/JavaScriptCore/parser/Parser.cpp:1613
> +        failIfFalse(isEndOfArrowFunction(), "Expected the closing ';' ',' ']' ')' '}' after arrow function");

Here, it doesn't allow EOF. So, it seems that `()=>e<EOF>` becomes SyntaxError.
Is there any reason not adding EOF to isEndOfArrowFunction?

> Source/JavaScriptCore/parser/Parser.cpp:2832
> +        functionKeywordStart, info, ArrowFunctionParseType)), "Cannot parse arrow function expression");

Nits: Line breaking is not needed.

-- 
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/20150525/f5b270ed/attachment.html>


More information about the webkit-unassigned mailing list