[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 09:49:56 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=153864
--- Comment #5 from GSkachkov <gskachkov at gmail.com> ---
Comment on attachment 273142
--> https://bugs.webkit.org/attachment.cgi?id=273142
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=273142&action=review
>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:307
>> ? m_newTargetRegister : emitLoadNewTargetFromArrowFunctionLexicalEnvironment();
>
> This function is getting hard to read. I vote for an if statement here.
> Also, I found a bug in the logic of caching here:
> https://bugs.webkit.org/show_bug.cgi?id=155153
OK. It will be overwritten in fix of the 155153
>> Source/JavaScriptCore/parser/Parser.cpp:2068
>> + ConstructorKind functionConstructorKind = functionBodyType == StandardFunctionBodyBlock && !m_isEvalContext
>
> Don't we already know if we're parsing an eval?
> Why do we need m_isEvalContext?
> Maybe I'm mistaken.
In new patch, I've used isEvalNode template function that is deepest place where I can check EvalNode.
>> Source/JavaScriptCore/parser/Parser.cpp:3820
>> + semanticFailIfFalse(currentScope()->isFunction() || (m_isEvalContext && closestParentOrdinaryFunctionNonLexicalScope()->expectedSuperBinding() == SuperBinding::Needed), "super is only valid inside functions");
>
> This error message should be updated.
Yeah, I've created issue https://bugs.webkit.org/show_bug.cgi?id=155491. There is several tests that rely on this 'text', so I decided to separate this change is another patch.
>> Source/JavaScriptCore/runtime/CodeCache.cpp:104
>> + bool isEvalConext = true;
>
> This is definitely not true. This should probably be a parameter to this function.
Removed
>> Source/JavaScriptCore/tests/stress/arrowfunction-lexical-bind-superproperty.js:232
>> +class K extends A {
>
> let's have some eval tests inside a constructor.
> tests for TDZ, etc.
Done
--
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/20160315/ac4bb462/attachment.html>
More information about the webkit-unassigned
mailing list