Skip to content

Commit c13969e

Browse files
nicolo-ribaudorichardlau
authored andcommitted
deps: V8: cherry-pick ea996ad04a68
Original commit message: [import-attributes] Remove support for numeric keys During the 2023-09 TC39 meeting the proposal has been updated to remove support for bigint and float literals as import attribute keys, due to implementation difficulties in other engines and minimal added value for JS developers. GH issue: tc39/proposal-import-attributes#145 Bug: v8:13856 Change-Id: I0ede2bb10d6ca338a4b0870a1261ccbcd088c16f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4899760 Reviewed-by: Shu-yu Guo <[email protected]> Commit-Queue: Joyee Cheung <[email protected]> Cr-Commit-Position: refs/heads/main@{#90318} Refs: v8/v8@ea996ad PR-URL: #51136 Reviewed-By: Yagiz Nizipli <[email protected]>
1 parent 6fbf0ba commit c13969e

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

deps/v8/src/parsing/parser.cc

+2-10
Original file line numberDiff line numberDiff line change
@@ -1378,16 +1378,8 @@ ImportAssertions* Parser::ParseImportAssertClause() {
13781378
Expect(Token::LBRACE);
13791379

13801380
while (peek() != Token::RBRACE) {
1381-
const AstRawString* attribute_key = nullptr;
1382-
if (Check(Token::STRING) || Check(Token::SMI)) {
1383-
attribute_key = GetSymbol();
1384-
} else if (Check(Token::NUMBER)) {
1385-
attribute_key = GetNumberAsSymbol();
1386-
} else if (Check(Token::BIGINT)) {
1387-
attribute_key = GetBigIntAsSymbol();
1388-
} else {
1389-
attribute_key = ParsePropertyName();
1390-
}
1381+
const AstRawString* attribute_key =
1382+
Check(Token::STRING) ? GetSymbol() : ParsePropertyName();
13911383

13921384
Scanner::Location location = scanner()->location();
13931385

0 commit comments

Comments
 (0)