[Webkit-unassigned] [Bug 161409] [JSC] Implement parsing of Async Functions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 21 17:02:34 PDT 2016


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

--- Comment #48 from Yusuke Suzuki <utatane.tea at gmail.com> ---
Comment on attachment 289447
  --> https://bugs.webkit.org/attachment.cgi?id=289447
Async Function Parsing v6 + Copy-edit the build-jsc help message changes

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

>>> Source/JavaScriptCore/parser/Parser.h:1560
>>> +        // FIXME: `m_moduleScopeData.get() != nullptr` is not a valid method of determining if parser is parsing a Module.
>> 
>> Could you open a bug for this and note the URL here?
>> And I think this can be easily fixed since we already have this information: JSParserCommentMode {Classic, Module}!
>> This flag is named like this since currently it is only used for controlling comment mode. When you use this information here, you need to rename this mode to something different one (maybe, JSParserScriptMode?).
> 
> For the uses in this patch, I think this actually doesn't matter here, because nested functions will never be re-parsed if `isDisallowedIdentifierAwait()` triggers an error (which it always should here).
> 
> Maybe the FIXMEs are better to just be removed.

Yeah, in this patch, it works and doesn't matter.
But I think relying on this fact looks a bit dangerous since it is not this function that throws an actual syntax error.
The name of this function is generic. So we may use this function for the other purpose.
Consider the following case,

if (!isDisallowedIdentifierAwait(xxx))
    fail();
// pass

In the above case, the first syntax checking succeeds, but the second actual parsing will fail.
I think using JSParserScriptMode is less tricky.

-- 
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/20160922/5b480664/attachment.html>


More information about the webkit-unassigned mailing list