[webkit-changes] [WebKit/WebKit] d5e6b9: [JSC] `yield` is not a valid BindingIdentifier for...
Commit Queue
noreply at github.com
Wed Oct 25 22:39:50 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d5e6b960d1d0a3498e8faaee5515a6dde2d03ced
https://github.com/WebKit/WebKit/commit/d5e6b960d1d0a3498e8faaee5515a6dde2d03ced
Author: Alexey Shvayka <ashvayka at apple.com>
Date: 2023-10-25 (Wed, 25 Oct 2023)
Changed paths:
M JSTests/test262/expectations.yaml
M LayoutTests/js/parser-syntax-check-expected.txt
M LayoutTests/js/script-tests/parser-syntax-check.js
M Source/JavaScriptCore/parser/Parser.cpp
M Source/JavaScriptCore/parser/ParserModes.h
Log Message:
-----------
[JSC] `yield` is not a valid BindingIdentifier for AsyncGeneratorExpression
https://bugs.webkit.org/show_bug.cgi?id=263686
<rdar://problem/117497786>
Reviewed by Justin Michaud.
Representation of AsyncGeneratorExpression [1] contains BindingIdentifier production with [Yield]
parameter, which throws an early error if it matches `yield` terminal [2].
This change implements above-mentioned error, with an error message similar to the case of `await`
idenfitier, aligning JSC with V8 and SpiderMonkey.
[1]: https://tc39.es/ecma262/#prod-AsyncGeneratorExpression
[2]: https://tc39.es/ecma262/#sec-identifiers-static-semantics-early-errors
* LayoutTests/js/parser-syntax-check-expected.txt:
* LayoutTests/js/script-tests/parser-syntax-check.js:
* JSTests/test262/expectations.yaml: Mark 1 test as passing.
* Source/JavaScriptCore/parser/Parser.cpp:
(JSC::Parser<LexerType>::parseFunctionInfo):
* Source/JavaScriptCore/parser/ParserModes.h:
(JSC::isGeneratorOrAsyncGeneratorWrapperParseMode): Extract a helper that will most likely be needed elsewhere.
Canonical link: https://commits.webkit.org/269801@main
More information about the webkit-changes
mailing list