Changeset 223124 in webkit for trunk/Source/JavaScriptCore/ChangeLog
- Timestamp:
- Oct 9, 2017, 10:53:12 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r223123 r223124 1 2017-10-09 Yusuke Suzuki <[email protected]> 2 3 `async` should be able to be used as an imported binding name 4 https://bugs.webkit.org/show_bug.cgi?id=176573 5 6 Reviewed by Saam Barati. 7 8 Previously, we have ASYNC keyword in the parser. This is introduced only for performance, 9 and ECMA262 spec does not categorize "async" to keyword. This makes parser code complicated, 10 since ASYNC should be handled as IDENT. If we missed this ASYNC keyword, we cause a bug. 11 For example, import declaration failed to bind imported binding to the name "async" because 12 the parser considered ASYNC as keyword. 13 14 This patch removes ASYNC keyword from the parser. By carefully handling ASYNC, we can keep 15 the current performance without using this ASYNC keyword. 16 17 We also add `escaped` field to token data since contextual keyword is valid only if it does 18 not contain any escape sequences. We fix bunch of contextual keyword use with this fix too 19 e.g. `of in for-of`. This improves test262 score. 20 21 * parser/Keywords.table: 22 * parser/Lexer.cpp: 23 (JSC::Lexer<LChar>::parseIdentifier): 24 (JSC::Lexer<UChar>::parseIdentifier): 25 (JSC::Lexer<CharacterType>::parseIdentifierSlowCase): 26 * parser/Parser.cpp: 27 (JSC::Parser<LexerType>::parseStatementListItem): 28 (JSC::Parser<LexerType>::parseForStatement): 29 (JSC::Parser<LexerType>::parseStatement): 30 (JSC::Parser<LexerType>::maybeParseAsyncFunctionDeclarationStatement): 31 (JSC::Parser<LexerType>::parseClass): 32 (JSC::Parser<LexerType>::parseExportDeclaration): 33 (JSC::Parser<LexerType>::parseAssignmentExpression): 34 (JSC::Parser<LexerType>::parseProperty): 35 (JSC::Parser<LexerType>::parsePrimaryExpression): 36 (JSC::Parser<LexerType>::parseMemberExpression): 37 (JSC::Parser<LexerType>::printUnexpectedTokenText): 38 * parser/Parser.h: 39 (JSC::Parser::matchContextualKeyword): 40 * parser/ParserTokens.h: 41 * runtime/CommonIdentifiers.h: 42 1 43 2017-10-09 Saam Barati <[email protected]> 2 44
Note:
See TracChangeset
for help on using the changeset viewer.