[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
Mon Feb 22 12:53:51 PST 2016


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

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

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

>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:4050
>> +    return m_codeBlock->doAnyInnerArrowFunctionsUseNewTarget() || m_codeBlock->doAnyInnerArrowFunctionsUseSuperCall() || m_codeBlock->doAnyInnerArrowFunctionsUseEval();
> 
> I was wrong about this. new.target is prohibited inside eval. Sorry for stating the wrong thing in my previous review.

Fixed

>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:4055
>> +    return m_codeBlock->doAnyInnerArrowFunctionsUseSuperCall() || m_codeBlock->doAnyInnerArrowFunctionsUseSuperProperty() || m_codeBlock->doAnyInnerArrowFunctionsUseEval() || m_codeBlock->usesEval();
> 
> Also, 'super' isn't allowed inside an eval. It's a SyntaxError.

I fixed. However we have issue where will fix this SyntaxError :-)

>> Source/JavaScriptCore/parser/Parser.h:473
>> +            setInnerArrowFunctionUseArgumetns();
> 
> An alternative to doing this at every useVariable(.) call
> is to just do it once when popScope happens.

OK. Refactored.

>> Source/JavaScriptCore/parser/Parser.h:953
>> +        // We do not up arrow function features for ordinary function
> 
> comment not needed.

Removed

-- 
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/20160222/02aeebf7/attachment-0001.html>


More information about the webkit-unassigned mailing list