[Webkit-unassigned] [Bug 153864] Invoking super()/super inside of the eval should not lead to SyntaxError

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 15 20:03:37 PDT 2016


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

--- Comment #6 from Saam Barati <sbarati at apple.com> ---
Comment on attachment 274093
  --> https://bugs.webkit.org/attachment.cgi?id=274093
Patch

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

> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:643
> +    if (needsToUpdateArrowFunctionContext() && !codeBlock->isArrowFunctionContext() && !isDerivedConstructorContext()) {

Why the "!isDerivedConstructorContext()" check?

> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:4145
> +    return m_scopeNode->doAnyInnerArrowFunctionsUseNewTarget() || m_scopeNode->doAnyInnerArrowFunctionsUseSuperCall() || m_scopeNode->doAnyInnerArrowFunctionsUseEval() || m_codeBlock->usesEval();

I believe m_codeBlock->usesEval() should always be true if m_scopeNode->doAnyInnerAroowFunctionsUseEval().
You should double check though.

> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:4150
> +    return m_scopeNode->doAnyInnerArrowFunctionsUseSuperCall() || m_scopeNode->doAnyInnerArrowFunctionsUseSuperProperty() || m_scopeNode->doAnyInnerArrowFunctionsUseEval() || m_codeBlock->usesEval();

ditto

> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:4155
> +    return m_scopeNode->doAnyInnerArrowFunctionsUseSuperCall() || m_scopeNode->doAnyInnerArrowFunctionsUseEval() || m_codeBlock->usesEval();

ditto

> Source/JavaScriptCore/parser/Parser.cpp:3848
> +        // TODO: Change error message for more suitable. https://bugs.webkit.org/show_bug.cgi?id=155491 

Style: FIXME not TODO

-- 
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/20160316/d6dcdd08/attachment.html>


More information about the webkit-unassigned mailing list