Prevent async methods named 'function'
authorgskachkov@gmail.com <gskachkov@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 May 2017 07:00:43 +0000 (07:00 +0000)
committergskachkov@gmail.com <gskachkov@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 May 2017 07:00:43 +0000 (07:00 +0000)
commit46ee15c577b71244e7adce42de1648d3ab9d3779
treefac0057fd0eedf27b98c214501030cae0305d902
parent68e16f788168a6e9a8e96cfeb0629c0c62abe2ff
Prevent async methods named 'function'
https://bugs.webkit.org/show_bug.cgi?id=172598

Reviewed by Mark Lam.

JSTests:

* stress/async-await-syntax.js:
(testTopLevelAsyncAwaitSyntaxSloppyMode.testSyntax):
(testTopLevelAsyncAwaitSyntaxSloppyMode):
(prototype.testTopLevelAsyncAwaitSyntaxStrictMode.testSyntax):
(prototype.testTopLevelAsyncAwaitSyntaxStrictMode):
(testTopLevelAsyncAwaitSyntaxSloppyMode.testSyntaxError):

Source/JavaScriptCore:

Prevent async method named 'function' in class.
Link to change in ecma262 specification
https://github.com/tc39/ecma262/pull/884

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@217478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/stress/async-await-syntax.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/parser/Parser.cpp