[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
Thu Jun 25 22:29:18 PDT 2015


GSkachkov <gskachkov at gmail.com> changed:

           What    |Removed                     |Added
 Attachment #255593|1                           |0
        is obsolete|                            |

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

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

>> Source/JavaScriptCore/parser/Parser.cpp:1588
>> +        info.startFunctionOffset = m_token.m_data.offset;
> Still I don't understand why this line is needed.
> `info.startFunctionOffset` is already adjusted in the
> `info.startFunctionOffset = (info.functionBodyType == ArrowFunctionBodyBlock) ? m_token.m_data.offset : info.arrowFunctionOffset;`
> part, right?
> When setting info.startFunctionOffset previously, we already considered functionBodyType.
> When block body functions come, we set `{`'s offset. And when expr body functions come, we set `=>`'s offset.
> So this resetting is already done.
> Anyway, if info.startFunctionOffset is modified after looking up the cacheInfo, cacheInfo's key becomes different.
> So if this adjustment is needed, this need to be done before `if (const SourceProviderCacheItem* cachedInfo = TreeBuilder::CanUseFunctionCache ? findCachedFunctionInfo(info.startFunctionOffset) : 0) {` part. Reaching here, we already looked up the cache with the previous info.startFunctionOffset.

Now I got it :-) The same was done in line 1506. 

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/20150626/e4107bc1/attachment-0001.html>

More information about the webkit-unassigned mailing list