Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prohibit async methods named 'function' #884

Closed
wants to merge 1 commit into from

Conversation

littledan
Copy link
Member

Addresses #832

@leobalter leobalter added the needs consensus This needs committee consensus before it can be eligible to be merged. label Apr 11, 2017
@leobalter
Copy link
Member

LGTM, but we might need to seek consensus in the next meeting. I'm +1 to restrict the function name.

@littledan littledan added the normative change Affects behavior required to correctly evaluate some ECMAScript source text label Apr 11, 2017
@rwaldron
Copy link
Contributor

Closing per consensus

@rwaldron rwaldron closed this May 25, 2017
hubot pushed a commit to WebKit/WebKit-http that referenced this pull request May 26, 2017
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
tc39/ecma262#884

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@217478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
hubot pushed a commit to WebKit/WebKit-http that referenced this pull request May 30, 2017
https://bugs.webkit.org/show_bug.cgi?id=172660

Reviewed by Saam Barati.

JSTests:

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

Source/JavaScriptCore:

Prevent async method named 'function' in object.
tc39/ecma262#884

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@217578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
@littledan
Copy link
Member Author

To expand on @rwaldron 's comments, we decided at the May 2017 TC39 meeting not to do this patch, as it seemed like, because the grammar of class bodies is more restricted, two-token lookahead would not be a problem. On the other hand, it would be an unexpected lack of behavior to not be able to make async methods with this name.

hubot pushed a commit to WebKit/WebKit-http that referenced this pull request May 31, 2017
https://bugs.webkit.org/show_bug.cgi?id=172776

Reviewed by Mark Lam.

JSTests:

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

Source/JavaScriptCore:

Rolling out https://bugs.webkit.org/show_bug.cgi?id=172660 r217578,
https://bugs.webkit.org/show_bug.cgi?id=172598  r217478
PR to spec was closed, so changes need to roll out. See
tc39/ecma262#884 (comment)

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@217629 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ryanhaddad pushed a commit to WebKit/WebKit that referenced this pull request Dec 22, 2020
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
tc39/ecma262#884

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


Canonical link: https://commits.webkit.org/189536@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ryanhaddad pushed a commit to WebKit/WebKit that referenced this pull request Dec 22, 2020
https://bugs.webkit.org/show_bug.cgi?id=172660

Reviewed by Saam Barati.

JSTests:

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

Source/JavaScriptCore:

Prevent async method named 'function' in object.
tc39/ecma262#884

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


Canonical link: https://commits.webkit.org/189628@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ryanhaddad pushed a commit to WebKit/WebKit that referenced this pull request Dec 22, 2020
https://bugs.webkit.org/show_bug.cgi?id=172776

Reviewed by Mark Lam.

JSTests:

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

Source/JavaScriptCore:

Rolling out https://bugs.webkit.org/show_bug.cgi?id=172660 r217578,
https://bugs.webkit.org/show_bug.cgi?id=172598  r217478
PR to spec was closed, so changes need to roll out. See
tc39/ecma262#884 (comment)

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


Canonical link: https://commits.webkit.org/189676@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217629 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs consensus This needs committee consensus before it can be eligible to be merged. normative change Affects behavior required to correctly evaluate some ECMAScript source text
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants