[ES6] Arrow function syntax. Lexical bind super inside of the arrow function in gener...
authorgskachkov@gmail.com <gskachkov@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Mar 2016 09:52:39 +0000 (09:52 +0000)
committergskachkov@gmail.com <gskachkov@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Mar 2016 09:52:39 +0000 (09:52 +0000)
commit3c6c66b20ba564864b7f589ab64b2b5cacce7eee
tree99bac046b423c6bf35c1642a71d9cbc397c4bc06
parent1ccebbd10e4d72c04113486445398d70e84b6e76
[ES6] Arrow function syntax. Lexical bind super inside of the arrow function in generator.
https://bugs.webkit.org/show_bug.cgi?id=152575

Reviewed by Yusuke Suzuki.

Added support of the 'SuperProperty' in arrow function within of the generator
method of class. Before patch parser  did not recognize that current arrow function
is declated inside of the generator and raise SyntaxError.

Source/JavaScriptCore:

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseFunctionInfo):
* parser/Parser.h:
(JSC::Scope::Scope):
(JSC::Scope::isGeneratorBoundary):
(JSC::Scope::setIsFunction):
(JSC::Scope::setIsGenerator):
(JSC::Parser::closestParentOrdinaryFunctionNonLexicalScope):
* tests/stress/arrowfunction-lexical-bind-superproperty.js:

LayoutTests:

* js/arrowfunction-superproperty-expected.txt:
* js/arrowfunction-syntax-errors-expected.txt:
* js/script-tests/arrowfunction-superproperty.js:
* js/script-tests/arrowfunction-syntax-errors.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@197554 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/js/arrowfunction-superproperty-expected.txt
LayoutTests/js/arrowfunction-syntax-errors-expected.txt
LayoutTests/js/script-tests/arrowfunction-superproperty.js
LayoutTests/js/script-tests/arrowfunction-syntax-errors.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/parser/Parser.cpp
Source/JavaScriptCore/parser/Parser.h
Source/JavaScriptCore/tests/stress/arrowfunction-lexical-bind-superproperty.js