[JSC] forbid "use strict" directive in generator functions with non-simple parameters
authorcaitp@igalia.com <caitp@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Oct 2016 21:27:51 +0000 (21:27 +0000)
committercaitp@igalia.com <caitp@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Oct 2016 21:27:51 +0000 (21:27 +0000)
commit9bad7e78e785ed11bdff9c75f624c456cb5e973c
tree2681459907155298888557d4794982c8fc736d58
parentb64a4465d0e84a87be13c08a28fef03d690ee469
[JSC] forbid "use strict" directive in generator functions with non-simple parameters
https://bugs.webkit.org/show_bug.cgi?id=163683

Reviewed by Geoffrey Garen.

JSTests:

Update various generator*-non-simple-param.js tests to be passing.

* test262.yaml:

Source/JavaScriptCore:

Because generator functions and async functions both have an implicit
inner function whose arguments are inherited from its parent, "use strict"
directives within these functions did not yield a SyntaxError.

Now, the correct syntax error is reported, fixing several test262 failures
for generators and async functions.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseFunctionInfo):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/test262.yaml
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/parser/Parser.cpp